⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Feb 26, 2017:

11:59 PM Changeset in webkit [213035] by zandobersek@gmail.com
  • 6 edits in trunk/Source

[CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
https://bugs.webkit.org/show_bug.cgi?id=168903

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Remove the GraphicsContext pointer member from the TextureMapper class
since the getter and setter methods are not used anywhere.

  • platform/graphics/texmap/TextureMapper.cpp:

(WebCore::TextureMapper::TextureMapper):

  • platform/graphics/texmap/TextureMapper.h:

(WebCore::TextureMapper::setGraphicsContext): Deleted.
(WebCore::TextureMapper::graphicsContext): Deleted.

Source/WebKit2:

Remove the CoordinatedGraphicsScene::paintToGraphicsContext() method as it
is not used anywhere. Also enables removing the GraphicsContext pointer
member from the TextureMapper class.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): Deleted.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
11:59 PM Changeset in webkit [213034] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r212726 - Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
https://bugs.webkit.org/show_bug.cgi?id=168659
rdar://problem/22781730

Patch by Maureen Daum <mdaum@apple.com> on 2017-02-21
Reviewed by Brady Eidson.

Check what LocalStorage data exists in deleteDatabasesModifiedSince() before attempting deletion.
It is possible that another process has caused information to be added to LocalStorage
after we created this LocalStorageDatabaseTracker instance, so we should update our
internal state by checking the contents of StorageTracker.db and the other local
storage files so we know what databases actually exist. By calling importOriginIdentifiers()
at the start of deleteDatabasesModifiedSince(), m_origins will now have the up-to-date
list of origins LocalStorage contains data for.

  • UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):

11:56 PM Changeset in webkit [213033] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r212710 - ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
https://bugs.webkit.org/show_bug.cgi?id=168605

Reviewed by Saam Barati.

JSTests:

  • modules/module-namespace-is-frozen.js: Added.

(from.string_appeared_here.shouldThrow):
(export.b):

  • modules/module-namespace-is-sealed.js: Added.

(from.string_appeared_here.shouldThrow):
(export.b):

Source/JavaScriptCore:

We should check exception state after calling getOwnPropertyDescriptor() since it can throw errors.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):

11:55 PM Changeset in webkit [213032] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r212698 - ASSERTION FAILED: m_normalWorld->hasOneRef() under WorkerThread::stop
https://bugs.webkit.org/show_bug.cgi?id=168356
<rdar://problem/30592486>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-20
Reviewed by Ryosuke Niwa.

Source/WebCore:

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::removeAllEventListeners):
Remove Performance object EventListeners.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::removeAllEventListeners):
(WebCore::WorkerGlobalScope::performance):

  • workers/WorkerGlobalScope.h:

Remove Performance object EventListeners.
Also clear Performance early in destruction since its ContextDestructionObserver
destruction makes checks about the WorkerThread.

LayoutTests:

Unskip tests now that they no longer trigger assertions.

11:52 PM Changeset in webkit [213031] by Carlos Garcia Campos
  • 7 edits
    1 add in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r213030 - [GTK] Hangs when showing Google search results
https://bugs.webkit.org/show_bug.cgi?id=168699

Reviewed by Žan Doberšek.

Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
to its own header file to be able to use std::unique_ptr member to save the pending message.

  • Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
  • Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
  • Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.

(IPC::GSocketMonitor::start):

  • Platform/IPC/glib/GSocketMonitor.h:
  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
the descriptor. We were leaking it if the connection was invalidated without being opened.
(IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
(IPC::Connection::processMessage):
(IPC::Connection::open):
(IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
m_isConnected because the caller already checks that.
(IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
sendOutputMessage() to do the rest.
(IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
to be sent later when the socket is writable.

  • Platform/IPC/unix/UnixMessage.h: Added.

(IPC::MessageInfo::MessageInfo):
(IPC::MessageInfo::setMessageBodyIsOutOfLine):
(IPC::MessageInfo::isMessageBodyIsOutOfLine):
(IPC::MessageInfo::bodySize):
(IPC::MessageInfo::attachmentCount):
(IPC::UnixMessage::UnixMessage):
(IPC::UnixMessage::~UnixMessage):
(IPC::UnixMessage::attachments):
(IPC::UnixMessage::messageInfo):
(IPC::UnixMessage::body):
(IPC::UnixMessage::bodySize):
(IPC::UnixMessage::appendAttachment):

  • PlatformGTK.cmake:
11:50 PM Changeset in webkit [213030] by Carlos Garcia Campos
  • 7 edits
    1 add in trunk/Source/WebKit2

[GTK] Hangs when showing Google search results
https://bugs.webkit.org/show_bug.cgi?id=168699

Reviewed by Žan Doberšek.

Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
to its own header file to be able to use std::unique_ptr member to save the pending message.

  • Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
  • Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
  • Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.

(IPC::GSocketMonitor::start):

  • Platform/IPC/glib/GSocketMonitor.h:
  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
the descriptor. We were leaking it if the connection was invalidated without being opened.
(IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
(IPC::Connection::processMessage):
(IPC::Connection::open):
(IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
m_isConnected because the caller already checks that.
(IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
sendOutputMessage() to do the rest.
(IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
to be sent later when the socket is writable.

  • Platform/IPC/unix/UnixMessage.h: Added.

(IPC::MessageInfo::MessageInfo):
(IPC::MessageInfo::setMessageBodyIsOutOfLine):
(IPC::MessageInfo::isMessageBodyIsOutOfLine):
(IPC::MessageInfo::bodySize):
(IPC::MessageInfo::attachmentCount):
(IPC::UnixMessage::UnixMessage):
(IPC::UnixMessage::~UnixMessage):
(IPC::UnixMessage::attachments):
(IPC::UnixMessage::messageInfo):
(IPC::UnixMessage::body):
(IPC::UnixMessage::bodySize):
(IPC::UnixMessage::appendAttachment):

  • PlatformGTK.cmake:
11:43 PM Changeset in webkit [213029] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r212693 - Simple line layout: Implement absoluteQuadsForRange.
https://bugs.webkit.org/show_bug.cgi?id=168613
<rdar://problem/30614618>

Reviewed by Simon Fraser.

Source/WebCore:

This patch ensures that the commonly used Range::getClientRects calls do not
throw us off of the simple line layout path.

Test: fast/dom/Range/simple-line-layout-getclientrects.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteQuadsForRange):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Special case empty ranges with multiple empty runs.

  • rendering/SimpleLineLayoutFunctions.h:
  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets):

  • rendering/SimpleLineLayoutResolver.h:

LayoutTests:

  • fast/dom/Range/simple-line-layout-getclientrects-expected.html: Added.
  • fast/dom/Range/simple-line-layout-getclientrects.html: Added.
11:43 PM Changeset in webkit [213028] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16

Merge r212882 - [GTK] Compilation fails if using ninja together with icecream and cmake > 3.5
https://bugs.webkit.org/show_bug.cgi?id=168770

Reviewed by Carlos Garcia Campos.

If using cmake >= 3.6 together with ninja generator and icecream, the
build will fail as icecream does not correctly handle the response
files and it's not passing compiler flags from there to the compiler
itself (in our case it's not passing -fPIC which leads to the
failure while linking). Don't enable the ninja's response files
support if we fulfill the preconditions.

  • Source/cmake/OptionsCommon.cmake:
10:48 PM Changeset in webkit [213027] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. Bump GTK+ versions numbers.

  • Source/cmake/OptionsGTK.cmake:
10:44 PM Changeset in webkit [213026] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed, rolling out r213024.

Wrong version numbers

Reverted changeset:

"[GTK] Unreviewed, bump GTK version numbers also on trunk"
http://trac.webkit.org/changeset/213024

10:31 PM Changeset in webkit [213025] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Web Inspector: RTL: Docking Left doesn't constrain the page width
https://bugs.webkit.org/show_bug.cgi?id=168862

Patch by Devin Rousso <Devin Rousso> on 2017-02-26
Reviewed by Brian Burg.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
Calculate the inspectedViewFrame to be the remaining space after WebInspector is opened
instead of using the original page size.

10:03 PM Changeset in webkit [213024] by Michael Catanzaro
  • 2 edits in trunk

[GTK] Unreviewed, bump GTK version numbers also on trunk

  • Source/cmake/OptionsGTK.cmake:
9:20 PM Changeset in webkit [213023] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Stop exporting C++ member variables from WKDOMTextIterator
https://bugs.webkit.org/show_bug.cgi?id=168885

Reviewed by Dan Bernstein.

  • WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
8:31 PM Changeset in webkit [213022] by ap@apple.com
  • 3 edits in trunk/Source/WebKit2

Add preprocessor guards to Mac specific files that are exposed as private headers on iOS
https://bugs.webkit.org/show_bug.cgi?id=168878

Reviewed by Dan Bernstein.

  • UIProcess/API/C/WKInspector.h:
  • WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h:
4:54 PM Changeset in webkit [213021] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove spurious C++ include from _WKTestingDelegate.h
https://bugs.webkit.org/show_bug.cgi?id=168877

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/_WKTestingDelegate.h:
4:36 PM Changeset in webkit [213020] by mmaxfield@apple.com
  • 10 edits
    4 adds in trunk/Source

Stop compiling our own cursorMovementIterator()
https://bugs.webkit.org/show_bug.cgi?id=168211

Reviewed by David Hyatt.

Source/WebCore:

Covered by existing tests.

Hook up the caret iterator.

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::offsetForPosition):

  • rendering/RenderText.cpp:

(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):

  • rendering/RenderText.h:

Source/WTF:

This patch creates a unified Text Breaking API, which can be backed by either ICU
or CoreFoundation (for ports which can use it). Rather than using inheritance and
virtual functions to implement this, because there are only two subclasses, the
simpler option of just using a Variant is used instead. There is also a cache which
allows you to reuse iterators without reconstructing them. This cache is better
than the previous method of having a single static iterator because the cache
lets you use two iterators simultaneously.

In the future, I will hook up all iterators to use this shared class. However, for
this patch, I've only hooked up the caret position iterator (backed by CoreFoundation
on Cocoa ports and UBRK_CHARACTER on other ports).

  • WTF.xcodeproj/project.pbxproj:
  • wtf/spi/cf/CFStringSPI.h: Added.
  • wtf/text/TextBreakIterator.cpp:

(WTF::initializeIteratorWithRules): Deleted.
(WTF::cursorMovementIterator): Deleted.

  • wtf/text/TextBreakIterator.h:

(WTF::TextBreakIterator::preceding):
(WTF::TextBreakIterator::following):
(WTF::TextBreakIterator::isBoundary):
(WTF::TextBreakIterator::setText):
(WTF::TextBreakIterator::mode):
(WTF::TextBreakIterator::locale):
(WTF::TextBreakIteratorCache::singleton):
(WTF::TextBreakIteratorCache::take):
(WTF::TextBreakIteratorCache::put):
(WTF::TextBreakIteratorCache::TextBreakIteratorCache):

  • wtf/text/cf/TextBreakIteratorCF.h: Added.

(WTF::TextBreakIteratorCF::TextBreakIteratorCF):
(WTF::TextBreakIteratorCF::setText):
(WTF::TextBreakIteratorCF::preceding):
(WTF::TextBreakIteratorCF::following):
(WTF::TextBreakIteratorCF::isBoundary):

  • wtf/text/icu/TextBreakIteratorICU.h: Added.

(WTF::TextBreakIteratorICU::set8BitText):
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::TextBreakIteratorICU::operator=):
(WTF::TextBreakIteratorICU::~TextBreakIteratorICU):
(WTF::TextBreakIteratorICU::setText):
(WTF::TextBreakIteratorICU::preceding):
(WTF::TextBreakIteratorICU::following):
(WTF::TextBreakIteratorICU::isBoundary):

  • wtf/text/icu/UTextProviderLatin1.h:
  • wtf/text/mac/TextBreakIteratorInternalICUMac.mm:

(WTF::mapModeToBackingIterator):
(WTF::TextBreakIterator::TextBreakIterator):

4:32 PM Changeset in webkit [213019] by commit-queue@webkit.org
  • 29 edits
    4 adds in trunk

op_get_by_id_with_this should use inline caching
https://bugs.webkit.org/show_bug.cgi?id=162124

Patch by Caio Lima <Caio Lima> on 2017-02-26
Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/super-getter.js: Added.

(A.prototype.get f):
(A):
(B.prototype.get f):
(B):

  • stress/super-force-ic-fail.js: Added.

(let.assert):
(let.aObj.get foo):
(let.obj.jaz):
(let.bObj.get foo):
(let.obj2.foo):

  • stress/super-get-by-id.js: Added.

(assert):
(Base):
(Base.prototype.get name):
(Base.prototype.set name):
(Subclass.prototype.get name):
(Subclass):
(getterName):
(getterValue):
(PolymorphicSubclass.prototype.get value):
(PolymorphicSubclass):
(i.let.BaseCode):
(i.get value):
(MegamorphicSubclass.prototype.get value):
(MegamorphicSubclass):
(let.subObj.get value):
(i.catch):
(subObj.get value):
(BaseException):
(BaseException.prototype.get name):
(SubclassException.prototype.get name):
(SubclassException):
(prototype.foo):
(prototype.get name):
(SubclassExceptionComplex.prototype.get name):
(SubclassExceptionComplex):

  • stress/super-getter-reset-ic.js: Added.

(let.assert):
(let.B.f):

Source/JavaScriptCore:

This patch is enabling inline cache for op_get_by_id_with_this in all
tiers. It means that operations using super.member are going to
be able to be optimized by PIC. To enable it, we introduced a new
member of StructureStubInfo.patch named thisGPR, created a new class
to manage the IC named JITGetByIdWithThisGenerator and changed
PolymorphicAccess.regenerate that uses StructureStubInfo.patch.thisGPR
to decide the correct this value on inline caches.
With inline cached enabled, super.member are ~4.5x faster,
according microbenchmarks.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:
  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addGetByIdWithThis):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileIn):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/ICStats.h:
  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):

  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):

  • jit/Repatch.cpp:

(JSC::appropriateOptimizingGetByIdFunction):
(JSC::appropriateGenericGetByIdFunction):
(JSC::tryCacheGetByID):

  • jit/Repatch.h:
  • jsc.cpp:

(WTF::CustomGetter::getOwnPropertySlot):
(WTF::CustomGetter::customGetterAcessor):

4:17 PM Changeset in webkit [213018] by ap@apple.com
  • 3 edits in trunk/Source/WebKit/mac

Don't import RetainPtr in WebNotification.h
https://bugs.webkit.org/show_bug.cgi?id=168876

Reviewed by Dan Bernstein.

This is an Objective-C SPI header.

  • WebView/WebNotification.h:
  • WebView/WebNotification.mm:

(-[WebNotification initWithCoreNotification:notificationID:]):
(-[WebNotification dealloc]):

4:16 PM Changeset in webkit [213017] by aakash_jain@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Simplify EXPORTED_SYMBOLS_FILE variables in WebKitLegacy.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=168819

Reviewed by Dan Bernstein.

  • Configurations/WebKitLegacy.xcconfig:
4:13 PM Changeset in webkit [213016] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
https://bugs.webkit.org/show_bug.cgi?id=168880

Reviewed by Dan Bernstein.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
4:13 PM Changeset in webkit [213015] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove leftover WebKit2 C API function declarations
https://bugs.webkit.org/show_bug.cgi?id=168879

Reviewed by Tim Horton.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
4:12 PM Changeset in webkit [213014] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove some old WKSecurityOrigin binary compatibility stubs
https://bugs.webkit.org/show_bug.cgi?id=168881

Reviewed by Dan Bernstein.

  • Shared/API/c/WKSecurityOriginRef.cpp:

(WKSecurityOriginGetHost): Deleted.
(WKSecurityOriginGetProtocol): Deleted.

3:40 PM Changeset in webkit [213013] by commit-queue@webkit.org
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r212942.
https://bugs.webkit.org/show_bug.cgi?id=168882

Made EWS very flaky (Requested by ap on #webkit).

Reverted changeset:

"[Modern Media Controls] Dragging controls in fullscreen on
macOS prevents scrubbing or interacting with controls"
https://bugs.webkit.org/show_bug.cgi?id=168820
http://trac.webkit.org/changeset/212942

3:06 PM Changeset in webkit [213012] by Wenson Hsieh
  • 6 edits
    1 copy
    1 add in trunk

REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
https://bugs.webkit.org/show_bug.cgi?id=168821
<rdar://problem/30690431>

Reviewed by Tim Horton.

Source/WebKit2:

Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

Tools:

Adds the ability for TestWKWebView to send a sequence of clicks to its window, and uses this capability to
verify that double clicking to select a word in a WKWebView on Mac selects just the word, and not a trailing
space along with it.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/double-click-does-not-select-trailing-space.html: Added.
  • TestWebKitAPI/Tests/mac/WKWebViewSelectionTests.mm: Copied from Tools/TestWebKitAPI/cocoa/TestWKWebView.h.

(TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:clickCount:]):
(-[TestWKWebViewHostWindow _mouseUpAtPoint:clickCount:]):
(-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView mouseUpAtPoint:]):
(-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:]): Deleted.
(-[TestWKWebViewHostWindow _mouseUpAtPoint:]): Deleted.

10:36 AM Changeset in webkit [213011] by Simon Fraser
  • 3 edits in trunk/Tools

Make check-webkit-style do some basic validation for CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=168874

Reviewed by Zalan Bujtas.

Do checking of the keys and the value types.

Print exceptions if they occur; previously, coding errors caused silent failure.

  • Scripts/webkitpy/style/checker.py:

(CheckerDispatcher._create_checker):

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONFeaturesChecker.check):
(JSONCSSPropertiesChecker):
(JSONCSSPropertiesChecker.check):
(JSONCSSPropertiesChecker.validate_comment):
(JSONCSSPropertiesChecker.validate_type):
(JSONCSSPropertiesChecker.validate_boolean):
(JSONCSSPropertiesChecker.validate_string):
(JSONCSSPropertiesChecker.validate_array):
(JSONCSSPropertiesChecker.validate_codegen_properties):
(JSONCSSPropertiesChecker.check_property):
(JSONCSSPropertiesChecker.check_codegen_properties):

10:31 AM Changeset in webkit [213010] by Chris Dumez
  • 9 edits
    1 add in trunk

HitTestResult's linkSuggestedFilename should sanitize download attribute
https://bugs.webkit.org/show_bug.cgi?id=168856
<rdar://problem/30683109>

Reviewed by Antti Koivisto.

Source/WebCore:

HitTestResult's linkSuggestedFilename should sanitize download attribute.
This is used by the context menu's "Download Linked File" & "Download Linked
File As..." actions.

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::linkSuggestedFilename):

  • rendering/HitTestResult.h:

Source/WebKit2:

HitTestResult's linkSuggestedFilename should sanitize download attribute.
This is used by the context menu's "Download Linked File" & "Download Linked
File As..." actions.

  • Shared/WebHitTestResultData.cpp:

(WebKit::WebHitTestResultData::WebHitTestResultData):

  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:

(WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):

Tools:

Add test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/link-with-download-attribute-with-slashes.html: Added.
  • TestWebKitAPI/Tests/WebKit2/mac/ContextMenuDownload.mm:

(TestWebKitAPI::decideDestinationWithSuggestedFilenameContainingSlashes):
(TestWebKitAPI::TEST):

Feb 25, 2017:

11:19 PM Changeset in webkit [213009] by Alan Bujtas
  • 6 edits
    2 adds in trunk/Source/WebCore

Simple line layout: Move coverage functions out of SimpleLineLayout.cpp
https://bugs.webkit.org/show_bug.cgi?id=168872

Reviewed by Simon Fraser.

SimpleLineLayout.cpp is for core functions only.

No change in functionality.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderingAllInOne.cpp:
  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::printReason): Deleted.
(WebCore::SimpleLineLayout::printReasons): Deleted.
(WebCore::SimpleLineLayout::printTextForSubtree): Deleted.
(WebCore::SimpleLineLayout::textLengthForSubtree): Deleted.
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows): Deleted.
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage): Deleted.
(WebCore::SimpleLineLayout::toggleSimpleLineLayout): Deleted.
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList): Deleted.
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage): Deleted.

  • rendering/SimpleLineLayout.h:
  • rendering/SimpleLineLayoutCoverage.cpp: Added.

(WebCore::SimpleLineLayout::printReason):
(WebCore::SimpleLineLayout::printReasons):
(WebCore::SimpleLineLayout::printTextForSubtree):
(WebCore::SimpleLineLayout::textLengthForSubtree):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):

  • rendering/SimpleLineLayoutCoverage.h: Added.
2:18 PM Changeset in webkit [213008] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Text might wrap when its preferred logical width is used for sizing the containing block.
https://bugs.webkit.org/show_bug.cgi?id=168864
<rdar://problem/30690734>

Reviewed by Antti Koivisto.

Source/WebCore:

In certain cases we end up measuring a text run in 2 different ways.

  1. preferred width computation -> slow path FontCascade::width()
  2. line breaking logic -> fast path FontCascade::widthForSimpleText()

FontCascade::width() and ::widthForSimpleText() might return different results for the same run even when
the individual glyph widths are measured to be the same. It's because they run diffrent set of
arithmetics on the float values and for certain values these arithmetics produce different results due to the floating point
precision.
Since RenderText::computePreferredLogicalWidths() currently forces us to use the slow path
(to retrieve fontfallback and glyph overflow information) the only alternative solution is to turn off the fast path
for all runs that have been already measured using the slow path (which would be just wasteful).

Test: fast/text/fast-run-width-vs-slow-run-width.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText): Mimics WidthIterator::applyFontTransforms. Use the same set of arithmetics here.

LayoutTests:

  • fast/text/fast-run-width-vs-slow-run-width-expected.html: Added.
  • fast/text/fast-run-width-vs-slow-run-width.html: Added.
11:02 AM Changeset in webkit [213007] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Improve how multiple codegen-properties are handled in CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=168867

Reviewed by Zalan Bujtas.

To make upcoming metadata storage easier, it's better if property entries in CSSProperties.json
are always hashes. One property (line-height) used an array, in order to represent settings for
two different build flags (ENABLE_TEXT_AUTOSIZING and !ENABLE_TEXT_AUTOSIZING).

Fix by making "codegen-properties" optionally be an array. The relevant item is selected in
removeInactiveCodegenProperties() and used to replace the array.

Sort @internalProprerties when generating code, otherwise the contents of isInternalCSSProperty()
are unstable (the order in @allNames is not stable because it's the keys in a hash).

  • css/CSSProperties.json:
  • css/makeprop.pl:

(matchEnableFlags):
(removeInactiveCodegenProperties):
(isPropertyEnabled):

8:33 AM Changeset in webkit [213006] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed GTK test gardening

  • platform/gtk/TestExpectations:
7:47 AM Changeset in webkit [213005] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

[GTK] Unreviewed, document deficiency in webkit_website_data_manager_clear() API

Document that this function cannot currently delete cookie data for a particular period of
time.

  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
1:23 AM Changeset in webkit [213004] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: add support for Color Picker
https://bugs.webkit.org/show_bug.cgi?id=168853

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Views/ColorPicker.css:

(.color-picker):
(body[dir=ltr] .color-picker > .brightness):
(body[dir=rtl] .color-picker > .brightness):
(body[dir=ltr] .color-picker > .opacity):
(body[dir=rtl] .color-picker > .opacity):
(.color-picker > .brightness): Deleted.
(.color-picker > .opacity): Deleted.

  • UserInterface/Views/ColorWheel.js:

(WebInspector.ColorWheel.prototype.set dimension):
Set the CSS width and height style of the container element to ensure that the element only
takes up the space it needs.

  • UserInterface/Views/Slider.css:

(.slider):

  • UserInterface/Views/Variables.css:

(:root):
Add --slider-height CSS variable for convenience.

12:58 AM Changeset in webkit [213003] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Commit should order by 'commit_order' as secondary key.
https://bugs.webkit.org/show_bug.cgi?id=168866

Reviewed by Ryosuke Niwa.

Currently, commits are sorted by 'commit_time' only.
We should use 'commit_order' as secondary key when 'commit_time' is equal or null.

  • public/include/commit-log-fetcher.php:
  • public/include/db.php:
  • server-tests/api-commits.js:

(return.addSlaveForReport.subversionCommits.then):
(then):

12:44 AM Changeset in webkit [213002] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: add support for Bezier/Spring editor
https://bugs.webkit.org/show_bug.cgi?id=168854

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Views/BezierEditor.css:

(.bezier-editor):
(body[dir=ltr] .bezier-editor):
(body[dir=rtl] .bezier-editor):
(.bezier-editor > .bezier-preview-timing):
(body[dir=ltr] .bezier-editor > .bezier-preview-timing):
(body[dir=rtl] .bezier-editor > .bezier-preview-timing):
(@keyframes bezierPreview):
(body[dir=rtl] .bezier-editor > .bezier-container):
(.bezier-editor > .number-input-container > input):
(body[dir=ltr] .bezier-editor > .number-input-container > input):
(body[dir=rtl] .bezier-editor > .number-input-container > input):

  • UserInterface/Views/SpringEditor.css:

(.spring-editor > .spring-timing):
(.spring-editor > .spring-timing::before):
(.spring-editor > .spring-timing::after):
(body[dir=ltr] .spring-editor > .spring-timing::before, body[dir=rtl] .spring-editor > .spring-timing::after):
(body[dir=ltr] .spring-editor > .spring-timing::after, body[dir=rtl] .spring-editor > .spring-timing::before):
(.spring-editor > .number-input-container > .number-input-row > input):

  • UserInterface/Views/SpringEditor.js:

(WebInspector.SpringEditor.prototype._updatePreviewAnimation):

12:43 AM Changeset in webkit [213001] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: Elements tab Styles sidebar label/arrows need adjustment
https://bugs.webkit.org/show_bug.cgi?id=168746

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Views/ScopeRadioButtonNavigationItem.css:

(.scope-radio-button-navigation-item):
(.scope-radio-button-navigation-item > .scope-radio-button-item-select):
(body[dir=ltr] .scope-radio-button-navigation-item > .scope-radio-button-item-select):
(body[dir=rtl] .scope-radio-button-navigation-item > .scope-radio-button-item-select):
(.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus):
(.scope-radio-button-navigation-item > .arrows):
(body[dir=ltr] .scope-radio-button-navigation-item > .arrows):
(body[dir=rtl] .scope-radio-button-navigation-item > .arrows):

12:29 AM Changeset in webkit [213000] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: copying a search result out of Search Tab navigation sidebar does nothing
https://bugs.webkit.org/show_bug.cgi?id=167074

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WebInspector._copy):

  • UserInterface/Views/SearchTabContentView.js:

(WebInspector.SearchTabContentView.prototype.handleCopyEvent):
Provide the container TabContentView with the opportunity to intercept the copy event.

  • UserInterface/Models/SourceCodeTextRange.js:

(WebInspector.SourceCodeTextRange.prototype.get synthesizedTextValue):

  • UserInterface/Views/SearchResultTreeElement.js:

(WebInspector.SearchResultTreeElement.prototype.get synthesizedTextValue):
Generate a string with the format ${url}:${lineNumber}:${resultLine}.

12:08 AM Changeset in webkit [212999] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: Styles - Rules sidebar icons are misaligned
https://bugs.webkit.org/show_bug.cgi?id=168807

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Views/CSSStyleDeclarationSection.css:

(.style-declaration-section > .header):
(body[dir=ltr] .style-declaration-section > .header):
(body[dir=rtl] .style-declaration-section > .header):
(.style-declaration-section.locked > .header > .locked-icon):
(body[dir=ltr] .style-declaration-section.locked > .header > .locked-icon):
(body[dir=rtl] .style-declaration-section.locked > .header > .locked-icon):
(.style-declaration-section > .header > .icon):
(body[dir=ltr] .style-declaration-section > .header > .icon):
(body[dir=rtl] .style-declaration-section > .header > .icon):
(.style-declaration-section > .header > textarea):
(body[dir=ltr] .style-declaration-section > .header > textarea):
(body[dir=rtl] .style-declaration-section > .header > textarea):
(.style-declaration-section.invalid-selector > .header > .icon):

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.css:

