Timeline



Nov 29, 2015:

4:56 PM Changeset in webkit [192790] by BJ Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Add context menu item to Reload the Inspector
https://bugs.webkit.org/show_bug.cgi?id=141742

Reviewed by Timothy Hatcher.

Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
reload the Web Inspector frontend without closing the browser.

This should make it possible to more quickly fix typos, small nits,
etc. without having to relaunch. It might also make state
restoration bugs more visible in engineering builds, since there
is hardly any delay between seeing the old and reloaded frontends.

Note that this functionality reloads scripts from the configuration's
build directory, so you still need to "build" WebInspectorUI to ensure
that any changed files are properly minified and staged.

  • UserInterface/Base/Main.js:

(WebInspector.unlocalizedString):

Added. Make it obvious when strings are intentionally not localized.

(WebInspector._contextMenuRequested):

If the "Show Debug UI" setting is available and true, add
a global "Reload Web Inspector" menu item to every context
menu. Otherwise, don't eagerly create a context menu.

  • UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
4:39 PM Changeset in webkit [192789] by BJ Burg
  • 17 edits in trunk/Source/WebInspectorUI

Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
https://bugs.webkit.org/show_bug.cgi?id=151629

Reviewed by Timothy Hatcher.

The existing Context Menu system assumes that only one UI component
will need to provide context menu items. But in some scenarios, there
are multiple UI components that could provide relevant menu items. For
example, right-clicking on an DOM element in the console should show
menu items relevant to 1) the DOM element, 2) the console in general,
and 3) global menu items. Existing code shows menu items provided by
the first object that handles the event and calls ContextMenu.show().

This patch changes behavior so that a context menu can be built up
by multiple 'contextmenu' event handlers. A ContextMenu instance is
hidden on the 'contextmenu' event object; client code calls a
factory method that digs out this existing context menu or creates a
new one as needed. To actually show the context menu through the
InspectorFrontendHost methods, the top-level app controller adds a
bubbling listener for 'contextmenu' and shows the event's context
menu if one has been created.

Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
use Array.{map,some}, and simplify some other code as a result.

No new tests yet, since we can't trigger context menu easily from
an inspector test. All affected context menus were manually verified.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):

  • UserInterface/Controllers/BreakpointPopoverController.js:

(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.

  • UserInterface/Views/BreakpointTreeElement.js:

(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):

  • UserInterface/Views/CSSStyleDeclarationSection.js:
  • UserInterface/Views/ContextMenu.js:

(WebInspector.ContextMenuItem.prototype._buildDescriptor):
(WebInspector.ContextMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype._pushItem):
(WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
(WebInspector.ContextSubMenuItem):
(WebInspector.ContextMenu.createFromEvent):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype.handleEvent):
(WebInspector.ContextMenu.prototype._buildDescriptor):

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._contextMenuInDataTable):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype._handleContextMenuEvent):

  • UserInterface/Views/ObjectPreviewView.js:

