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

Timeline



Jul 23, 2017:

11:47 PM Changeset in webkit [219796] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.

When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
database.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
string when nullptr is passed.

11:05 PM Changeset in webkit [219795] by Wenson Hsieh
  • 4 edits in trunk/Source

[iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
https://bugs.webkit.org/show_bug.cgi?id=174769
<rdar://problem/33478864>

Reviewed by Tim Horton.

Source/WebCore:

These tests began failing after r219541, due to a change in behavior of whether or not we call
setIgnoreSelectionChanges(false, RevealSelection::No) or setIgnoreSelectionChanges(false, RevealSelection::Yes)
when performing a text editing drop.

Before r219541, we would not reveal the selection when performing an edit drag operation. This is because in
WebPage::performDragControllerAction, we would begin ignoring selection changes by calling
setIgnoreSelectionChanges(true). However, while taking a text indicator snapshot, we would stop ignoring
selection in TextIndicator::createWithRange due to us calling setIgnoreSelectionChanges(false,
RevealSelection::No) at the end of the function. Then, when we return to the scope of
WebPage::performDragControllerAction and try to setIgnoreSelectionChanges(false), this is a no-op because we've
already stopped ignoring selection changes.

After r219541, switching to using TemporarySelectionChange means that TextIndicator::createWithRange now means
we respect whether or not we were already ignoring selection before taking the snapshot, so we won't always
setIgnoreSelectionChanges(false) at the end. This means that selection changes will now be correctly ignored
when performing a drag operation, but this also means that we'll try to reveal the selection, since
WebPage::performDragControllerAction calls setIgnoreSelectionChanges(false), for which RevealSelection::Yes
is used by default.

Revealing the selection in WebPage::performDragControllerAction was unintended in the first place, so we should
revert to calling setIgnoreSelectionChanges(false, RevealSelection::No). To ensure this, we adopt
TemporarySelectionChange here and pass only TemporarySelectionOptionIgnoreSelectionChanges, so that we won't
additionally try to reveal selection after the drop. This is consistent with behavior prior to macOS 10.13 and
iOS 11. Additionally, this patch also moves the call to ignore selection change from WebKit into WebCore, so
that whether we ignore selection is consistent across both WebKit1 and WebKit2.

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

Source/WebKit:

Fixes several API tests in the DataInteractionTests suite. See Source/WebCore/ChangeLog for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

10:58 PM Changeset in webkit [219794] by Carlos Garcia Campos
  • 9 edits in trunk/Source

WebDriver: implement page load timeout
https://bugs.webkit.org/show_bug.cgi?id=174672

Reviewed by Brian Burg.

Source/WebDriver:

Handle timeout errors and pass the page load timeout to waitForNavigationToComplete and all other navigation
commands. Also fix the setTimeouts command that was still using the legacy name of the page load timeout,
instead of the one in the spec.

  1. Sessions

https://www.w3.org/TR/webdriver/#dfn-session-page-load-timeout

  • CommandResult.cpp:

(WebDriver::CommandResult::CommandResult):
(WebDriver::CommandResult::httpStatusCode):
(WebDriver::CommandResult::errorString):

  • CommandResult.h:
  • Session.cpp:

(WebDriver::Session::go):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::waitForNavigationToComplete):

  • WebDriverService.cpp:

(WebDriver::WebDriverService::setTimeouts):

Source/WebKit:

Always start a timer when waiting for a navigation to complete. When the timer fires, pending callbacks for
navigations are removed and invoked with a timeout error. If navigation completes before the timer is fired,
then the timer is stopped. All navigation commands now receive the page load strategy and timeout as optional
parameters, when not provided the default timeout (300 seconds) is used.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::WebAutomationSession):
(WebKit::WebAutomationSession::waitForNavigationToComplete):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
(WebKit::WebAutomationSession::loadTimerFired):
(WebKit::WebAutomationSession::navigateBrowsingContext):
(WebKit::WebAutomationSession::goBackInBrowsingContext):
(WebKit::WebAutomationSession::goForwardInBrowsingContext):
(WebKit::WebAutomationSession::reloadBrowsingContext):
(WebKit::WebAutomationSession::navigationOccurredForFrame):

  • UIProcess/Automation/WebAutomationSession.h:
8:20 PM Changeset in webkit [219793] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Correct a typo in the reference manual of WebKitWebInspector
https://bugs.webkit.org/show_bug.cgi?id=174767

Patch by Takuro Ashie <ashie@clear-code.com> on 2017-07-23
Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/WebKitWebInspector.cpp:
7:10 PM Changeset in webkit [219792] by Chris Dumez
  • 117 edits
    2 deletes in trunk/Source

Drop ExceptionCodeDescription class
https://bugs.webkit.org/show_bug.cgi?id=174757

Reviewed by Darin Adler.

Source/WebCore:

Drop ExceptionCodeDescription class now that there is only one exception
type: DOMException. Instead, we now have static methods on DOMException
to get the name / message for a given exception code.

  • CMakeLists.txt:
  • Modules/indexeddb/shared/IDBError.cpp:

(WebCore::IDBError::name):
(WebCore::IDBError::message):

  • Modules/quota/StorageErrorCallback.cpp:

(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):

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

(WebCore::createDOMException):

  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp:

(WebCore::errorCodeFromName):
(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):
(WebCore::DOMException::name):
(WebCore::DOMException::message):

  • dom/DOMException.h:
  • dom/ExceptionCodeDescription.cpp: Removed.
  • dom/ExceptionCodeDescription.h: Removed.
  • inspector/DOMEditor.cpp:

(WebCore::populateErrorString):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::toErrorString):

  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):

Source/WebKit:

Update GTK bindings to use new API on DOMException instead of
ExceptionCodeDescription.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:

