[webkit-changes] [182356] trunk
Title: [182356] trunk Revision 182356 Author aes...@apple.com Date 2015-04-05 00:52:14 -0700 (Sun, 05 Apr 2015) Log Message [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 unbloc
[webkit-changes] [182357] trunk/Source/WebKit2
Title: [182357] trunk/Source/WebKit2 Revision 182357 Author an...@apple.com Date 2015-04-05 08:18:47 -0700 (Sun, 05 Apr 2015) Log Message 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 2^20 to 2^18 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. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h Diff Modified: trunk/Source/WebKit2/ChangeLog (182356 => 182357) --- trunk/Source/WebKit2/ChangeLog 2015-04-05 07:52:14 UTC (rev 182356) +++ trunk/Source/WebKit2/ChangeLog 2015-04-05 15:18:47 UTC (rev 182357) @@ -1,3 +1,52 @@ +2015-04-04 Antti Koivisto + +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 2^20 to 2^18 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. + 2015-04-04 Andy Estes [Content Filtering] Blocked page is not always displayed when it should be Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp (182356 => 182357) --- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCach
[webkit-changes] [182358] trunk/LayoutTests
Title: [182358] trunk/LayoutTests Revision 182358 Author gyuyoung@webkit.org Date 2015-04-05 08:34:21 -0700 (Sun, 05 Apr 2015) Log Message [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: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/efl/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (182357 => 182358) --- trunk/LayoutTests/ChangeLog 2015-04-05 15:18:47 UTC (rev 182357) +++ trunk/LayoutTests/ChangeLog 2015-04-05 15:34:21 UTC (rev 182358) @@ -1,3 +1,12 @@ +2015-04-05 Gyuyoung Kim + +[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: + 2015-04-04 Andy Estes [Content Filtering] Blocked page is not always displayed when it should be Modified: trunk/LayoutTests/platform/efl/TestExpectations (182357 => 182358) --- trunk/LayoutTests/platform/efl/TestExpectations 2015-04-05 15:18:47 UTC (rev 182357) +++ trunk/LayoutTests/platform/efl/TestExpectations 2015-04-05 15:34:21 UTC (rev 182358) @@ -2212,3 +2212,6 @@ compositing/overlap-blending/nested-overlap-overflow.html [ Crash ] compositing/reflections/nested-reflection-on-overflow.html [ Crash ] compositing/text-on-scaled-surface.html [ Crash ] + +webkit.org/b/143415 fast/scrolling/scroll-select-list.html [ ImageOnlyFailure ] +webkit.org/b/143416 fast/text/baseline-inline-block.html [ ImageOnlyFailure ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182359] trunk/Source/WebInspectorUI
Title: [182359] trunk/Source/WebInspectorUI Revision 182359 Author nvasil...@apple.com Date 2015-04-05 09:52:49 -0700 (Sun, 05 Apr 2015) Log Message 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. Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (182358 => 182359) --- trunk/Source/WebInspectorUI/ChangeLog 2015-04-05 15:34:21 UTC (rev 182358) +++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-05 16:52:49 UTC (rev 182359) @@ -1,3 +1,14 @@ +2015-04-05 Nikita Vasilyev + +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. + 2015-03-31 Nikita Vasilyev Web Inspector: console.error(object) has double disclosure triangles Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css (182358 => 182359) --- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css 2015-04-05 15:34:21 UTC (rev 182358) +++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css 2015-04-05 16:52:49 UTC (rev 182359) @@ -46,6 +46,7 @@ display: inline-block; width: 22px; +margin-left: 13px; text-align: center; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182360] trunk/LayoutTests
Title: [182360] trunk/LayoutTests Revision 182360 Author simon.fra...@apple.com Date 2015-04-05 11:18:45 -0700 (Sun, 05 Apr 2015) Log Message Skip fast/fixed-layout/fixed-layout.html on Windows. * platform/win/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/win/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (182359 => 182360) --- trunk/LayoutTests/ChangeLog 2015-04-05 16:52:49 UTC (rev 182359) +++ trunk/LayoutTests/ChangeLog 2015-04-05 18:18:45 UTC (rev 182360) @@ -1,3 +1,9 @@ +2015-04-05 Simon Fraser + +Skip fast/fixed-layout/fixed-layout.html on Windows. + +* platform/win/TestExpectations: + 2015-04-05 Gyuyoung Kim [EFL] Gardening on 5th April. Mark 2 tests to ImageOnlyFailure. Modified: trunk/LayoutTests/platform/win/TestExpectations (182359 => 182360) --- trunk/LayoutTests/platform/win/TestExpectations 2015-04-05 16:52:49 UTC (rev 182359) +++ trunk/LayoutTests/platform/win/TestExpectations 2015-04-05 18:18:45 UTC (rev 182360) @@ -3073,3 +3073,5 @@ webkit.org/b/143354 fast/ruby/ruby-expansion-cjk-3.html [ ImageOnlyFailure ] webkit.org/b/143354 fast/ruby/ruby-expansion-cjk-4.html [ ImageOnlyFailure ] webkit.org/b/143354 fast/ruby/ruby-expansion-cjk-5.html [ ImageOnlyFailure ] + +webkit.org/b/143420 fast/fixed-layout/fixed-layout.html [ Skip ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182361] trunk/Source/WebKit2
Title: [182361] trunk/Source/WebKit2 Revision 182361 Author an...@apple.com Date 2015-04-05 11:35:19 -0700 (Sun, 05 Apr 2015) Log Message 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): Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (182360 => 182361) --- trunk/Source/WebKit2/ChangeLog 2015-04-05 18:18:45 UTC (rev 182360) +++ trunk/Source/WebKit2/ChangeLog 2015-04-05 18:35:19 UTC (rev 182361) @@ -1,3 +1,26 @@ +2015-04-05 Antti Koivisto + +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): + 2015-04-04 Antti Koivisto Network cache Bloom filter is too big Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp (182360 => 182361) --- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp 2015-04-05 18:18:45 UTC (rev 182360) +++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp 2015-04-05 18:35:19 UTC (rev 182361) @@ -76,11 +76,11 @@ return !!m_storage; } -void Cache::setMaximumSize(size_t maximumSize) +void Cache::setCapacity(size_t maximumSize) { if (!m_storage) return; -m_storage->setMaximumSize(maximumSize); +m_storage->setCapacity(maximumSize); } static Key makeCacheKey(const WebCore::ResourceRequest& request) Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h (182360 => 182361) --- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h 2015-04-05 18:18:45 UTC (rev 182360) +++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h 2015-04-05 18:35:19 UTC (rev 182361) @@ -87,7 +87,7 @@ friend class WTF::NeverDestroyed; public: bool initialize(const String& cachePath, bool enableEfficacyLogging); -void setMaximumSize(size_t); +void setCapacity(size_t); bool isEnabled() const { return !!m_storage; } Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp (182360 => 182361) --- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp 2015-04-05 18:18:45 UTC (rev 182360) +++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp 2015-04-05 18:35:19 UTC (rev 182361) @@ -419,7 +419,7 @@ ASSERT(priority <= maximumRetrievePriority); ASSERT(!key.isNull()); -if (!m_maximumSize) { +if (!m_capacity) { completionHandler(nullptr); return; } @@ -443,7 +443,7 @@ ASSERT(RunLoop::isMain()); ASSERT(!record.key.isNull()); -if (!m_maximumSize) { +if (!m_capacity) { completionHandler(false, { }); return; } @@ -462,7 +462,7 @@ ASSERT(!existingRecord.key.isNull()); ASSERT(existingRecord.key == updateRecord.key); -if (!m_maximumSize) { +if (!m_capacity) { completionHandler(false, { }); return; } @@ -604,20 +604,20 @@ }); } -void Storage::setMaximumSize(size_t size) +void Storage::setCapacity(size_t capacity) { ASSERT(RunLoop::isMain()); #if !ASSERT_DISABLED const size_t assumedAverageRecordSize =
[webkit-changes] [182362] trunk/Source/WebKit2
Title: [182362] trunk/Source/WebKit2 Revision 182362 Author an...@apple.com Date 2015-04-05 11:39:07 -0700 (Sun, 05 Apr 2015) Log Message 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. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp Diff Modified: trunk/Source/WebKit2/ChangeLog (182361 => 182362) --- trunk/Source/WebKit2/ChangeLog 2015-04-05 18:35:19 UTC (rev 182361) +++ trunk/Source/WebKit2/ChangeLog 2015-04-05 18:39:07 UTC (rev 182362) @@ -1,5 +1,15 @@ 2015-04-05 Antti Koivisto +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. + +2015-04-05 Antti Koivisto + Rename Cache::setMaximumSize to setCapacity https://bugs.webkit.org/show_bug.cgi?id=143418 Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp (182361 => 182362) --- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp 2015-04-05 18:35:19 UTC (rev 182361) +++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp 2015-04-05 18:39:07 UTC (rev 182362) @@ -609,7 +609,7 @@ ASSERT(RunLoop::isMain()); #if !ASSERT_DISABLED -const size_t assumedAverageRecordSize = 50 << 20; +const size_t assumedAverageRecordSize = 50 << 10; size_t maximumRecordCount = capacity / assumedAverageRecordSize; // ~10 bits per element are required for <1% false positive rate. size_t effectiveBloomFilterCapacity = ContentsFilter::tableSize / 10; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182363] trunk
Title: [182363] trunk Revision 182363 Author an...@apple.com Date 2015-04-05 11:45:38 -0700 (Sun, 05 Apr 2015) Log Message 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 (like SHA1::Digest and MD5::Digest). * wtf/BloomFilter.h: (WTF::BloomFilter::keysFromHash): (WTF::BloomFilter::mayContain): (WTF::BloomFilter::add): Tools: * TestWebKitAPI/Tests/WTF/BloomFilter.cpp: (TestWebKitAPI::generateRandomDigests): (TestWebKitAPI::TEST): Modified Paths trunk/Source/WTF/ChangeLog trunk/Source/WTF/wtf/BloomFilter.h trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WTF/BloomFilter.cpp Diff Modified: trunk/Source/WTF/ChangeLog (182362 => 182363) --- trunk/Source/WTF/ChangeLog 2015-04-05 18:39:07 UTC (rev 182362) +++ trunk/Source/WTF/ChangeLog 2015-04-05 18:45:38 UTC (rev 182363) @@ -1,3 +1,19 @@ +2015-04-05 Antti Koivisto + +Bloom filter should support longer hashes +https://bugs.webkit.org/show_bug.cgi?id=143419 + +Reviewed by Dan Bernstein. + +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 (like SHA1::Digest and MD5::Digest). + +* wtf/BloomFilter.h: +(WTF::BloomFilter::keysFromHash): +(WTF::BloomFilter::mayContain): +(WTF::BloomFilter::add): + 2015-04-03 Antti Koivisto Add non-counting Bloom filter implementation Modified: trunk/Source/WTF/wtf/BloomFilter.h (182362 => 182363) --- trunk/Source/WTF/wtf/BloomFilter.h 2015-04-05 18:39:07 UTC (rev 182362) +++ trunk/Source/WTF/wtf/BloomFilter.h 2015-04-05 18:45:38 UTC (rev 182363) @@ -44,11 +44,15 @@ BloomFilter(); void add(unsigned hash); +// For example SHA1::Digest. +template void add(const std::array&); + void add(const BloomFilter&); // The filter may give false positives (claim it may contain a key it doesn't) // but never false negatives (claim it doesn't contain a key it does). bool mayContain(unsigned hash) const; +template bool mayContain(const std::array&) const; void clear(); @@ -62,6 +66,7 @@ static const unsigned keyMask = (1 << keyBits) - 1; static unsigned arrayIndex(unsigned key) { return key / bitsPerPosition; } static unsigned bitMask(unsigned key) { return 1 << (key % bitsPerPosition); } +template static std::pair keysFromHash(const std::array&); bool isBitSet(unsigned key) const; void setBit(unsigned key); @@ -91,6 +96,35 @@ } template +template +inline std::pair BloomFilter::keysFromHash(const std::array& hash) +{ +// We could use larger k value than 2 for long hashes. +static_assert(hashSize >= 2 * sizeof(unsigned), "Hash array too short"); +return { +*reinterpret_cast(hash.data()), +*reinterpret_cast(hash.data() + sizeof(unsigned)) +}; +} + +template +template +inline bool BloomFilter::mayContain(const std::array& hash) const +{ +auto keys = keysFromHash(hash); +return isBitSet(keys.first) && isBitSet(keys.second); +} + +template +template +inline void BloomFilter::add(const std::array& hash) +{ +auto keys = keysFromHash(hash); +setBit(keys.first); +setBit(keys.second); +} + +template inline void BloomFilter::add(const BloomFilter& other) { for (size_t i = 0; i < m_bitArray.size(); ++i) Modified: trunk/Source/WebKit2/ChangeLog (182362 => 182363) --- trunk/Source/WebKit2/ChangeLog 2015-04-05 18:39:07 UTC (rev 182362) +++ trunk/Source/WebKit2/ChangeLog 2015-04-05 18:45:38 UTC (rev 182363) @@ -1,5 +1,27 @@ 2015-04-05 Antti Koivisto +Bloom filter should support longer hashes +https://bugs.webkit.org/show_bug.cgi?id=143419 + +Reviewed by Dan Bernstein. + +Use the hash digest directly in the contents filter instead of going via shortHash. + +* NetworkProcess/cache/NetworkCacheKey.h: +(W
[webkit-changes] [182364] trunk/Source
Title: [182364] trunk/Source Revision 182364 Author simon.fra...@apple.com Date 2015-04-05 13:17:11 -0700 (Sun, 05 Apr 2015) Log Message 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/_javascript_Core: * 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): Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/interpreter/JSStack.cpp trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp trunk/Source/WebCore/css/CSSFontFaceSrcValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/editing/ApplyStyleCommand.cpp trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/cache/CachedImage.cpp trunk/Source/WebCore/loader/icon/IconDatabase.cpp trunk/Source/WebCore/page/PageOverlay.cpp trunk/Source/WebCore/platform/ScrollView.cpp trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp trunk/Source/WebCore/platform/graphics/mac/Com
[webkit-changes] [182366] trunk/Source/WebKit2
Title: [182366] trunk/Source/WebKit2 Revision 182366 Author da...@apple.com Date 2015-04-05 15:24:26 -0700 (Sun, 05 Apr 2015) Log Message [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. Modified Paths trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm Diff Modified: trunk/Source/WebKit2/ChangeLog (182365 => 182366) --- trunk/Source/WebKit2/ChangeLog 2015-04-05 20:44:35 UTC (rev 182365) +++ trunk/Source/WebKit2/ChangeLog 2015-04-05 22:24:26 UTC (rev 182366) @@ -1,3 +1,17 @@ +2015-04-05 Darin Adler + +[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. + 2015-04-05 Gyuyoung Kim Use constants of sqlite3 directly for status of SQL result in webdatabase Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (182365 => 182366) --- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-04-05 20:44:35 UTC (rev 182365) +++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-04-05 22:24:26 UTC (rev 182366) @@ -267,31 +267,42 @@ #endif } +#if PLATFORM(MAC) + +static NSURL *origin(WebPage& page) +{ +WebFrame* mainFrame = page.mainWebFrame(); +if (!mainFrame) +return nil; + +URL mainFrameURL(URL(), mainFrame->url()); +RefPtr mainFrameOrigin = SecurityOrigin::create(mainFrameURL); +String mainFrameOriginString; +if (!mainFrameOrigin->isUnique()) +mainFrameOriginString = mainFrameOrigin->toRawString(); +else +mainFrameOriginString = mainFrameURL.protocol() + ':'; // toRawString() is not supposed to work with unique origins, and would just return "://". + +// +[NSURL URLWithString:] returns nil when its argument is malformed. It's unclear when we would have a malformed URL here, +// but it happens in practice according to . Leaving an assertion in to catch a reproducible case. +ASSERT([NSURL URLWithString:mainFrameOriginString]); + +return [NSURL URLWithString:mainFrameOriginString]; +} + +#endif + void WebProcess::updateActivePages() { -#if USE(APPKIT) +#if PLATFORM(MAC) RetainPtr activePageURLs = adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); -for (const auto& iter: m_pageMap) { -WebPage* page = iter.value.get(); -WebFrame* mainFrame = page->mainWebFrame(); -if (!mainFrame) -continue; -String mainFrameOriginString; -RefPtr mainFrameOrigin = SecurityOrigin::createFromString(mainFrame->url()); -if (!mainFrameOrigin->isUnique()) -mainFrameOriginString = mainFrameOrigin->toRawString(); -else -mainFrameOriginString = URL(URL(), mainFrame->url()).protocol() + ':'; // toRawString() is not supposed to work with unique origins, and would just return "://". - -NSURL *originAsNSURL = [NSURL URLWithString:mainFrameOriginString]; -// +[NSURL URLWithString:] returns nil when its argument is malformed. It's unclear how we can possibly have a malformed URL here, -// but it happens in practice according to . Leaving an assertion in to catch a reproducible case. -ASSERT(originAsNSURL); -NSString *userVisibleOriginString = originAsNSURL ? userVisibleString(originAsNSURL) : @"(null)"; - -CFArrayAppendValue(activePageURLs.get(), userVisibleOriginString); +for (auto& page : m_pageMap.values()) { +if (NSURL *originAsURL = origin(*page)) +CFArrayAppendValue(activePageURLs.get(), userVisibleString(originAsURL)); } -WKSetApplicationInformationItem(CFSTR("LSActivePageUserVisibleOriginsKey"), activePageURLs.get()); +dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), [activePageURLs] { +WKSetApplicationInformationItem(CFSTR("LSActivePageUserVisibleOriginsKey"), activePageURLs.get()); +}); #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https:/
[webkit-changes] [182367] trunk/Source/WebCore
Title: [182367] trunk/Source/WebCore Revision 182367 Author commit-qu...@webkit.org Date 2015-04-05 16:31:32 -0700 (Sun, 05 Apr 2015) Log Message Remove DocumentLoader::requestURL(). https://bugs.webkit.org/show_bug.cgi?id=140001 Patch by Sungmann Cho 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): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/DocumentLoader.h trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (182366 => 182367) --- trunk/Source/WebCore/ChangeLog 2015-04-05 22:24:26 UTC (rev 182366) +++ trunk/Source/WebCore/ChangeLog 2015-04-05 23:31:32 UTC (rev 182367) @@ -1,3 +1,19 @@ +2015-04-05 Sungmann Cho + +Remove DocumentLoader::requestURL(). +https://bugs.webkit.org/show_bug.cgi?id=140001 + +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): + 2015-04-05 Gyuyoung Kim Use constants of sqlite3 directly for status of SQL result in webdatabase Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (182366 => 182367) --- trunk/Source/WebCore/loader/DocumentLoader.cpp 2015-04-05 22:24:26 UTC (rev 182366) +++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2015-04-05 23:31:32 UTC (rev 182367) @@ -1223,11 +1223,6 @@ return m_originalRequestCopy.url(); } -const URL& DocumentLoader::requestURL() const -{ -return request().url(); -} - const URL& DocumentLoader::responseURL() const { return m_response.url(); @@ -1241,7 +1236,7 @@ url = "" #endif if (url.isEmpty()) -url = "" +url = "" if (url.isEmpty()) url = "" return url; Modified: trunk/Source/WebCore/loader/DocumentLoader.h (182366 => 182367) --- trunk/Source/WebCore/loader/DocumentLoader.h 2015-04-05 22:24:26 UTC (rev 182366) +++ trunk/Source/WebCore/loader/DocumentLoader.h 2015-04-05 23:31:32 UTC (rev 182367) @@ -110,12 +110,10 @@ const SubstituteData& substituteData() const { return m_substituteData; } -// FIXME: This is the same as requestURL(). We should remove one of them. WEBCORE_EXPORT const URL& url() const; WEBCORE_EXPORT const URL& unreachableURL() const; const URL& originalURL() const; -WEBCORE_EXPORT const URL& requestURL() const; WEBCORE_EXPORT const URL& responseURL() const; WEBCORE_EXPORT const String& responseMIMEType() const; #if PLATFORM(IOS) Modified: trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp (182366 => 182367) --- trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2015-04-05 22:24:26 UTC (rev 182366) +++ trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp 2015-04-05 23:31:32 UTC (rev 182367) @@ -139,7 +139,7 @@ InspectorInstrumentation::willSendRequest(&m_frame, identifier, loader, request, redirectResponse); // Report WebTiming for all frames. -if (loader && !request.isNull() && request.url() == loader->requestURL()) +if (loader && !request.isNull() && request.url() == loader->url()) request.setReportLoadTiming(true); #if ENABLE(RESOURCE_TIMING) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182368] trunk/Source/JavaScriptCore
Title: [182368] trunk/Source/_javascript_Core Revision 182368 Author commit-qu...@webkit.org Date 2015-04-05 16:41:03 -0700 (Sun, 05 Apr 2015) Log Message documentation for ES Promises points to the wrong one https://bugs.webkit.org/show_bug.cgi?id=143263 Patch by Masataka Yakura on 2015-04-05 Reviewed by Darin Adler. * features.json: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/features.json Diff Modified: trunk/Source/_javascript_Core/ChangeLog (182367 => 182368) --- trunk/Source/_javascript_Core/ChangeLog 2015-04-05 23:31:32 UTC (rev 182367) +++ trunk/Source/_javascript_Core/ChangeLog 2015-04-05 23:41:03 UTC (rev 182368) @@ -1,3 +1,12 @@ +2015-04-05 Masataka Yakura + +documentation for ES Promises points to the wrong one +https://bugs.webkit.org/show_bug.cgi?id=143263 + +Reviewed by Darin Adler. + +* features.json: + 2015-04-05 Simon Fraser Remove "go ahead and" from comments Modified: trunk/Source/_javascript_Core/features.json (182367 => 182368) --- trunk/Source/_javascript_Core/features.json 2015-04-05 23:31:32 UTC (rev 182367) +++ trunk/Source/_javascript_Core/features.json 2015-04-05 23:41:03 UTC (rev 182368) @@ -31,7 +31,7 @@ "shipped": ["ios8-safari", "osx-safari-7.1"] }, "url": "https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects", -"documentation-url": "https://developer.mozilla.org/en-US/docs/Mozilla/_javascript__code_modules/Promise.jsm/Promise", +"documentation-url": "https://developer.mozilla.org/en-US/docs/Web/_javascript_/Reference/Global_Objects/Promise", "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=120260", "specification": "ES6" }, @@ -47,4 +47,4 @@ "specification": "ES6" } ] -} \ No newline at end of file +} ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182369] trunk
Title: [182369] trunk Revision 182369 Author aes...@apple.com Date 2015-04-05 17:23:46 -0700 (Sun, 05 Apr 2015) Log Message [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. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp trunk/Source/WebCore/loader/ContentFilter.cpp trunk/Source/WebCore/loader/ContentFilter.h trunk/Source/WebCore/loader/DocumentLoader.cpp trunk/Source/WebCore/loader/SubresourceLoader.cpp trunk/Source/WebCore/loader/cache/CachedRawResource.cpp trunk/Source/WebCore/loader/cache/CachedRawResource.h trunk/Source/WebCore/loader/cache/CachedResource.cpp trunk/Source/WebCore/loader/cache/CachedResource.h trunk/Source/WebCore/platform/PlatformContentFilter.h trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h trunk/Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h trunk/Source/WebCore/testing/MockContentFilter.cpp trunk/Source/WebCore/testing/MockContentFilter.h trunk/Source/WebCore/testing/MockContentFilterSettings.h trunk/Source/WebCore/testing/MockContentFilterSettings.idl Added Paths trunk/LayoutTests/contentfiltering/allow-after-will-send-request-expected.html trunk/LayoutTests/contentfiltering/allow-after-will-send-request.html trunk/LayoutTests/contentfiltering/block-after-will-send-request-expected.html trunk/LayoutTests/contentfiltering/block-after-will-send-request.html trunk/LayoutTests/http/tests/contentfilterin
[webkit-changes] [182370] trunk/Source/JavaScriptCore
Title: [182370] trunk/Source/_javascript_Core Revision 182370 Author akl...@apple.com Date 2015-04-05 18:32:12 -0700 (Sun, 05 Apr 2015) Log Message URI encoding/escaping should use efficient string building instead of calling snprintf(). Reviewed by Gavin Barraclough. I saw 0.5% of main thread time in snprintf() on 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): Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp Diff Modified: trunk/Source/_javascript_Core/ChangeLog (182369 => 182370) --- trunk/Source/_javascript_Core/ChangeLog 2015-04-06 00:23:46 UTC (rev 182369) +++ trunk/Source/_javascript_Core/ChangeLog 2015-04-06 01:32:12 UTC (rev 182370) @@ -1,3 +1,20 @@ +2015-04-05 Andreas Kling + +URI encoding/escaping should use efficient string building instead of calling snprintf(). + + +Reviewed by Gavin Barraclough. + +I saw 0.5% of main thread time in snprintf() on +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): + 2015-04-05 Masataka Yakura documentation for ES Promises points to the wrong one Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp (182369 => 182370) --- trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp 2015-04-06 00:23:46 UTC (rev 182369) +++ trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp 2015-04-06 01:32:12 UTC (rev 182370) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,8 @@ if (c && strchr(doNotEscape, c)) builder.append(static_cast(c)); else { -char tmp[4]; -snprintf(tmp, sizeof(tmp), "%%%02X", static_cast(c)); -builder.append(tmp); +builder.append(static_cast('%')); +appendByteAsHex(c, builder); } } return builder.build(exec); @@ -676,9 +676,8 @@ if (u && strchr(do_not_escape, static_cast(u))) builder.append(*c); else { -char tmp[4]; -snprintf(tmp, sizeof(tmp), "%%%02X", u); -builder.append(tmp); +builder.append(static_cast('%')); +appendByteAsHex(static_cast(u), builder); } } @@ -689,15 +688,15 @@ for (unsigned k = 0; k < str.length(); k++, c++) { int u = c[0]; if (u > 255) { -char tmp[7]; -snprintf(tmp, sizeof(tmp), "%%u%04X", u); -builder.append(tmp); +builder.append(static_cast('%')); +builder.append(static_cast('u')); +appendByteAsHex(u >> 8, builder); +appendByteAsHex(u & 0xFF, builder); } else if (u != 0 && strchr(do_not_escape, static_cast(u))) builder.append(*c); else { -char tmp[4]; -snprintf(tmp, sizeof(tmp), "%%%02X", u); -builder.append(tmp); +builder.append(static_cast('%')); +appendByteAsHex(u, builder); } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182371] trunk/Source/WebCore
Title: [182371] trunk/Source/WebCore Revision 182371 Author da...@apple.com Date 2015-04-05 18:43:32 -0700 (Sun, 05 Apr 2015) Log Message 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. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/animation/AnimationController.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (182370 => 182371) --- trunk/Source/WebCore/ChangeLog 2015-04-06 01:32:12 UTC (rev 182370) +++ trunk/Source/WebCore/ChangeLog 2015-04-06 01:43:32 UTC (rev 182371) @@ -1,3 +1,18 @@ +2015-04-05 Darin Adler + +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. + 2015-04-05 Andy Estes [Content Filtering] Tell the filter about requests and redirects Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (182370 => 182371) --- trunk/Source/WebCore/page/animation/AnimationController.cpp 2015-04-06 01:32:12 UTC (rev 182370) +++ trunk/Source/WebCore/page/animation/AnimationController.cpp 2015-04-06 01:43:32 UTC (rev 182371) @@ -519,8 +519,10 @@ #if ENABLE(CSS_ANIMATIONS_LEVEL_2) void AnimationControllerPrivate::scrollWasUpdated() { -m_scrollPosition = m_frame.view()->scrollOffsetForFixedPosition().height().toFloat(); - +auto* view = m_frame.view(); +if (!view) +return; +m_scrollPosition = view->scrollOffsetForFixedPosition().height().toFloat(); updateAnimations(CallSetChanged); } #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182372] trunk/Source/WebInspectorUI
Title: [182372] trunk/Source/WebInspectorUI Revision 182372 Author commit-qu...@webkit.org Date 2015-04-05 18:56:28 -0700 (Sun, 05 Apr 2015) Log Message Web Inspector: Regression: Map instances don't expand https://bugs.webkit.org/show_bug.cgi?id=143428 Patch by 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): Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (182371 => 182372) --- trunk/Source/WebInspectorUI/ChangeLog 2015-04-06 01:43:32 UTC (rev 182371) +++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-06 01:56:28 UTC (rev 182372) @@ -1,3 +1,20 @@ +2015-04-05 Joseph Pecoraro + +Web Inspector: Regression: Map instances don't expand +https://bugs.webkit.org/show_bug.cgi?id=143428 + +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): + 2015-04-05 Nikita Vasilyev Web Inspector: ObjectTree array index hints are clipped when shown in popover Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js (182371 => 182372) --- trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js 2015-04-06 01:43:32 UTC (rev 182371) +++ trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js 2015-04-06 01:56:28 UTC (rev 182372) @@ -29,7 +29,7 @@ { console.assert(objectStore instanceof WebInspector.IndexedDatabaseObjectStore); -super(WebInspector.IndexedDatabaseObjectStoreTreeElement.IconStyleClassName, objectStore.name, null, objectStore, !!this._objectStore.indexes.length); +super("database-table-icon", objectStore.name, null, objectStore, !!objectStore.indexes.length); this._objectStore = objectStore; Modified: trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js (182371 => 182372) --- trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js 2015-04-06 01:43:32 UTC (rev 182371) +++ trunk/Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseTreeElement.js 2015-04-06 01:56:28 UTC (rev 182372) @@ -29,10 +29,10 @@ { console.assert(indexedDatabase instanceof WebInspector.IndexedDatabase); +super("database-icon", indexedDatabase.name, null, indexedDatabase, !!indexedDatabase.objectStores.length); + this._indexedDatabase = indexedDatabase; -super("database-icon", indexedDatabase.name, null, indexedDatabase, !!this._indexedDatabase.objectStores.length); - this.small = true; } Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js (182371 => 182372) --- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js 2015-04-06 01:43:32 UTC (rev 182371) +++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js 2015-04-06 01:56:28 UTC (rev 182372) @@ -30,7 +30,7 @@ console.assert(object instanceof WebInspector.RemoteObject); // Treat the same as an array-index just with different strings and widths. -super(this._object, propertyPath); +super(object, propertyPath); this._object = object; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182373] trunk/Source/WebCore
Title: [182373] trunk/Source/WebCore Revision 182373 Author simon.fra...@apple.com Date 2015-04-05 19:59:57 -0700 (Sun, 05 Apr 2015) Log Message 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. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderBlock.cpp trunk/Source/WebCore/rendering/RenderObject.cpp trunk/Source/WebCore/rendering/RenderObject.h Diff Modified: trunk/Source/WebCore/ChangeLog (182372 => 182373) --- trunk/Source/WebCore/ChangeLog 2015-04-06 01:56:28 UTC (rev 182372) +++ trunk/Source/WebCore/ChangeLog 2015-04-06 02:59:57 UTC (rev 182373) @@ -1,3 +1,51 @@ +2015-04-05 Simon Fraser + +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,
[webkit-changes] [182374] trunk/Source/WebCore
Title: [182374] trunk/Source/WebCore Revision 182374 Author da...@apple.com Date 2015-04-05 20:29:06 -0700 (Sun, 05 Apr 2015) Log Message 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. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/FrameView.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (182373 => 182374) --- trunk/Source/WebCore/ChangeLog 2015-04-06 02:59:57 UTC (rev 182373) +++ trunk/Source/WebCore/ChangeLog 2015-04-06 03:29:06 UTC (rev 182374) @@ -1,3 +1,39 @@ +2015-04-05 Darin Adler + +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. + 2015-04-05 Simon Fraser Free up some bits in RenderObject by moving rarely used bits into a side table Modified: trunk/Source/WebCore/page/FrameView.cpp (182373 => 182374) --- trunk/Source/WebCore/page/FrameView.cpp 2015-04-06 02:59:57 UTC (rev 182373) +++ trunk/Source/WebCore/page/FrameView.cpp 2015-04-06 03:29:06 UTC (rev 182374) @@ -1313,13 +1313,14 @@ root->layout(); #if ENABLE(IOS_TEXT_AUTOSIZING) -float minZoomFontSize = frame().settings().minimumZoomFontSize(); -float visWidth = frame().page()->textAutosizingWidth(); -if (minZoomFontSize && visWidth && !root->view().printing()) { -root->adjustComputedFontSizesOnBlocks(minZoomFontSize, visWidth); -bool needsLayout = root->needsLayout(); -if (needsLayout) -root->layout(); +if (Page* page = frame().page()) { +
[webkit-changes] [182375] trunk/Source/WebInspectorUI
Title: [182375] trunk/Source/WebInspectorUI Revision 182375 Author commit-qu...@webkit.org Date 2015-04-05 21:01:43 -0700 (Sun, 05 Apr 2015) Log Message Web Inspector: Add String/Array "includes" parameter display string https://bugs.webkit.org/show_bug.cgi?id=143434 Patch by Joseph Pecoraro on 2015-04-05 Reviewed by Darin Adler. * UserInterface/Models/NativeFunctionParameters.js: Modified Paths trunk/Source/WebInspectorUI/ChangeLog trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js Diff Modified: trunk/Source/WebInspectorUI/ChangeLog (182374 => 182375) --- trunk/Source/WebInspectorUI/ChangeLog 2015-04-06 03:29:06 UTC (rev 182374) +++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-06 04:01:43 UTC (rev 182375) @@ -1,5 +1,14 @@ 2015-04-05 Joseph Pecoraro +Web Inspector: Add String/Array "includes" parameter display string +https://bugs.webkit.org/show_bug.cgi?id=143434 + +Reviewed by Darin Adler. + +* UserInterface/Models/NativeFunctionParameters.js: + +2015-04-05 Joseph Pecoraro + Web Inspector: Regression: Map instances don't expand https://bugs.webkit.org/show_bug.cgi?id=143428 Modified: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (182374 => 182375) --- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js 2015-04-06 03:29:06 UTC (rev 182374) +++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js 2015-04-06 04:01:43 UTC (rev 182375) @@ -34,6 +34,7 @@ freeze: "object", getOwnPropertyDescriptor: "object, propertyName", getOwnPropertyNames: "object", +getOwnPropertySymbols: "object", getPrototypeOf: "object", isExtensible: "object", isFrozen: "object", @@ -195,6 +196,7 @@ find: "callback, [thisArg]", findIndex: "callback, [thisArg]", forEach: "callback, [thisArg]", +includes: "searchValue, [startIndex=0]", indexOf: "searchValue, [startIndex=0]", join: "[separator=\",\"]", lastIndexOf: "searchValue, [startIndex=length]", @@ -298,6 +300,7 @@ charAt: "index", charCodeAt: "index", concat: "string, ...", +includes: "searchValue, [startIndex=0]", indexOf: "searchValue, [startIndex=0]", lastIndexOf: "searchValue, [startIndex=length]", localeCompare: "string", ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [182376] trunk/LayoutTests
Title: [182376] trunk/LayoutTests Revision 182376 Author aes...@apple.com Date 2015-04-05 21:48:33 -0700 (Sun, 05 Apr 2015) Log Message [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. Modified Paths trunk/LayoutTests/ChangeLog Added Paths trunk/LayoutTests/contentfiltering/block-after-add-data-then-allow-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-add-data-then-allow-unblock.html trunk/LayoutTests/contentfiltering/block-after-add-data-then-deny-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-add-data-then-deny-unblock.html trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-allow-unblock.html trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-deny-unblock.html trunk/LayoutTests/contentfiltering/block-after-response-then-allow-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-response-then-allow-unblock.html trunk/LayoutTests/contentfiltering/block-after-response-then-deny-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-response-then-deny-unblock.html trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-allow-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-allow-unblock.html trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-deny-unblock-expected.html trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-deny-unblock.html Removed Paths trunk/LayoutTests/contentfiltering/allow-after-unblock-request-expected.html trunk/LayoutTests/contentfiltering/allow-after-unblock-request.html trunk/LayoutTests/contentfiltering/block-after-unblock-request-expected.html trunk/LayoutTests/contentfiltering/block-after-unblock-request.html Diff Modified: trunk/LayoutTests/ChangeLog (182375 => 182376) --- trunk/LayoutTests/ChangeLog 2015-04-06 04:01:43 UTC (rev 182375) +++ trunk/LayoutTests/ChangeLog 2015-04-06 04:48:33 UTC (rev 182376) @@ -1,5 +1,29 @@ 2015-04-05 Andy Estes +[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-dat
[webkit-changes] [182377] trunk/Source/WebCore
Title: [182377] trunk/Source/WebCore Revision 182377 Author aes...@apple.com Date 2015-04-05 22:24:21 -0700 (Sun, 05 Apr 2015) Log Message [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. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm Diff Modified: trunk/Source/WebCore/ChangeLog (182376 => 182377) --- trunk/Source/WebCore/ChangeLog 2015-04-06 04:48:33 UTC (rev 182376) +++ trunk/Source/WebCore/ChangeLog 2015-04-06 05:24:21 UTC (rev 182377) @@ -1,3 +1,15 @@ +2015-04-05 Andy Estes + +[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. + 2015-04-05 Darin Adler FrameView code uses page() without null checking Modified: trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm (182376 => 182377) --- trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm 2015-04-06 04:48:33 UTC (rev 182376) +++ trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm 2015-04-06 05:24:21 UTC (rev 182377) @@ -76,6 +76,11 @@ { #if HAVE(MODERN_NE_FILTER_SOURCE) ASSERT(!request.isNull()); +if (!request.url().protocolIsInHTTPFamily()) { +m_status = NEFilterSourceStatusPass; +return; +} + if (!redirectResponse.isNull()) { responseReceived(redirectResponse); if (!needsMoreData()) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes