Timeline
May 17, 2015:
- 11:31 PM Changeset in webkit [184449] by
-
- 8 edits1 copy in trunk/Source/WebKit2
Network Cache: Make Data::adoptMap take the ownership of the file descriptor
https://bugs.webkit.org/show_bug.cgi?id=144950
Reviewed by Antti Koivisto.
It will be required to implement ShareableResource for soup
network backend. Also move the common code of Data to a common
file and add mapToFile(). The mapFile version that receives a file
descriptor has been renamed to adoptAndMapFile().
- CMakeLists.txt: Add new file to compilation.
- NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
(WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
- NetworkProcess/cache/NetworkCacheData.cpp: Added.
(WebKit::NetworkCache::Data::mapToFile): Write the data to the
given file and map it.
(WebKit::NetworkCache::mapFile):
(WebKit::NetworkCache::adoptAndMapFile):
(WebKit::NetworkCache::computeSHA1):
(WebKit::NetworkCache::bytesEqual):
- NetworkProcess/cache/NetworkCacheData.h:
- NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
- NetworkProcess/cache/NetworkCacheDataSoup.cpp:
(WebKit::NetworkCache::Data::Data): Use a constructor that
receives a file descriptor instead of the one receiving
Backing. If the file descriptor is not -1 then the Data is a map.
(WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
file descriptor.
(WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
to the MapWrapper and create the Data passing the file descriptor.
- UIProcess/API/APIUserContentExtensionStore.cpp:
(API::openAndMapContentExtension): Use mapFile that receives a
file path.
(API::compiledToFile): Use adoptAndMapFile() and don't close the
descriptor.
- 11:26 PM Changeset in webkit [184448] by
-
- 6 edits in trunk/Source
Do not use fastMallocGoodSize anywhere
https://bugs.webkit.org/show_bug.cgi?id=145103
Reviewed by Michael Saboff.
Source/JavaScriptCore:
- assembler/AssemblerBuffer.h:
(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::grow):
Source/WTF:
It is silly we see fastMallocGoodSize in profiles, it does absolutely nothing.
This patch keeps fastMallocGoodSize() around for older code linking
with newer WebKit, but remove any use of it inside WebKit.
- wtf/FastMalloc.cpp:
(WTF::fastMallocGoodSize):
- wtf/FastMalloc.h:
- wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
- 11:23 PM Changeset in webkit [184447] by
-
- 4 edits3 adds in trunk
[JSC] Make StringRecursionChecker faster in the simple cases without any recursion
https://bugs.webkit.org/show_bug.cgi?id=145102
Reviewed by Darin Adler.
Source/JavaScriptCore:
In general, the array targeted by Array.toString() or Array.join() are pretty
simple. In those simple cases, we spend as much time in StringRecursionChecker
as we do on the actual operation.
The reason for this is the HashSet stringRecursionCheckVisitedObjects used
to detect recursion. We are constantly adding and removing objects which
dirty buckets and force constant rehash.
This patch adds a simple shortcut for those simple case: in addition to the HashSet,
we keep a pointer to the root object of the recursion.
In the vast majority of cases, we no longer touch the HashSet at all.
This patch is a 12% progression on the overall score of ArrayWeighted.
- runtime/StringRecursionChecker.h:
(JSC::StringRecursionChecker::performCheck):
(JSC::StringRecursionChecker::~StringRecursionChecker):
- runtime/VM.h:
LayoutTests:
Improve the coverage a tiny bit.
- js/array-string-recursion-expected.txt: Added.
- js/array-string-recursion.html: Added.
- js/script-tests/array-string-recursion.js: Added.
- 11:16 PM Changeset in webkit [184446] by
-
- 3 edits2 adds in trunk
[CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
https://bugs.webkit.org/show_bug.cgi?id=145021
Source/WebCore:
Like for flexboxes we've to take into account the scrollbar logical
width while computing the intrinsic min and max logical widths.
Reviewed by Sergio Villar Senin.
Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
logical width.
LayoutTests:
Reviewed by Sergio Villar Senin.
- fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt: Added.
- fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: Added.
- 8:39 PM Changeset in webkit [184445] by
-
- 12 edits4 adds2 deletes in trunk/Source/JavaScriptCore
Insert store barriers late so that IR transformations don't have to worry about them
https://bugs.webkit.org/show_bug.cgi?id=145015
Reviewed by Geoffrey Garen.
We have had three kinds of bugs with store barriers. For the sake of discussion we say
that a store barrier is needed when we have something like:
base.field = value
- We sometimes fail to realize that we could remove a barrier when value is a non-cell. This might happen if we prove value to be a non-cell even though in the FixupPhase it wasn't predicted non-cell.
- We sometimes have a barrier in the wrong place after object allocation sinking. We might sink an allocation to just above the store, but that puts it just after the StoreBarrier that FixupPhase inserted.
- We don't remove redundant barriers across basic blocks.
This comprehensively fixes these issues by doing store barrier insertion late, and
removing the store barrier elision phase. Store barrier insertion uses an epoch-based
algorithm to determine when stores need barriers. Briefly, a barrier is not needed if
base is in the current GC epoch (i.e. was the last object that we allocated or had a
barrier since last GC) or if base has a newer GC epoch than value (i.e. value would have
always been allocated before base). We do conservative things when merging epoch state
between basic blocks, and we only do such inter-block removal in the FTL. FTL also
queries AI to determine what type we've proved about value, and avoids barriers when
value is not a cell. FixupPhase still inserts type checks on some stores, to maximize
the likelihood that this AI-based removal is effective.
Rolling back in after fixing some debug build test failures.
- CMakeLists.txt:
- JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
- JavaScriptCore.xcodeproj/project.pbxproj:
- dfg/DFGBlockMap.h:
(JSC::DFG::BlockMap::at):
- dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
- dfg/DFGEpoch.h:
(JSC::DFG::Epoch::operator<):
(JSC::DFG::Epoch::operator>):
(JSC::DFG::Epoch::operator<=):
(JSC::DFG::Epoch::operator>=):
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::speculateForBarrier):
(JSC::DFG::FixupPhase::insertStoreBarrier): Deleted.
- dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
- dfg/DFGStoreBarrierElisionPhase.cpp: Removed.
- dfg/DFGStoreBarrierElisionPhase.h: Removed.
- dfg/DFGStoreBarrierInsertionPhase.cpp: Added.
(JSC::DFG::performFastStoreBarrierInsertion):
(JSC::DFG::performGlobalStoreBarrierInsertion):
- dfg/DFGStoreBarrierInsertionPhase.h: Added.
- ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR): Fix an unrelated debug-only bug.
- tests/stress/load-varargs-then-inlined-call-and-exit.js: Test for that debug-only bug.
- tests/stress/load-varargs-then-inlined-call-and-exit-strict.js: Strict version of that test.
- 11:44 AM Changeset in webkit [184444] by
-
- 10 edits in trunk/Source/WebCore
[Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
https://bugs.webkit.org/show_bug.cgi?id=144907
Reviewed by Darin Adler.
Changed the link between readadable stream and reader.
Controller ref()/deref() now increments/decrements its stream ref counter, similarly to ReadableStreamController.
This ensures that even if JS scripts do not keep track of the readable stream,
the readable stream will not be disposed as long as the JS script has access to its reader.
All readers of a given stream are kept by the stream, either in an array (for released readers)
or and in ReadableStream::m_reader for the active reader.
This removes the need for the code synchronizing stream and reader.
As a reader can now already count on its stream, the reader no longer needs to store the error in errored state.
Removal of ReadableJSStream::Reader as closed promise rejection error is directly retrieved from the ReadableStream.
Moved the creation of reader directly in ReadableStream.
Next step should be to remove ReadableStreamReader::m_state and to delegate the handling of ReadableStreamReader closed promise callbacks to ReadableStream.
No change in behavior.
- Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::changeStateToClosed):
(WebCore::ReadableStream::changeStateToErrored):
(WebCore::ReadableStream::getReader):
- Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::reader):
- Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::clean):
(WebCore::ReadableStreamReader::ref):
(WebCore::ReadableStreamReader::deref):
(WebCore::ReadableStreamReader::closed):
(WebCore::ReadableStreamReader::changeStateToClosed):
(WebCore::ReadableStreamReader::changeStateToErrored):
- Modules/streams/ReadableStreamReader.h:
(WebCore::ReadableStreamReader::ReadableStreamReader):
- Modules/streams/ReadableStreamReader.idl:
- bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::getReader):
- bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::closed):
(WebCore::constructJSReadableStreamReader):
- bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::storeError):
(WebCore::ReadableJSStream::ReadableJSStream): Deleted.
- bindings/js/ReadableJSStream.h:
- 10:39 AM Changeset in webkit [184443] by
-
- 2 edits in trunk/Source/WebCore
Crash when uploading huge files to YouTube or Google Drive
https://bugs.webkit.org/show_bug.cgi?id=145083
rdar://problem/15468529
Reviewed by Darin Adler.
This fixes the crash, but uploading will fail.
- fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::start): Tell SubresourceLoader to not store a copy of
all received data, FileReaderLoader has its own buffer.
(WebCore::FileReaderLoader::didReceiveResponse): Fixed a bounds check - not every
64-bit value that doesn't fit into 32 bits is negative. With this, FileReader fails
on huge files right away, as intended.
(WebCore::FileReaderLoader::didReceiveData): Fixed multiple bugs in code that's
executed when size is not available upfront. This is the code that used to crash,
but with the above fix, it's not executed by YouTube.
Not only overflow was handled incorrectly, but even simply growing a buffer for
append was buggy.
- 10:36 AM Changeset in webkit [184442] by
-
- 2 edits in trunk/Tools
bisect-builds: Add 'retry' option when prompting whether the bug reproduced
<http://webkit.org/b/145100>
Reviewed by Darin Adler.
- Scripts/bisect-builds:
- Add PROMPT_ANSWER_* constants for yes/no/retry/broken prompt.
- Switch to using PROMPT_RESPONSE_* constants when testing the value of $didReproduceBug.
- Add do { } while loops to implement 'retry' mode.
(promptForTest):
- Switch to returning PROMPT_RESPONSE_* constants.
- Add support for 'retry' response.
May 16, 2015:
- 5:24 PM Changeset in webkit [184441] by
-
- 7 edits in trunk/Source/WebKit2
[iOS] WKPDFView should not follow javascript: links
https://bugs.webkit.org/show_bug.cgi?id=145101
Reviewed by Dan Bernstein.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
(WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
reflect that this function is exclusively for following PDF links.
- UIProcess/WebPageProxy.h:
- UIProcess/ios/WKPDFView.mm:
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
(-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
(WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
- WebProcess/WebPage/WebPage.h:
- WebProcess/WebPage/WebPage.messages.in:
- 4:24 PM Changeset in webkit [184440] by
-
- 3 edits4 adds in trunk
REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels.
https://bugs.webkit.org/show_bug.cgi?id=145097
rdar://problem/18588415
Reviewed by Simon Fraser.
Dashed and dotted border painting needs clipping in order to properly display corners.
Similarly to solid border's quad calculation, we pixelsnap the border positions before computing the clipping quad values.
Source/WebCore:
Test: fast/borders/dashed-border-on-subpixel-position.html
fast/borders/dotted-border-on-subpixel-position.html
- rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
LayoutTests:
- fast/borders/dashed-border-on-subpixel-position-expected.html: Added.
- fast/borders/dashed-border-on-subpixel-position.html: Added.
- fast/borders/dotted-border-on-subpixel-position-expected.html: Added.
- fast/borders/dotted-border-on-subpixel-position.html: Added.
- 4:00 PM Changeset in webkit [184439] by
-
- 4 edits in trunk/Source/WebKit2
[iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
https://bugs.webkit.org/show_bug.cgi?id=145059
<rdar://problem/20975978>
Reviewed by Simon Fraser.
The web view needs to update its scroll snap point offsets to take into account any
adjustments to the view size caused by content insets. We also need to update the
offstes after device rotation.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
computed content inset for the view and incorporate into any scroll snap point adjustments.
(-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points,
- UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
- UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
for content inset.
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
active index is valid.
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
current active snap offset index.
(WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
(WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
scroll position incorporating any snap point and content insets.
- 2:01 PM Changeset in webkit [184438] by
-
- 11 edits1 move1 add1 delete in trunk/Source/JavaScriptCore
Unreviewed, rolling out r184415.
https://bugs.webkit.org/show_bug.cgi?id=145096
Broke several tests (Requested by msaboff on #webkit).
Reverted changeset:
"Insert store barriers late so that IR transformations don't
have to worry about them"
https://bugs.webkit.org/show_bug.cgi?id=145015
http://trac.webkit.org/changeset/184415
- 1:00 PM Changeset in webkit [184437] by
-
- 3 edits in trunk/Source/WebCore
Remove styleText() and applyStyleText() from InspectorStyle.
https://bugs.webkit.org/show_bug.cgi?id=145093
Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-16
Reviewed by Darin Adler.
styleText() and applyStyleText() in InspectorStyle are private aliases for the public
accessors in the same class but are rarely used. I think it would be better off removing
these aliases and updating all the current call sites to use the public accessors directly
as noted in InspectorStyleSheet.h.
No new tests, no behavior change.
- inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::populateAllProperties):
- inspector/InspectorStyleSheet.h:
- 12:57 PM Changeset in webkit [184436] by
-
- 3 edits in trunk/Source/WebCore
Remove MessageType variant of addMessageToConsole() from ChromeClient.
https://bugs.webkit.org/show_bug.cgi?id=145095
Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-16
Reviewed by Darin Adler.
All addMessageToConsole() in ChromeClient are exactly the same thing.
So there is no reason to keep all this methods.
No new tests, no behavior change.
- page/ChromeClient.h:
- page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
- 11:16 AM Changeset in webkit [184435] by
-
- 12 edits1 copy2 adds in trunk
Add getElementById to DocumentFragment
https://bugs.webkit.org/show_bug.cgi?id=145094
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Match the latest DOM standard and other browsers by adding getElementById
to DocumentFragment in addition to Document and SVGSVGElement. Add NonElementParentNode
interface that the DOM standard defines.
Test: fast/dom/DocumentFragment/getElementById.html
- DerivedSources.make:
- WebCore.xcodeproj/project.pbxproj:
Add NonElementParentNode.idl
- dom/Document.idl:
Mark Document as implementing NonElementParentNode and remove now redundant getElementById
declaration.
- dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::getElementById):
- dom/DocumentFragment.h:
Add implementation of getElementById for DocumentFragments. Add a fast path for ShadowRoots
which can take advantage of the fact that they are TreeScopes to use the elements by id cache
in TreeScrope.
- dom/DocumentFragment.idl:
Mark DocumentFragment as implementing NonElementParentNode.
- dom/NonElementParentNode.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl.
Added.
- svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):
- svg/SVGSVGElement.h:
- svg/SVGSVGElement.idl:
Convert to taking an AtomicString to match other getElementByIds.
LayoutTests:
- fast/dom/DocumentFragment/getElementById-expected.txt: Added.
- fast/dom/DocumentFragment/getElementById.html: Added.
- 6:53 AM Changeset in webkit [184434] by
-
- 11 edits2 adds in trunk
When redirecting to data URL use HTTP response for same origin policy checks
https://bugs.webkit.org/show_bug.cgi?id=145054
rdar://problem/20299050
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Test: http/tests/security/canvas-remote-read-data-url-image-redirect.html
- dom/ScriptElement.cpp:
(WebCore::ScriptElement::notifyFinished):
- dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
- html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
- loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
- loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::responseReceived):
- loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished):
- loader/cache/CachedImage.cpp:
(WebCore::CachedImage::isOriginClean):
- loader/cache/CachedResource.cpp:
(WebCore::CachedResource::passesAccessControlCheck):
(WebCore::CachedResource::passesSameOriginPolicyCheck):
Factor repeatedly used same origin policy test into a function.
(WebCore::CachedResource::redirectReceived):
When redirecting to a data URL save the redirect response.
(WebCore::CachedResource::responseForSameOriginPolicyChecks):
In case we got redirected to data use that response instead of the final data response for policy checks.
- loader/cache/CachedResource.h:
LayoutTests:
- http/tests/security/canvas-remote-read-data-url-image-redirect-expected.txt: Added.
- http/tests/security/canvas-remote-read-data-url-image-redirect.html: Added.
- 12:52 AM Changeset in webkit [184433] by
-
- 2 edits in trunk/Source/WebCore
[iOS] wireless playback picker button is drawn incorrectly
https://bugs.webkit.org/show_bug.cgi?id=145057
rdar://problem/20877518
Reviewed by Jer Noble.
- Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessTargetPickerButton): This method is
defined in Controller, but is only meant to run on Macs. Override it with
an empty function for iOS.
- 12:11 AM Changeset in webkit [184432] by
-
- 2 edits in trunk/Tools
[EFL][WK2] Minibrowser : Add search icon to search bar
https://bugs.webkit.org/show_bug.cgi?id=139773
Patch by Tanay C <tanay.c@samsung.com> on 2015-05-16
Reviewed by Gyuyoung Kim.
- MiniBrowser/efl/main.c:
(search_icon_show): Added.
(search_box_show): Modified.