(webkit_dom_attr_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:

(webkit_dom_cdata_section_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:

(webkit_dom_css_rule_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:

(webkit_dom_css_style_declaration_set_property):
(webkit_dom_css_style_declaration_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:

(webkit_dom_css_style_sheet_insert_rule):
(webkit_dom_css_style_sheet_delete_rule):
(webkit_dom_css_style_sheet_add_rule):
(webkit_dom_css_style_sheet_remove_rule):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:

(webkit_dom_css_value_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:

(webkit_dom_character_data_dispatch_event):
(webkit_dom_character_data_insert_data):
(webkit_dom_character_data_delete_data):
(webkit_dom_character_data_replace_data):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:

(webkit_dom_comment_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:

(webkit_dom_dom_implementation_create_document_type):
(webkit_dom_dom_implementation_create_document):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:

(webkit_dom_dom_selection_collapse_to_end):
(webkit_dom_dom_selection_collapse_to_start):
(webkit_dom_dom_selection_extend):
(webkit_dom_dom_selection_get_range_at):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:

(webkit_dom_dom_token_list_add):
(webkit_dom_dom_token_list_remove):
(webkit_dom_dom_token_list_toggle):
(webkit_dom_dom_token_list_replace):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:

(webkit_dom_node_set_prefix):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_dispatch_event):
(webkit_dom_document_create_element):
(webkit_dom_document_create_cdata_section):
(webkit_dom_document_create_processing_instruction):
(webkit_dom_document_create_attribute):
(webkit_dom_document_import_node):
(webkit_dom_document_create_element_ns):
(webkit_dom_document_create_attribute_ns):
(webkit_dom_document_adopt_node):
(webkit_dom_document_create_event):
(webkit_dom_document_create_expression):
(webkit_dom_document_evaluate):
(webkit_dom_document_query_selector):
(webkit_dom_document_query_selector_all):
(webkit_dom_document_set_xml_version):
(webkit_dom_document_set_cookie):
(webkit_dom_document_set_body):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:

(webkit_dom_document_fragment_dispatch_event):
(webkit_dom_document_fragment_query_selector):
(webkit_dom_document_fragment_query_selector_all):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:

(webkit_dom_document_type_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_dispatch_event):
(webkit_dom_element_set_attribute):
(webkit_dom_element_set_attribute_node):
(webkit_dom_element_remove_attribute_node):
(webkit_dom_element_set_attribute_ns):
(webkit_dom_element_set_attribute_node_ns):
(webkit_dom_element_matches):
(webkit_dom_element_closest):
(webkit_dom_element_insert_adjacent_element):
(webkit_dom_element_insert_adjacent_html):
(webkit_dom_element_insert_adjacent_text):
(webkit_dom_element_remove):
(webkit_dom_element_query_selector):
(webkit_dom_element_query_selector_all):
(webkit_dom_element_set_inner_html):
(webkit_dom_element_set_outer_html):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:

(webkit_dom_html_anchor_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:

(webkit_dom_html_applet_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:

(webkit_dom_html_area_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:

(webkit_dom_html_br_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:

(webkit_dom_html_base_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:

(webkit_dom_html_body_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:

(webkit_dom_html_button_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:

(webkit_dom_html_canvas_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:

(webkit_dom_html_d_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:

(webkit_dom_html_directory_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:

(webkit_dom_html_div_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:

(webkit_dom_html_document_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:

(webkit_dom_html_element_dispatch_event):
(webkit_dom_html_element_set_inner_text):
(webkit_dom_html_element_set_outer_text):
(webkit_dom_html_element_set_content_editable):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:

(webkit_dom_html_embed_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:

(webkit_dom_html_field_set_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:

(webkit_dom_html_font_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:

(webkit_dom_html_form_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:

(webkit_dom_html_frame_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:

(webkit_dom_html_frame_set_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:

(webkit_dom_html_hr_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:

(webkit_dom_html_head_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:

(webkit_dom_html_heading_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:

(webkit_dom_html_html_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:

(webkit_dom_html_iframe_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:

(webkit_dom_html_image_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_dispatch_event):
(webkit_dom_html_input_element_set_max_length):
(webkit_dom_html_input_element_set_size):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:

(webkit_dom_html_li_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:

(webkit_dom_html_label_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:

(webkit_dom_html_legend_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:

(webkit_dom_html_link_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:

(webkit_dom_html_map_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:

(webkit_dom_html_marquee_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:

(webkit_dom_html_menu_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:

(webkit_dom_html_meta_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:

(webkit_dom_html_mod_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:

(webkit_dom_html_o_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:

(webkit_dom_html_object_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:

(webkit_dom_html_opt_group_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:

(webkit_dom_html_option_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:

(webkit_dom_html_paragraph_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:

(webkit_dom_html_param_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:

(webkit_dom_html_pre_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:

(webkit_dom_html_quote_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:

(webkit_dom_html_script_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:

(webkit_dom_html_select_element_dispatch_event):
(webkit_dom_html_select_element_add):
(webkit_dom_html_select_element_set_length):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:

(webkit_dom_html_style_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:

(webkit_dom_html_table_caption_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:

(webkit_dom_html_table_cell_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:

(webkit_dom_html_table_col_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:

(webkit_dom_html_table_element_dispatch_event):
(webkit_dom_html_table_element_insert_row):
(webkit_dom_html_table_element_delete_row):
(webkit_dom_html_table_element_set_caption):
(webkit_dom_html_table_element_set_t_head):
(webkit_dom_html_table_element_set_t_foot):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:

(webkit_dom_html_table_row_element_dispatch_event):
(webkit_dom_html_table_row_element_insert_cell):
(webkit_dom_html_table_row_element_delete_cell):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:

(webkit_dom_html_table_section_element_dispatch_event):
(webkit_dom_html_table_section_element_insert_row):
(webkit_dom_html_table_section_element_delete_row):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:

(webkit_dom_html_text_area_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:

(webkit_dom_html_title_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:

(webkit_dom_html_u_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:

(webkit_dom_media_list_delete_medium):
(webkit_dom_media_list_append_medium):
(webkit_dom_media_list_set_media_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:

(webkit_dom_named_node_map_set_named_item):
(webkit_dom_named_node_map_remove_named_item):
(webkit_dom_named_node_map_remove_named_item_ns):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:

(webkit_dom_node_dispatch_event):
(webkit_dom_node_insert_before):
(webkit_dom_node_replace_child):
(webkit_dom_node_remove_child):
(webkit_dom_node_append_child):
(webkit_dom_node_clone_node_with_error):
(webkit_dom_node_set_node_value):
(webkit_dom_node_set_text_content):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:

(webkit_dom_processing_instruction_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:

(webkit_dom_range_set_start):
(webkit_dom_range_set_end):
(webkit_dom_range_set_start_before):
(webkit_dom_range_set_start_after):
(webkit_dom_range_set_end_before):
(webkit_dom_range_set_end_after):
(webkit_dom_range_select_node):
(webkit_dom_range_select_node_contents):
(webkit_dom_range_compare_boundary_points):
(webkit_dom_range_delete_contents):
(webkit_dom_range_extract_contents):
(webkit_dom_range_clone_contents):
(webkit_dom_range_insert_node):
(webkit_dom_range_surround_contents):
(webkit_dom_range_create_contextual_fragment):
(webkit_dom_range_compare_node):
(webkit_dom_range_intersects_node):
(webkit_dom_range_compare_point):
(webkit_dom_range_is_point_in_range):
(webkit_dom_range_expand):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:

(webkit_dom_text_dispatch_event):
(webkit_dom_text_split_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:

(webkit_dom_xpath_expression_evaluate):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:

(webkit_dom_xpath_result_iterate_next):
(webkit_dom_xpath_result_snapshot_item):
(webkit_dom_xpath_result_get_number_value):
(webkit_dom_xpath_result_get_boolean_value):
(webkit_dom_xpath_result_get_single_node_value):
(webkit_dom_xpath_result_get_snapshot_length):

Source/WebKitLegacy/mac:

Stop using ExceptionCodeDescription.

  • DOM/ExceptionHandlers.mm:

(raiseDOMErrorException):

2:01 PM Changeset in webkit [219791] by Michael Catanzaro
  • 2 edits in trunk/Source/WTF

Implement FALLTHROUGH attribute for C with GCC
https://bugs.webkit.org/show_bug.cgi?id=174555

Reviewed by Darin Adler.

My previous attempt to silence the JSC -Wimplicit-fallthrough warnings failed because they
are coming from a C file, and our FALLTHROUGH macro is only implemented for C++. So
implement it for C as well, using C attribute syntax.

Note this is only possible to do for GCC, because Clang only supports this attribute using
the C++ attribute syntax.

  • wtf/Compiler.h:
1:35 PM Changeset in webkit [219790] by mark.lam@apple.com
  • 8 edits
    1 add in trunk/Source/JavaScriptCore

Create regression tests for the JIT probe.
https://bugs.webkit.org/show_bug.cgi?id=174696
<rdar://problem/33436922>

Reviewed by Saam Barati.

The new testmasm will test the following:

  1. the probe is able to read the value of CPU registers.
  2. the probe is able to write the value of CPU registers.
  3. the probe is able to preserve all CPU registers.
  4. special case of (2): the probe is able to change the value of the stack pointer.
  5. special case of (2): the probe is able to change the value of the program counter i.e. the probe can change where the code continues executing upon returning from the probe.

Currently, the x86, x86_64, and ARMv7 ports passes the test. ARM64 does not
because it does not support changing the sp and pc yet. The ARM64 probe
implementation will be fixed in https://bugs.webkit.org/show_bug.cgi?id=174697
later.

  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::CPUState::pc):
(JSC::MacroAssembler::CPUState::fp):
(JSC::MacroAssembler::CPUState::sp):
(JSC::ProbeContext::pc):
(JSC::ProbeContext::fp):
(JSC::ProbeContext::sp):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::arm64ProbeTrampoline):

  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::printPCRegister):

  • assembler/testmasm.cpp: Added.

(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(JSC::nextID):
(JSC::isPC):
(JSC::isSP):
(JSC::isFP):
(JSC::compile):
(JSC::invoke):
(JSC::compileAndRun):
(JSC::testSimple):
(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):
(JSC::testFunctionToTrashRegisters):
(JSC::testProbePreservesGPRS):
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesProgramCounter):
(JSC::run):
(run):
(main):

  • b3/air/testair.cpp:

(usage):

  • shell/CMakeLists.txt:
12:02 PM Changeset in webkit [219789] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219571. rdar://problem/33464710

10:00 AM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)

Jul 22, 2017:

11:52 PM Changeset in webkit [219788] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219662. rdar://problem/33464110

11:52 PM Changeset in webkit [219787] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219711. rdar://problem/33465715

11:52 PM Changeset in webkit [219786] by jmarcell@apple.com
  • 17 edits in branches/safari-604-branch

Cherry-pick r219709. rdar://problem/33462692

11:51 PM Changeset in webkit [219785] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219703. rdar://problem/33462696

11:51 PM Changeset in webkit [219784] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219701. rdar://problem/33465715

11:51 PM Changeset in webkit [219783] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219683. rdar://problem/33464463

11:51 PM Changeset in webkit [219782] by jmarcell@apple.com
  • 28 edits
    1 copy in branches/safari-604-branch

Cherry-pick r219668. rdar://problem/33462676

11:51 PM Changeset in webkit [219781] by jmarcell@apple.com
  • 5 edits in branches/safari-604-branch

Cherry-pick r219666. rdar://problem/33464328

11:51 PM Changeset in webkit [219780] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219664. rdar://problem/33464115

11:51 PM Changeset in webkit [219779] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219661. rdar://problem/33465132

11:51 PM Changeset in webkit [219778] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219645. rdar://problem/33464440

11:51 PM Changeset in webkit [219777] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219641. rdar://problem/33464325

11:51 PM Changeset in webkit [219776] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r219633. rdar://problem/33465535

11:50 PM Changeset in webkit [219775] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKitLegacy/mac

Cherry-pick r219626. rdar://problem/33465685

11:50 PM Changeset in webkit [219774] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219625. rdar://problem/33465689

11:50 PM Changeset in webkit [219773] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219621. rdar://problem/33465059

11:50 PM Changeset in webkit [219772] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219591. rdar://problem/33464112

11:50 PM Changeset in webkit [219771] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Cherry-pick r219590. rdar://problem/33465177

11:50 PM Changeset in webkit [219770] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r219588. rdar://problem/33464447

11:50 PM Changeset in webkit [219769] by jmarcell@apple.com
  • 14 edits
    1 add in branches/safari-604-branch

Cherry-pick r219585. rdar://problem/33465177

10:28 PM Changeset in webkit [219768] by Wenson Hsieh
  • 10 edits
    4 deletes in trunk

[iOS WK2] Remove _WKDraggableElementInfo and fold PositionInformationTests into WKRequestActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=174758

Reviewed by Dan Bernstein.

Source/WebKit:

_WKDraggableElementInfo is no longer used in WebKit, so it should be removed. However, some of the scenarios
in PositionInformationTests that depend on _WKDraggableElementInfo are still useful to exercise: namely,
performing both synchronous and asynchronous position information updates while an async position information
update is in flight. This patch refactors these unit tests into 2 new unit tests in the existing
WKRequestActivatedElementInfo test suite.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _draggableElementAtPosition:]): Deleted.
(-[WKWebView _requestDraggableElementAtPosition:completionBlock:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Removed.
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Migrate position-information-related unit tests from the PositionInformationTests suite to
WKRequestActivatedElementInfo as 2 new unit tests. See WebKit2 ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::checkElementTypeAndBoundingRect):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/PositionInformationTests.mm: Removed.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView activatedElementAtPosition:]):

3:31 PM Changeset in webkit [219767] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644.

  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:

(WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning

in one place where we are calling a class method on a Class and the compiler can’t tell
which class it is, so it chooses wrong and emits a warning.

2:20 PM Changeset in webkit [219766] by Chris Dumez
  • 71 edits
    2 deletes in trunk

Merge ExceptionBase into DOMException and drop custom toString
https://bugs.webkit.org/show_bug.cgi?id=174755

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_multi-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_null-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_space-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_zero-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-expected.txt:

Source/WebCore:

Merge ExceptionBase into DOMException and drop custom toString, now that DOMException
is the only remaining exception type.

  • CMakeLists.txt:
  • Modules/mediastream/MediaStream.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessage):

  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp:

(WebCore::DOMException::DOMException):
(WebCore::DOMException::initializeDescription):

  • dom/DOMException.h:

(WebCore::DOMException::code):
(WebCore::DOMException::name):
(WebCore::DOMException::message):

  • dom/ExceptionBase.cpp: Removed.
  • dom/ExceptionBase.h: Removed.

LayoutTests:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/frames/sandboxed-iframe-history-denied-expected.txt:
  • fast/frames/sandboxed-iframe-navigation-top-denied-expected.txt:
  • fast/inspector-support/uncaught-dom1-exception-expected.txt:
  • fast/inspector-support/uncaught-dom3-exception-expected.txt:
  • fast/inspector-support/uncaught-dom8-exception-expected.txt:
  • fast/regions/selection/crash-deselect-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
  • http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt:
  • http/tests/security/sandboxed-iframe-modify-self-expected.txt:
  • http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hash-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-host-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hostname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-nonstandardProperty-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-pathname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-protocol-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-reload-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-search-expected.txt:
  • http/tests/security/xss-DENIED-frame-name-expected.txt:
  • http/tests/security/xss-DENIED-sandboxed-iframe-expected.txt:
  • http/tests/security/xss-DENIED-window-name-navigator-expected.txt:
  • inspector/debugger/command-line-api-exception-expected.txt:
  • inspector/debugger/regress-133182-expected.txt:
  • inspector/debugger/setPauseOnExceptions-all-expected.txt:
  • inspector/debugger/setPauseOnExceptions-none-expected.txt:
  • inspector/debugger/setPauseOnExceptions-uncaught-expected.txt:
  • platform/mac/fast/dynamic/015-expected.txt:
12:57 PM Changeset in webkit [219765] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[Mac WK2] Fix null dereference in asynchronous NSTextInputClient methods when deallocating a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=174751
<rdar://problem/33132405>

Reviewed by Darin Adler.

Tweaks -[WKWebView dealloc] to close the WebPageProxy at an earlier time, prior to destroying the WebViewImpl.
This fixes a NSTextInputClient crash in WKWebView when exercising the following scenario:

(1) Suppose that NSTextInputContext invokes an asynchronous text input query on WKWebView immediately before
WKWebView is deallocated, such that WebPageProxy's CallbackMap contains an NSTextInputContext callback at the
time that -[WKWebView dealloc] is called. Additionally, suppose that this callback from NSTextInputContext
invokes additional NSTextInputClient methods on the WKWebView that involve plumbing through to the WebViewImpl
(which is stored as _impl on the WKWebView).

(2) Observe that when calling [super dealloc] in [WKWebView dealloc], we will destroy the WebViewImpl as a
result of setting our unique pointer to _impl to be null. In ~WebViewImpl, we invoke WebPageProxy::close, which
in turn invokes WebPageProxy::resetState.

(3) WebPageProxy::resetState then calls m_callbacks.invalidate(error), which triggers all pending callbacks.
This invokes the block described in (1), which causes us to try and call back into WKWebView, invoking
NSTextInputClient methods. Without the fix in this patch, these methods currently assume that _impl is nonnull,
even though we've already cleared out the pointer in (2), so we segfault with a null dereference.

After this patch, we close the _page at an earlier time, such that the state is reset before the WebViewImpl
(and corresponding _impl unique_ptr in WKWebView) is torn down. This ensures that _impl will not be null for
callbacks invoked after beginning to deallocate the WKWebView.

Forcing this scenario in a custom AppKit root that triggers async NSTextInputClient methods immediately when a
WKWebView is being deallocated produces a crash with the same stack trace as what we observe in the radar, but
there are no known steps to actually reproduce this crash in shipping software.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]):

10:31 AM Changeset in webkit [219764] by Chris Dumez
  • 6 edits in trunk

REGRESSION(r204565): WKObject is broken
https://bugs.webkit.org/show_bug.cgi?id=174736
<rdar://problem/33246169>

Reviewed by Dan Bernstein.

Source/WebKit:

Revert r204565 as making WKObject a root class caused unexpected crashes.
Instead, we now have WKObject inherit from NSProxy (instead of previously
NSObject) and we forward calls to the target.

We also need to provide an implementation for private methods such as
isNSString to address the issue with NSStrings that r204565 was trying
to fix.

  • Shared/Cocoa/APIObject.mm:

(API::Object::unwrap):

  • Shared/Cocoa/WKObject.h:
  • Shared/Cocoa/WKObject.mm:

(-[WKObject dealloc]):
(-[WKObject hash]):
(-[WKObject isKindOfClass:]):
(-[WKObject isMemberOfClass:]):
(-[WKObject respondsToSelector:]):
(-[WKObject conformsToProtocol:]):
(-[WKObject forwardingTargetForSelector:]):
(-[WKObject description]):
(-[WKObject debugDescription]):
(-[WKObject classForCoder]):
(-[WKObject classForKeyedArchiver]):
(-[WKObject _web_createTarget]):
(-[WKObject forwardInvocation:]):
(-[WKObject methodSignatureForSelector:]):
(-[WKObject isNSObject]):
(-[WKObject isNSArray
]):
(-[WKObject isNSCFConstantString]):
(-[WKObject isNSData
]):
(-[WKObject isNSDate]):
(-[WKObject isNSDictionary
]):
(-[WKObject isNSNumber]):
(-[WKObject isNSOrderedSet
]):
(-[WKObject isNSSet]):
(-[WKObject isNSString
]):
(-[WKObject isNSTimeZone]):
(-[WKObject isNSValue
]):

Tools:

Add API test that used to crash.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm:

(TestWebKitAPI::TEST):

7:36 AM Changeset in webkit [219763] by fpizlo@apple.com
  • 31 edits
    1 add in trunk/Source

It should be easy to decide how WebKit yields
https://bugs.webkit.org/show_bug.cgi?id=174298

Reviewed by Saam Barati.
Source/bmalloc:


Use sched_yield() explicitly.

  • bmalloc/StaticMutex.cpp:

(bmalloc::StaticMutex::lockSlowCase):

Source/JavaScriptCore:


Use the new WTF::Thread::yield() function for yielding instead of the C++ function.

  • heap/Heap.cpp:

(JSC::Heap::resumeThePeriphery):

  • heap/VisitingTimeout.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::lockSlow):
(JSC::JSCell::unlockSlow):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::lock):
(JSC::JSCell::unlock):

  • runtime/JSLock.cpp:

(JSC::JSLock::grabAllLocks):

  • runtime/SamplingProfiler.cpp:

Source/WebCore:

No new tests because the WebCore change is just a change to how we #include things.

  • inspector/InspectorPageAgent.h:
  • inspector/TimelineRecordFactory.h:
  • workers/Worker.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.h:

Source/WebKitLegacy:

  • Storage/StorageTracker.h:

Source/WTF:


Created a Thread::yield() abstraction for sched_yield(), and made WTF use it everywhere that it
had previously used std::this_thread::yield().

To make it less annoying to experiment with changes to the lock algorithm in the future, this also
moves the meat of the algorithm into LockAlgorithmInlines.h. Only two files include that header.
Since LockAlgorithm.h no longer includes ParkingLot.h, a bunch of files in WK now need to include
timing headers (Seconds, MonotonicTime, etc) manually.

  • WTF.xcodeproj/project.pbxproj:
  • benchmarks/ToyLocks.h:
  • wtf/CMakeLists.txt:
  • wtf/Lock.cpp:
  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockSlow): Deleted.
(WTF::LockAlgorithm::unlockSlow): Deleted.

  • wtf/LockAlgorithmInlines.h: Added.

(WTF::hasParkedBit>::lockSlow):
(WTF::hasParkedBit>::unlockSlow):

  • wtf/MainThread.cpp:
  • wtf/RunLoopTimer.h:
  • wtf/Threading.cpp:
  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::yield):

  • wtf/ThreadingWin.cpp:

(WTF::Thread::yield):

  • wtf/WordLock.cpp:

(WTF::WordLockBase::lockSlow):
(WTF::WordLockBase::unlockSlow):

5:12 AM Changeset in webkit [219762] by commit-queue@webkit.org
  • 18 edits in trunk/Source/WebCore

REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding
https://bugs.webkit.org/show_bug.cgi?id=174230

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-22
Reviewed by Simon Fraser.

Because of r219045, we now only repaint the CachedImageClinets which tried
to draw the image but they could not because they have to wait for the image
decoding to finish. This was done by keeping a HashSet of these clients
and make CachedImage own it. This HashSet is cleared once the image frame
finishes decoding and all the waited clients are repainted.

But Multiple asynchronous image decoding requests are allowed for the same
frame if new data is added to the image source. If we tried to draw the
same image twice before it finishes decoding the first request, we will
not be to record this second request since the HashSet will not add the
same client twice. When he second request finishes decoding, CachedImage
will not repaint any client since its HashSet is empty.

To fix this problem we can do the following. When an image frame finishes
decoding, CachedImage will keep its HashSet of pending drawing clients as
long as the image frame is a partially loaded frame.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
(WebCore::CachedImage::imageFrameAvailable):

  • loader/cache/CachedImage.h:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::imageFrameAvailableAtIndex):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageFrame.cpp:

(WebCore::ImageFrame::decodingStatus):

  • platform/graphics/ImageFrame.h: Move DecodingStatus out of this class

to ImageTypes.h to avoid adding other header files to ImageObvsever.h

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::setNativeImage):
(WebCore::ImageFrameCache::cacheMetadataAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::frameDecodingStatusAtIndex):

  • platform/graphics/ImageFrameCache.h:
  • platform/graphics/ImageObserver.h:
  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::frameDecodingStatusAtIndex):

  • platform/graphics/ImageTypes.h:
  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP):

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::jpegComplete):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::pngComplete):
(WebCore::PNGImageDecoder::frameComplete):

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decode):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::decodingModeForImageDraw):

1:12 AM Changeset in webkit [219761] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Drag and Drop preview image for Twitter link is the wrong shape
https://bugs.webkit.org/show_bug.cgi?id=174731
<rdar://problem/33335616>

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText):

  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):
Apply some post-landing review feedback for r219756.

12:27 AM Changeset in webkit [219760] by Yusuke Suzuki
  • 8 edits in trunk

[WTF] Extend ThreadGroup::add results from bool to ThreadGroupAddResult
https://bugs.webkit.org/show_bug.cgi?id=174705

Reviewed by Mark Lam.

Source/WTF:

After starting using ThreadGroup to bookkeep active threads for Signals,
we would like to know tristate of ThreadGroup::add result, NewlyAdded, AlreadyAdded, NotAdded.
This patch extends the result of ThreadGroup::add from bool to ThreadGroupAddResult tristate.
Note that NotAdded is returned if the target thread is dying.

  • wtf/ThreadGroup.cpp:

(WTF::ThreadGroup::add):
(WTF::ThreadGroup::addCurrentThread):

  • wtf/ThreadGroup.h:
  • wtf/Threading.cpp:

(WTF::Thread::addToThreadGroup):

  • wtf/Threading.h:
  • wtf/threads/Signals.cpp:

(WTF::registerThreadForMachExceptionHandling):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:

(TestWebKitAPI::testThreadGroup):
(TestWebKitAPI::TEST):

Note: See TracTimeline for information about the timeline view.