(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
(WebInspector.ObjectPreviewView):

  • UserInterface/Views/ObjectTreeBaseTreeElement.js:

(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.

  • UserInterface/Views/TabBarItem.js:

(WebInspector.TabBarItem.prototype._handleContextMenuEvent):
(WebInspector.TabBarItem):
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
(WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.

  • UserInterface/Views/TimelineSidebarPanel.js:

(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
(WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.

  • UserInterface/Views/Toolbar.js:

(WebInspector.Toolbar.prototype._handleContextMenuEvent):

  • UserInterface/Views/VisualStyleSelectorTreeItem.js:

(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):

2:03 PM Changeset in webkit [192788] by commit-queue@webkit.org
  • 6 edits
    4 adds in trunk

Browser does not fall back to SVG attribute value when CSS style value is invalid or not supported
https://bugs.webkit.org/show_bug.cgi?id=147932

Patch by Antoine Quint <Antoine Quint> on 2015-11-29
Reviewed by Dean Jackson.

Source/WebCore:

Instead of returning an SVGPaint object of type SVG_PAINTTYPE_UNKNOWN when we encounter an SVG paint
value that cannot be parsed, we now return nullptr which will cause that value to be ignored and
let another paint value in the cascade be used instead. This is the same approach used for SVGColor.
Since we're removing the only call site for SVGPaint::createUnknown(), we remove that function entirely.

Tests: svg/css/invalid-color-cascade.svg

svg/css/invalid-paint-cascade.svg

  • css/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGPaint):

  • svg/SVGPaint.h:

(WebCore::SVGPaint::createUnknown): Deleted.

LayoutTests:

Testing that we correctly fall back to the presentation attribute for SVGPaint and SVGColor values
specified with an invalid keyword in a style attribute. We also update the expected output for
svg/css/svg-attribute-parser-mode.html which is now in line with values returned by Firefox and
Chrome, where we correctly use the default value instead of null objects, which was definitely
an error.

  • svg/css/invalid-color-cascade-expected.svg: Added.
  • svg/css/invalid-color-cascade.svg: Added.
  • svg/css/invalid-paint-cascade-expected.svg: Added.
  • svg/css/invalid-paint-cascade.svg: Added.
  • svg/css/script-tests/svg-attribute-parser-mode.js:
  • svg/css/svg-attribute-parser-mode-expected.txt:
10:47 AM Changeset in webkit [192787] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Use SVGTransform::SVGTransformType instead of an unsigned short
https://bugs.webkit.org/show_bug.cgi?id=151637

Reviewed by Brady Eidson.

Make 'type' more strongly typed.

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseTransformValue):
(WebCore::parseAndSkipType):
(WebCore::SVGTransformable::parseTransformType):
(WebCore::SVGTransformable::parseTransformAttribute):

  • svg/SVGTransformable.h:

Nov 28, 2015:

1:30 PM Changeset in webkit [192786] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit2

Stop unnecessarily copying WKWebViewConfiguration in a few places
https://bugs.webkit.org/show_bug.cgi?id=151639

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView dealloc]):
(-[WKWebView _contentProviderRegistry]):
(-[WKWebView _selectionGranularity]):
(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView _stopAssistingKeyboard]):
Looking at allocation traces I noticed that we were making way more
WKWebViewConfigurations than made sense; looking at backtraces I found
a few internal callers of -[WKWebView configuration], which copies the
configuration. There's no reason for these internal callers to make
such a copy, though.

I'm not exactly sure what the usual approach is here, but I added
getters so WKContentViewInteraction and PageClientImplIOS can get to
the values they're looking for without using the configuration property.

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

Web Inspector: Styles sidebar placeholder is misaligned
https://bugs.webkit.org/show_bug.cgi?id=151638

Patch by Devin Rousso <Devin Rousso> on 2015-11-28
Reviewed by Brian Burg.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.css:

(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):

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

Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
https://bugs.webkit.org/show_bug.cgi?id=151628

Patch by Devin Rousso <Devin Rousso> on 2015-11-28
Reviewed by Brian Burg.

Merged the two "add rule" functions inside DOMNodeStyles to create a
new rule with the given selector and use the generated best selector
for that node otherwise. This also preserves all fallbacks across all
functions for creating new CSS rules.

  • UserInterface/Models/DOMNodeStyles.js:

(WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
(WebInspector.DOMNodeStyles.prototype.addRule):
Creates a new CSS rule using either the provided selector or the best
selector for the current node.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):

  • UserInterface/Views/VisualStyleSelectorSection.js:

(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):

Nov 27, 2015:

9:50 AM Changeset in webkit [192783] by beidson@apple.com
  • 21 edits
    1 add in trunk/Source

Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
https://bugs.webkit.org/show_bug.cgi?id=151627

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (No change in behavior).

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/indexeddb/IDBGetResult.cpp: Added.

(WebCore::IDBGetResult::dataFromBuffer):
(WebCore::IDBGetResult::isolatedCopy):

  • Modules/indexeddb/IDBGetResult.h:

(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::valueBuffer):
(WebCore::IDBGetResult::keyData):
(WebCore::IDBGetResult::primaryKeyData):
(WebCore::IDBGetResult::keyPath):
(WebCore::IDBGetResult::setValueBuffer):
(WebCore::IDBGetResult::setKeyData):
(WebCore::IDBGetResult::setPrimaryKeyData):
(WebCore::IDBGetResult::setKeyPath):
(WebCore::IDBGetResult::dataFromBuffer): Deleted.
(WebCore::IDBGetResult::isolatedCopy): Deleted.

  • Modules/indexeddb/client/IDBCursorImpl.cpp:

(WebCore::IDBClient::IDBCursor::setGetResult):

  • Modules/indexeddb/client/IDBCursorImpl.h:
  • Modules/indexeddb/client/IDBTransactionImpl.cpp:

(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):

  • Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:

(WebCore::GetOperation::perform):

  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/MemoryCursor.h:
  • Modules/indexeddb/server/MemoryIndexCursor.cpp:

(WebCore::IDBServer::MemoryIndexCursor::currentData):

  • Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:

(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):

  • platform/CrossThreadCopier.h:

Source/WebKit2:

  • DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:

(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):

  • DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
  • DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
  • DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:

(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<IDBGetResult>::encode):
(IPC::ArgumentCoder<IDBGetResult>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
8:54 AM Changeset in webkit [192782] by Carlos Garcia Campos
  • 9 edits in trunk

[GTK] Remove the remaining uses of GMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=151632

Reviewed by Žan Doberšek.

Source/WebKit2:

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
(_WebKitWebViewBasePrivate::clearRedirectedWindowSoonTimerFired):
(webkitWebViewBaseClearRedirectedWindowSoon):
(webkitWebViewBaseEnterAcceleratedCompositingMode):

Tools:

  • TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:

(testWebViewSyncRequestOnMaxConns):

  • TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::TestRunner):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:

(WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::timeoutSource):
(WTR::TestController::notifyDone):
(WTR::TestController::platformRunUntil):

6:16 AM Changeset in webkit [192781] by Csaba Osztrogonác
  • 4 edits in trunk

[cmake] Add testb3 to the build system
https://bugs.webkit.org/show_bug.cgi?id=151619

Reviewed by Gyuyoung Kim.

Source/JavaScriptCore:

  • shell/CMakeLists.txt:

Tools:

  • Scripts/build-jsc:
5:56 AM Changeset in webkit [192780] by Csaba Osztrogonác
  • 3 edits in trunk/Tools

[jhbuild] Fix pixman build with clang
https://bugs.webkit.org/show_bug.cgi?id=151441

Reviewed by Carlos Garcia Campos.

  • efl/jhbuild.modules:
  • gtk/jhbuild.modules:
5:24 AM Changeset in webkit [192779] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WTF

Fix build warning in bignum.cc
https://bugs.webkit.org/show_bug.cgi?id=150797

Reviewed by Geoffrey Garen.

  • wtf/dtoa/bignum.cc:
5:01 AM Changeset in webkit [192778] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Use mark pragmas only if it is supported
https://bugs.webkit.org/show_bug.cgi?id=151621

Reviewed by Mark Lam.

  • b3/air/AirIteratedRegisterCoalescing.cpp:
5:01 AM Changeset in webkit [192777] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Fix the ENABLE(B3_JIT) build with GCC in B3Procedure.h
https://bugs.webkit.org/show_bug.cgi?id=151620

Reviewed by Mark Lam.

  • b3/B3Procedure.h:
4:59 AM Changeset in webkit [192776] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

[cmake] Add new B3 source files to the build system
https://bugs.webkit.org/show_bug.cgi?id=151618

Reviewed by Gyuyoung Kim.

  • CMakeLists.txt:
12:37 AM Changeset in webkit [192775] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] Do not use the WebCore garbage collector timer
https://bugs.webkit.org/show_bug.cgi?id=151623

Reviewed by Martin Robinson.

Now that garbage collector timers have been implemented in
JavaScriptCore for glib, we don't need to use another Timer in WebCore.

  • bindings/js/GCController.cpp:

(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):

Nov 26, 2015:

8:43 AM Changeset in webkit [192774] by ddkilzer@apple.com
  • 2 edits
    2 adds in trunk/Tools

Extract prependToEnvironmentVariableList
<http://webkit.org/b/151536>

Reviewed by Daniel Bates.

Tests: webkitdirs_unittest/appendToEnvironmentVariableList.pl

webkitdirs_unittest/prependToEnvironmentVariableList.pl

  • Scripts/webkitdirs.pm: Export appendToEnvironmentVariableList

and prependToEnvironmentVariableList.
(appendToEnvironmentVariableList): Simplify variable name.
Switch to use $Config{path_sep}.
(prependToEnvironmentVariableList): Add new method.
(setupMacWebKitEnvironment): Switch to use
prependToEnvironmentVariableList().
(setupIOSWebKitEnvironment): Ditto.

  • Scripts/webkitperl/webkitdirs_unittest/appendToEnvironmentVariableList.pl: Added.
  • Scripts/webkitperl/webkitdirs_unittest/prependToEnvironmentVariableList.pl: Added.
5:52 AM Changeset in webkit [192773] by Carlos Garcia Campos
  • 10 edits in trunk/Source/JavaScriptCore

[GLIB] Implement garbage collector timers
https://bugs.webkit.org/show_bug.cgi?id=151391

Reviewed by Žan Doberšek.

Add GLib implementation using GSource.

  • heap/EdenGCActivityCallback.cpp:
  • heap/FullGCActivityCallback.cpp:
  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):

  • heap/GCActivityCallback.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):

  • heap/HeapTimer.cpp:

(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::timerDidFire):

  • heap/HeapTimer.h:
  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::cancelTimer):

  • heap/IncrementalSweeper.h:

Nov 25, 2015:

11:08 PM Changeset in webkit [192772] by aestes@apple.com
  • 5 edits
    3 adds in trunk

[Content Filtering] Crash in DocumentLoader::notifyFinished() when allowing a media document to load
https://bugs.webkit.org/show_bug.cgi?id=151433
rdar://problem/23506594

Reviewed by Alexey Proskuryakov.

Source/WebCore:

When the main resource of a media document commits, WebKit cancels its load since the plug-in or media engine
will do its own loading. If content filtering is enabled, and the filter waits allow the load until the entire
resource is downloaded, then ContentFilter will attempt to call DocumentLoader::notifyFinished() immediately
after delivering the buffered resource data to DocumentLoader. However, delivering the data will have nulled out
DocumentLoader's m_mainResource when the load was cancelled, leading to a crash in notifyFinished().

To resolve this, add a new Stopped state to ContentFilter. Set this state if DocumentLoader clears its main
resource or detaches from its frame. If ContentFilter is in the Stopped state after calling
DocumentLoader::dataReceived(), do not proceed to call DocumentLoader::notifyFinished().

Test: contentfiltering/allow-media-document.html

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::stopFilteringMainResource): Set m_state to Stopped. If m_mainResource is non-null,
removed ContentFilter as a client and set m_mainResource to null.
(WebCore::ContentFilter::notifyFinished): Stopped calling DocumentLoader::notifyFinished() if m_state is Stopped
after calling DocumentLoader::dataReceived().

  • loader/ContentFilter.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::detachFromFrame): Called ContentFilter::stopFilteringMainResource() instead of setting
m_contentFilter to null.
(WebCore::DocumentLoader::clearMainResource): Ditto.

LayoutTests:

  • contentfiltering/allow-media-document-expected.txt: Added.
  • contentfiltering/allow-media-document.html: Added.
  • contentfiltering/resources/test.mp4: Added.
12:53 PM Changeset in webkit [192771] by BJ Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
https://bugs.webkit.org/show_bug.cgi?id=151581

Reviewed by Timothy Hatcher.