(.sidebar > .panel.details.css-style > .content):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
(body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
(body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
(body[dir=ltr] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):
(body[dir=rtl] .sidebar > .panel.details.css-style > .content ~ .class-list-container > .new-class > .class-name-input):

  • UserInterface/Views/Variables.css:

(:root):

12:05 AM Changeset in webkit [212998] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: disclosure triangles in details section headers should be flipped and aligned right
https://bugs.webkit.org/show_bug.cgi?id=168283

Patch by Devin Rousso <Devin Rousso> on 2017-02-25
Reviewed by Brian Burg.

  • UserInterface/Views/DetailsSection.css:

(.details-section):
(.details-section > .header):
(body[dir=ltr] .details-section > .header):
(body[dir=rtl] .details-section > .header):
(.details-section > .header > .options > .navigation-bar):
(body[dir=ltr] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar), body[dir=rtl] .details-section > .header::before):
(body[dir=ltr] .details-section > .header::before, body[dir=rtl] .details-section > .header > :matches(label, .node-link, .go-to-arrow, .options > .navigation-bar)):
(.details-section > .header::before):
(body[dir=rtl] .details-section > .header::before):
(.details-section > .header > label):
(.details-section > .header > label > input[type="checkbox"]):
(body[dir=ltr] .details-section > .header > label > input[type="checkbox"]):
(body[dir=rtl] .details-section > .header > label > input[type="checkbox"]):
(.details-section > .header .go-to-arrow):
(body[dir=ltr] .details-section > .header .go-to-arrow):
(body[dir=rtl] .details-section > .header .go-to-arrow):
(.details-section > .content > .group > .row.simple > .label):
(body[dir=ltr] .details-section > .content > .group > .row.simple > .label):
(body[dir=rtl] .details-section > .content > .group > .row.simple > .label):
(.details-section > .content > .group > .row.simple > .value):
(body[dir=ltr] .details-section > .content > .group > .row.simple > .value):
(body[dir=rtl] .details-section > .content > .group > .row.simple > .value):
(.details-section > .content > .group > .row.simple > .value .go-to-arrow):
(body[dir=ltr] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
(body[dir=rtl] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
(.details-section > .header > :matches(.node-link, .go-to-arrow)): Deleted.

12:02 AM Changeset in webkit [212997] by rniwa@webkit.org
  • 7 edits in trunk/Websites/perf.webkit.org

REGRESSION(r212853): Comparisons to baseline no longer shows up
https://bugs.webkit.org/show_bug.cgi?id=168863

Reviewed by Joseph Pecoraro.

The bug was caused by ChartStatusView's code not being updated to use TimeSeriesView's.
Updated the code to use TimeSeriesView's methods to fix the bug.

Also made InteractiveTimeSeriesChart's currentPoint to return a (TimeSeriesView, point, isLocked) tuple
to consolidate it with lockedIndicator() to work towards making the baseline data points selectable.

  • browser-tests/time-series-chart-tests.js: Updated the test cases to use currentIndicator, and added

test cases for newly added lastPointInTimeRange.

  • public/v3/components/chart-pane.js:

(ChartPane.prototype.serializeState): Updated to use currentIndicator.
(ChartPane.prototype._renderFilteringPopover): Ditto.

  • public/v3/components/chart-status-view.js:

(ChartStatusView.prototype.updateStatusIfNeeded): Use currentIndicator for an interative time series.
Fixed the non-interactive chart's code path for TimeSeriesView.
(ChartStatusView.prototype._computeChartStatus): Modernized the code.
(ChartStatusView.prototype._findLastPointPriorToTime): Deleted. Replaced by TimeSeriesView's
lastPointInTimeRange.

  • public/v3/components/interactive-time-series-chart.js:

(InteractiveTimeSeriesChart.prototype.currentIndicator):
(InteractiveTimeSeriesChart.prototype.moveLockedIndicatorWithNotification):
(InteractiveTimeSeriesChart.prototype._renderChartContent):
(InteractiveTimeSeriesChart):

  • public/v3/models/time-series.js:

(TimeSeriesView.prototype.lastPointInTimeRange): Added.
(TimeSeriesView.prototype._reverse): Added. Traverses the view in the reverse order.

  • unit-tests/time-series-tests.js:
Note: See TracTimeline for information about the timeline view.