Serialize all breakpoints to the "breakpoints" Setting in local storage
whenever any breakpoint model object is added, removed, or modified.

Remove the old listener that attempted to save breakpoints on the
pagehide event. It did not fire in important scenarios like exiting
the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.

This is not expected to be a performance problem because most people
do not keep thousands of breakpoints active, and breakpoints are not
set very often. If it's a problem, we can mitigate it with coalescing.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._saveBreakpoints):
(WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.

11:04 AM Changeset in webkit [192770] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

Checks for buffer-overflows when reading characters from textRun
https://bugs.webkit.org/show_bug.cgi?id=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-25
Reviewed by Myles C. Maxfield.

Source/WebCore:

Prevents an off by one error when adding the last font data to the GlyphBuffer.

  • Source/WebCore/platform/graphics/WidthIterator.cpp:
  • Source/WebCore/platform/graphics/FontCascade.cpp:

LayoutTests:

  • dom/html/level1/core/151055_asan.html:
  • dom/html/level1/core/151055_asan-expected.txt:
12:48 AM Changeset in webkit [192769] by aestes@apple.com
  • 25 edits
    1 copy
    2 adds in trunk

Teach MiniBrowser how to enable the mock content filter
https://bugs.webkit.org/show_bug.cgi?id=151540

Reviewed by Andreas Kling.

Source/WebCore:

Moved the implementation of MockContentFilterEnabler from TestWebKitAPI to here, renamed it to
WebMockContentFilterEnabler, and made it compatible with the legacy Objective-C runtime. Renamed Decision and
DecisionPoint to WebMockContentFilterDecision and WebMockContentFilterDecisionPoint, and changed them from enum
classes to CF_ENUMs so that they can be used by both C++ and Objective-C source files.

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSMockContentFilterSettingsCustom.cpp:

(WebCore::JSMockContentFilterSettings::decisionPoint):
(WebCore::JSMockContentFilterSettings::setDecisionPoint):
(WebCore::toDecision):
(WebCore::JSMockContentFilterSettings::decision):
(WebCore::JSMockContentFilterSettings::setDecision):
(WebCore::JSMockContentFilterSettings::unblockRequestDecision):
(WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
(WebCore::toJSValue): Deleted.

  • testing/MockContentFilter.cpp:

(WebCore::MockContentFilter::willSendRequest):
(WebCore::MockContentFilter::responseReceived):
(WebCore::MockContentFilter::addData):
(WebCore::MockContentFilter::finishedAddingData):
(WebCore::MockContentFilter::unblockHandler):
(WebCore::MockContentFilter::maybeDetermineStatus):

  • testing/MockContentFilter.h:
  • testing/MockContentFilterEnabler.h: Added.
  • testing/MockContentFilterEnabler.mm: Added.

(-[WebMockContentFilterEnabler initWithDecision:decisionPoint:blockedString:]):
(-[WebMockContentFilterEnabler initWithCoder:]):
(-[WebMockContentFilterEnabler encodeWithCoder:]):
(-[WebMockContentFilterEnabler enable]):
(-[WebMockContentFilterEnabler dealloc]):
(+[WebMockContentFilterEnabler supportsSecureCoding]):
(-[WebMockContentFilterEnabler copyWithZone:]):

  • testing/MockContentFilterSettings.h:

(WebCore::MockContentFilterSettings::decisionPoint):
(WebCore::MockContentFilterSettings::setDecisionPoint):
(WebCore::MockContentFilterSettings::decision):
(WebCore::MockContentFilterSettings::setDecision):
(WebCore::MockContentFilterSettings::unblockRequestDecision):
(WebCore::MockContentFilterSettings::setUnblockRequestDecision):

Tools:

  • MiniBrowser/Configurations/Base.xcconfig: Added WebCoreTestSupport and WTF to HEADER_SEARCH_PATHS.
  • MiniBrowser/Configurations/MiniBrowser.xcconfig: Linked against libWebCoreTestSupport.
  • MiniBrowser/Configurations/MiniBrowserBundle.xcconfig: Ditto.
  • MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Added blocked-page.html.
  • MiniBrowser/MiniBrowserWebProcessPlugIn.m:

(-[MiniBrowserWebProcessPlugIn webProcessPlugIn:initializeWithObject:]): Observed the WebMockContentFilterEnabler key path.
(-[MiniBrowserWebProcessPlugIn dealloc]):
(-[MiniBrowserWebProcessPlugIn observeValueForKeyPath:ofObject:change:context:]): Stored the value in _contentFilterEnabler.

  • MiniBrowser/blocked-page.html: Added.
  • MiniBrowser/mac/AppDelegate.m:

(defaultConfiguration): Created a _WKProcessPoolConfiguration with MiniBrowser.wkbundle as the injected bundle.

  • MiniBrowser/mac/BrowserWindowController.h:
  • MiniBrowser/mac/BrowserWindowController.m:

(+[BrowserWindowController contentFilteringBlockedString]): Returned an NSString containing blocked-page.html.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]): Added [self _contentFilteringMenuItem] to the Settings menu.
(-[SettingsController validateMenuItem:]): Validated the new menu items. Disabled Decision and Decision Point items if filtering is disabled.
(-[SettingsController _contentFilteringMenuItem]): Returned a new Content Filtering menu item with a submenu.
(-[SettingsController toggleContentFilteringEnabled:]): Toggled ContentFilteringEnabledKey.
(-[SettingsController contentFilteringEnabled]): Returned value of ContentFilteringEnabledKey.
(-[SettingsController setContentFilteringDecision:]): Set ContentFilterDecisionKey and called -[BrowserAppDelegate didChangeSettings].
(-[SettingsController contentFilteringDecision]): Returned the value of ContentFilterDecisionKey as a WebMockContentFilterDecision.
Defaulted to WebMockContentFilterDecisionAllow if the value is invalid.
(-[SettingsController setContentFilteringDecisionPoint:]): Set ContentFilterDecisionPointKey and called -[BrowserAppDelegate didChangeSettings].
(-[SettingsController contentFilteringDecisionPoint]): Returned the value of ContentFilterDecisionPointKey as a WebMockContentFilterDecisionPoint.
Defaulted to WebMockContentFilterDecisionPointAfterWillSendRequest if the value is invalid.

  • MiniBrowser/mac/WK1BrowserWindowController.h:
  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController dealloc]):
(-[WK1BrowserWindowController didChangeSettings]): Created a WebMockContentFilterEnabler with the current settings and stored it in _contentFilterEnabler.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]): Created a WebMockContentFilterEnabler and set it as the object for the eponymous bundle parameter.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Linked against libWebCoreTestSupport.
  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

(configurationWithContentFilterSettings): Converted to use WebMockContentFilterEnabler, WebMockContentFilterDecision, and WebMockContentFilterDecisionPoint.
(TEST): Ditto.
(downloadTest): Ditto.
(+[MockContentFilterEnabler supportsSecureCoding]): Deleted.
(-[MockContentFilterEnabler copyWithZone:]): Deleted.
(-[MockContentFilterEnabler initWithCoder:]): Deleted.
(-[MockContentFilterEnabler initWithDecision:decisionPoint:]): Deleted.
(-[MockContentFilterEnabler encodeWithCoder:]): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm:

(-[ContentFilteringPlugIn webProcessPlugIn:initializeWithObject:]): Converted to use WebMockContentFilterEnabler.
(-[ContentFilteringPlugIn dealloc]): Ditto.
(-[ContentFilteringPlugIn observeValueForKeyPath:ofObject:change:context:]): Ditto.
(+[MockContentFilterEnabler supportsSecureCoding]): Deleted.
(-[MockContentFilterEnabler copyWithZone:]): Deleted.
(-[MockContentFilterEnabler initWithCoder:]): Deleted.
(-[MockContentFilterEnabler dealloc]): Deleted.
(-[MockContentFilterEnabler encodeWithCoder:]): Deleted.

Note: See TracTimeline for information about the timeline view.