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

Timeline



Nov 16, 2014:

11:59 PM Changeset in webkit [176183] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.6

Merge r175965 - [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
https://bugs.webkit.org/show_bug.cgi?id=138615
<rdar://problem/18928487>

Reviewed by David Hyatt.

Source/WebCore:

Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
expectation is only true when frame flattening is disabled.

Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):

LayoutTests:

Add a test that causes an assertion failure in affected builds.

  • fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update-expected.txt: Added.
  • fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html: Added.
11:50 PM Changeset in webkit [176182] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.6

Merge r175809 - Crash in WebCore::Node::getFlag
https://bugs.webkit.org/show_bug.cgi?id=137961

Reviewed by Antti Koivisto.

Source/WebCore:

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.

LayoutTests:

  • editing/execCommand/crash-137961-expected.txt: Added.
  • editing/execCommand/crash-137961.html: Added.
11:48 PM Changeset in webkit [176181] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.6
Merge r175807 - ASSERTION FAILED: !object
!object->parent()->isRuby() is<RenderRubyRun>(*object) (object->isInline() && (object->isBeforeContent() object->isAfterContent())) (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock

https://bugs.webkit.org/show_bug.cgi?id=137958

Reviewed by Chris Dumez.

Source/WebCore:

When a ruby element, with block behavior, dynamically changes its style
from multicol to without multicol, we have to remove its special children,
RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
the method in RenderBlockFlow base class. This patch adds both
RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
children removed normally and adds a new function - isRubyChildForNormalRemove -
to test the condition and use it in the assertion in RenderRuby*::removeChild
method.

Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html

  • rendering/RenderRuby.cpp:

(WebCore::isRubyChildForNormalRemove):
(WebCore::RenderRubyAsInline::removeChild):
(WebCore::RenderRubyAsBlock::removeChild):

LayoutTests:

  • fast/multicol/newmulticol/ruby-from-multicol-to-auto-expected.txt: Added.
  • fast/multicol/newmulticol/ruby-from-multicol-to-auto.html: Added.
11:44 PM Changeset in webkit [176180] by zandobersek@gmail.com
  • 12 edits in trunk/Source/WebCore

Replace RenderSVGResource::cast<T>() with downcast<T>()
https://bugs.webkit.org/show_bug.cgi?id=138290

Reviewed by Chris Dumez.

Add type traits for the RenderSVGResource hierarchy. This enables
using the typecasting framework in getRenderSVGResourceById() that
in return renders the RenderSVGResource::cast<>() template and all
the static s_resourceType member variables in the hierarchy removable.

  • WebCore.order:
  • rendering/svg/RenderSVGResource.h:

(WebCore::RenderSVGResource::cast): Deleted.

  • rendering/svg/RenderSVGResourceClipper.h:
  • rendering/svg/RenderSVGResourceContainer.h:

(WebCore::getRenderSVGResourceById):

  • rendering/svg/RenderSVGResourceFilter.h:

(isType):

  • rendering/svg/RenderSVGResourceLinearGradient.h:
  • rendering/svg/RenderSVGResourceMarker.h:
  • rendering/svg/RenderSVGResourceMasker.h:
  • rendering/svg/RenderSVGResourcePattern.h:
  • rendering/svg/RenderSVGResourceRadialGradient.h:
  • rendering/svg/RenderSVGResourceSolidColor.h:
11:43 PM Changeset in webkit [176179] by Carlos Garcia Campos
  • 3 edits
    2 adds
    1 delete in releases/WebKitGTK/webkit-2.6/Source/WebInspectorUI

Merge r176080 - Web Inspector: Replace PDF Probes icon with SVG version
https://bugs.webkit.org/show_bug.cgi?id=137296

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/NavigationItemProbes.pdf: Removed.
  • UserInterface/Images/NavigationItemProbes.svg: Added.
  • UserInterface/Views/ProbeDetailsSidebarPanel.js:

(WebInspector.ProbeDetailsSidebarPanel): Use NavigationItemProbes.svg.

  • UserInterface/Images/gtk/NavigationItemProbes.svg: Added.
11:40 PM Changeset in webkit [176178] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.6

Merge r176091 - AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
https://bugs.webkit.org/show_bug.cgi?id=137867

Reviewed by Chris Fleizach.

Source/WebCore:

Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.

Test: platform/gtk/accessibility/detached-object-role.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetRole):

Tools:

Add ATK_ROLE_INVALID to roleToString. Remove the null AtkRole check in
AccessibilityUIElement::role: ATK_ROLE_INVALID = 0, and we need to be
able to test for the presence of ATK_ROLE_INVALID.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::role):

LayoutTests:

  • platform/gtk/accessibility/detached-object-role-expected.txt: Added.
  • platform/gtk/accessibility/detached-object-role.html: Added.
11:35 PM Changeset in webkit [176177] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.6

Merge r176076 - AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
https://bugs.webkit.org/show_bug.cgi?id=137866

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Check that the AccessibilityMenuList is really focused before notifying
the platform that it is focused. Likewise, only notify the platform of
an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
containing that option is expanded.

Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

  • platform/gtk/accessibility/menu-list-unfocused-notifications-expected.txt: Added.
  • platform/gtk/accessibility/menu-list-unfocused-notifications.html: Added.
11:31 PM Changeset in webkit [176176] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.6

Merge r175724 - slow_path_get_direct_pname() needs to be hardened against a constant baseValue.
<https://webkit.org/b/138476>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

slow_path_get_direct_pname() currently assumes that the baseValue is always a
non-constant virtual register. However, this is not always the case like in the
following:

function foo() {

var o = { a:1 };
for (var n in o)

0[n];

}
foo();

This patch fixes it to also check for constant virtual register indexes.

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

LayoutTests:

  • js/get-by-pname-expected.txt:
  • js/script-tests/get-by-pname.js:

(getByPnameOnConstant):
(getByPnameOnVar):

  • Added more test cases.
11:03 PM Changeset in webkit [176175] by benjamin@webkit.org
  • 3 edits in trunk/Source/WebKit2

Start cleaning up minimal UI from WKWebView
https://bugs.webkit.org/show_bug.cgi?id=138725

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-16
Reviewed by Sam Weinig.

Start removing the old update path for minimumLayoutSize/maximumUnobscuredSize.

Unfortunately, I cannot remove everything yet because the clients still did not have
alternatives to [_overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride]
and might change the minimal UI options.

This patch adds [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride] to move
in the right direction. Next we'll udpate the client code and get rid of all the useless code.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
11:01 PM Changeset in webkit [176174] by benjamin@webkit.org
  • 18 edits
    32 adds in trunk

Implement :valid and :invalid matching for the fieldset element
https://bugs.webkit.org/show_bug.cgi?id=138769

Reviewed by Darin Adler.

Source/WebCore:

In the latest HTML spec, the pseudo classes :valid and :invalid match
a fieldset element based on its descendants:

https://html.spec.whatwg.org/#selector-valid
https://html.spec.whatwg.org/#selector-invalid

This patch adds that behavior.

There are two key problems to solve with these pseudo classes on fieldset:
-Efficient matching.
-Style invalidation when any of the descendant changes.

To implement the style invalidation, I have modified HTMLFormControlElement
to notify its ancestor when its state changes.

The first change is making the state fully internal to HTMLFormControlElement,
we do not want subclass to be able to change the behavior and forget to update
the ancestors.

To achieve that encapsulation, the interface was changed a bit:
-Neither willValidate() nor isValidFormControlElement() inherit from Element.

Instead, willValidate() is the implementation of FormAssociatedElement's interface
and it is final. The method isValidFormControlElement() becomes completely internal
to HTMLFormControlElement.

-Since willValidate() should no longer be re-implemented by subclass, the elements

that were depending on it have been migrated to recalcWillValidate() to set
the initial state as needed.

With the validity state fully encapsulated in HTMLFormControlElement, all I need
is a way to communicate that information to HTMLFieldSetElement ancestors.
This is done in two cases:
-The validity state changes.
-The tree changes in a way that would make the input element not a descendant

of a HTMLFieldSetElement.

The invalidation is simply done by walking up the ancestors and adding the current
element to a "validity dependency list" on each HTMLFieldSetElement.

Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html

fast/css/pseudo-invalid-fieldset-style-sharing.html
fast/css/pseudo-invalid-fieldset.html
fast/css/pseudo-valid-fieldset-invalidation-optimization.html
fast/css/pseudo-valid-fieldset-style-sharing.html
fast/css/pseudo-valid-fieldset.html
fast/selectors/invalid-fieldset-style-update-1.html
fast/selectors/invalid-fieldset-style-update-2.html
fast/selectors/invalid-fieldset-style-update-3.html
fast/selectors/invalid-fieldset-style-update-4.html
fast/selectors/invalid-fieldset-style-update-5.html
fast/selectors/valid-fieldset-style-update-1.html
fast/selectors/valid-fieldset-style-update-2.html
fast/selectors/valid-fieldset-style-update-3.html
fast/selectors/valid-fieldset-style-update-4.html
fast/selectors/valid-fieldset-style-update-5.html

  • css/SelectorCheckerTestFunctions.h:

(WebCore::isInRange):
(WebCore::isOutOfRange):
(WebCore::isInvalid):
(WebCore::isValid):
The hack "ContainsValidityStyleRules" is in the way of correct styling
of FieldSet and Form.
It is not the right way to get stylesheet properties anyway.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::canShareStyleWithControl):
Make sure style sharing does not incorrectly share style for fieldset elements.

  • dom/Document.cpp:

(WebCore::Document::Document):

  • dom/Document.h:

(WebCore::Document::containsValidityStyleRules): Deleted.
(WebCore::Document::setContainsValidityStyleRules): Deleted.

  • dom/Element.h:

(WebCore::Element::matchesValidPseudoClass):
(WebCore::Element::matchesInvalidPseudoClass):
(WebCore::Element::willValidate): Deleted.
(WebCore::Element::isValidFormControlElement): Deleted.

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::customError):

  • html/FormAssociatedElement.h:
  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
(WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
Each HTMLFormControlElement that has constraint validation adds or removes
itself from its HTMLFieldSetElement ancestors.

It should be possible to just keep track of a count instead of a HashSet.
I decided to got with the HashSet to make the code more robust and easier
to debug. A few assertions ensure that the HashSet is actually used as a counter.

  • html/HTMLFieldSetElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::addInvalidElementToAncestorFromInsertionPoint):
(WebCore::removeInvalidElementToAncestorFromInsertionPoint):

(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::removedFrom):
One tricky part of those two functions is that we cannot use
matchesValidPseudoClass() or matchesInvalidPseudoClass().

The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
and it has its own definition of what Valid and Invalid mean when matching selectors.

In HTMLFormControlElement, we must use the internal state,
willValidate() and isValidFormControlElement() must be used directly.

(WebCore::HTMLFormControlElement::matchesValidPseudoClass):
(WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::addInvalidElementToAncestors):
(WebCore::removeInvalidElementFromAncestors):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::setNeedsValidityCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::isValidFormControlElement):

  • html/HTMLKeygenElement.h:
  • html/HTMLObjectElement.h:
  • html/HTMLOutputElement.h:

LayoutTests:

There are many ways to change the validation state of a submittable element.
I included a series of test trying to exercises as many combination
as possible.

  • fast/css/pseudo-valid-unapplied-expected.txt:
  • fast/css/pseudo-valid-unapplied.html:

This test was checking that :valid and :invalid are not applied
to fieldset. Such results are incorrect with the latest specification.

  • fast/css/pseudo-invalid-fieldset-expected.html: Added.
  • fast/css/pseudo-invalid-fieldset-invalidation-optimization-expected.txt: Added.
  • fast/css/pseudo-invalid-fieldset-invalidation-optimization.html: Added.
  • fast/css/pseudo-invalid-fieldset-style-sharing-expected.html: Added.
  • fast/css/pseudo-invalid-fieldset-style-sharing.html: Added.
  • fast/css/pseudo-invalid-fieldset.html: Added.
  • fast/css/pseudo-valid-fieldset-expected.html: Added.
  • fast/css/pseudo-valid-fieldset-invalidation-optimization-expected.txt: Added.
  • fast/css/pseudo-valid-fieldset-invalidation-optimization.html: Added.
  • fast/css/pseudo-valid-fieldset-style-sharing-expected.html: Added.
  • fast/css/pseudo-valid-fieldset-style-sharing.html: Added.
  • fast/css/pseudo-valid-fieldset.html: Added.
  • fast/selectors/invalid-fieldset-style-update-1-expected.txt: Added.
  • fast/selectors/invalid-fieldset-style-update-1.html: Added.
  • fast/selectors/invalid-fieldset-style-update-2-expected.txt: Added.
  • fast/selectors/invalid-fieldset-style-update-2.html: Added.
  • fast/selectors/invalid-fieldset-style-update-3-expected.txt: Added.
  • fast/selectors/invalid-fieldset-style-update-3.html: Added.
  • fast/selectors/invalid-fieldset-style-update-4-expected.txt: Added.
  • fast/selectors/invalid-fieldset-style-update-4.html: Added.
  • fast/selectors/invalid-fieldset-style-update-5-expected.txt: Added.
  • fast/selectors/invalid-fieldset-style-update-5.html: Added.
  • fast/selectors/valid-fieldset-style-update-1-expected.txt: Added.
  • fast/selectors/valid-fieldset-style-update-1.html: Added.
  • fast/selectors/valid-fieldset-style-update-2-expected.txt: Added.
  • fast/selectors/valid-fieldset-style-update-2.html: Added.
  • fast/selectors/valid-fieldset-style-update-3-expected.txt: Added.
  • fast/selectors/valid-fieldset-style-update-3.html: Added.
  • fast/selectors/valid-fieldset-style-update-4-expected.txt: Added.
  • fast/selectors/valid-fieldset-style-update-4.html: Added.
  • fast/selectors/valid-fieldset-style-update-5-expected.txt: Added.
  • fast/selectors/valid-fieldset-style-update-5.html: Added.
10:49 PM Changeset in webkit [176173] by zandobersek@gmail.com
  • 8 edits in trunk/Source

[TexMap] Add typecasting support for GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=138741

Reviewed by Martin Robinson.

Source/WebCore:

Add type traits for the GraphicsLayerTextureMapper class.
This enables using typecasting functions instead of
toGraphicsLayerTextureMapper().

Remove toTextureMapperLayer() casting function which actually
returned the TextureMapperLayer object that belonged to the
passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
object is now downcasted and the TextureMapperLayer is accessed
by calling the GraphicsLayerTextureMapper::layer() method.

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::toTextureMapperLayerVector):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::toTextureMapperLayer): Deleted.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

(WebCore::toGraphicsLayerTextureMapper): Deleted.

Source/WebKit/win:

Switch to using downcast<GraphicsLayerTextureMapper>() and replace
uses of toTextureMapperLayer() with downcasting and calling
the GraphicsLayerTextureMapper::layer() method.

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::initialize):
(AcceleratedCompositingContext::startedAnimation):
(AcceleratedCompositingContext::compositeLayersToContext):

Source/WebKit2:

Replace uses of toTextureMapperLayer() with downcasting and
calling the GraphicsLayerTextureMapper::layer() method.

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::compositeLayersToContext):

10:46 PM Changeset in webkit [176172] by gyuyoung.kim@samsung.com
  • 14 edits in trunk/Source/WebCore

Move WebCore/loader to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138646

Reviewed by Chris Dumez.

Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
However this patch leaves ResourceRequest::adopt() because this need
to be handled by different patch.

No new tests, no behavior changes.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):

  • loader/DocumentThreadableLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::notifyDone):

  • loader/SubresourceLoader.h:
  • loader/TextTrackLoader.h:
  • loader/appcache/ApplicationCacheHost.h:
  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::storeCopyOfCache):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestPreload):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):

  • loader/cache/CachedResourceLoader.h:
  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::deleteAllPreparedStatements):
(WebCore::readySQLiteStatement):

  • loader/icon/IconDatabase.h:
  • loader/icon/IconRecord.h:
9:41 PM Changeset in webkit [176171] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash when setting 'order' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138780

Reviewed by Darin Adler.

Source/WebCore:

CSS Calculated values were not handled by the CSS parser for 'order'
CSS property. As a result, using calculated values wouldn't work in
release builds and would hit an assertion in debug builds.

This patch updates the CSS parser to directly convert the
CSS Calculated value into a simple integer CSSPrimitiveValue for
'order' property. We could have marked CSS Calculated values as
valid in the CSS Parser instead but this would have brought issues:

  • The calculated value needs to be adjusted to INT_MIN + 2 if it is less than that. This would force us to calculate the expression anyway.
  • The StyleBuilder would need updating to properly handle CSS Calculated values for 'order'.

Test: fast/css/order-calculated-value.html

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):

LayoutTests:

Add a layout test to validate that setting a calculated value to the
'order' CSS property does not crash and behaves as expected.

  • fast/css/order-calculated-value-expected.txt: Added.
  • fast/css/order-calculated-value.html: Added.
9:38 PM Changeset in webkit [176170] by Chris Dumez
  • 4 edits
    2 adds in trunk

Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
https://bugs.webkit.org/show_bug.cgi?id=138770

Reviewed by Darin Adler.

Source/WebCore:

When setting a very large value to a CSS property, it is represented internally as
infinity. r166114 already tried to deal with this by adding an std::isinf() check
in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
CSSValueInvalid value in such case. The issue is that doing leads to the
StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
handled and leads to assertions.

This patch updates the CSSParser to detect cases where the double value is
infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
that we mark the value as invalid and actually drop it. As a result,
CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
StyleBuilder.

Test: fast/css/style-builder-infinite-value.html

fast/css/infinite-floating-value.html

  • css/CSSParser.cpp:

(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::validUnit):

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createValue):

LayoutTests:

Add a layout test setting very large values to 'border-width' and
'font-size' CSS properties.

  • fast/css/style-builder-infinite-value-expected.txt: Added.
  • fast/css/style-builder-infinite-value.html: Added.
9:14 PM Changeset in webkit [176169] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-16
Reviewed by Darin Adler.

Source/WebCore:

attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.

Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):

  • html/HTMLAnchorElement.h:
  • html/HTMLAnchorElement.idl:

LayoutTests:

  • fast/dom/HTMLAnchorElement/anchor-text-attribute-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-text-attribute.html: Added.
8:35 PM Changeset in webkit [176168] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Move 'vertical-align' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138764

Reviewed by Darin Adler.

Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.

No new tests, no behavior change.

  • css/CSSPropertyNames.in:
  • css/DeprecatedStyleBuilder.cpp:

(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
(WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderFunctions::applyValueVerticalAlign):

7:27 PM Changeset in webkit [176167] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Test expectation gardening.

  • platform/mac/TestExpectations:
5:57 PM Changeset in webkit [176166] by timothy_horton@apple.com
  • 5 edits in trunk/Source

Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>

Follow-up to r176164.

  • UIProcess/API/mac/WKView.mm:

(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):

  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::didPerformDictionaryLookup):
Include the softlinking macros directly in the files they're used
in, as they're supposed to be used.

  • platform/spi/mac/LookupSPI.h:

(WebCore::canDisableLookupIndicator): Deleted.
Remove canDisableLookupIndicator.

5:18 PM Changeset in webkit [176165] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash when setting '-webkit-line-clamp' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138777

Reviewed by Benjamin Poulain.

Source/WebCore:

CSS Calculated values were not handled when converting a CSSPrimitiveValue
to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
assertion. To address this issue, this patch updates the code to use
primitiveType() / getValue<>() instead of m_primitiveUnitType /
m_value.num, as those getter function properly handle CSS Calculated
values.

Test: fast/css/webkit-line-clamp-calculated-value.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator LineClampValue):

LayoutTests:

Add a layout test to check that assigning calculated values to the
'-webkit-line-clamp' CSS property does not crash and behaves as
expected.

  • fast/css/webkit-line-clamp-calculated-value-expected.txt: Added.
  • fast/css/webkit-line-clamp-calculated-value.html: Added.
12:41 PM Changeset in webkit [176164] by timothy_horton@apple.com
  • 28 edits
    1 add in trunk/Source

Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>

Reviewed by Anders Carlsson.

In order to make the yellow highlight for Lookup more accurately match the
painted content of the web page (in light of e.g. Web fonts, and interesting
text features that only WebKit implements and cannot round-trip through
NSAttributedString), use a TextIndicator instead of the built-in Lookup
highlight where possible.

  • Configurations/BaseTarget.xcconfig:

Make it possible to include headers from private frameworks. This matches WebCore.

  • Shared/DictionaryPopupInfo.cpp:

(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):

  • Shared/DictionaryPopupInfo.h:

Include the attributed string inside the DictionaryPopupInfo, instead of
as a secondary argument to DidPerformDictionaryLookup.
Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
the text in the UI process.

  • UIProcess/API/mac/WKView.mm:

(-[WKView dealloc]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _dictionaryLookupPopoverWillClose:]):
(-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
(-[WKView _setTextIndicator:fadeOut:animate:]):
(-[WKView initWithFrame:context:configuration:webView:]):
(+[WKView hideWordDefinitionWindow]):

  • UIProcess/API/mac/WKViewInternal.h:

Adopt the Lookup SPI header.
If we have the requisite API, register the notification that Lookup sends
when the popover closes, and hook that up to hide the text indicator.
Add a version of _setTextIndicator: that takes an animation completion handler.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didPerformDictionaryLookup):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::didPerformDictionaryLookup):
Adjust to the new didPerformDictionaryLookup signature.

  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface):
Remove a WKSI import.

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::didPerformDictionaryLookup):
If we have the requisite API, disable Lookup's built-in highlight and
present a TextIndicator instead.
We currently have to run the animations serially (first bounce the TextIndicator,
then animate in the Lookup popover) because the act of adding the Lookup popover
blocks us from getting any animation events for the TextIndicator, and breaks
the bounce. We could also fix this by using a threaded animation for the TextIndicator,
but it's not clear that it's safe to do so.

(WebKit::PageClientImpl::dismissDictionaryLookupPanel):
When explicitly dismissing the Lookup panel, also hide the text indicator.

  • UIProcess/mac/TextIndicatorWindow.h:
  • UIProcess/mac/TextIndicatorWindow.mm:

(WebKit::TextIndicatorWindow::setTextIndicator):
Store the completion handler.

(WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
Call the completion handler when the animation completes.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _createActionMenuItemForTag:]):
Disable the Lookup item if lookup is not available.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::showDefinitionForAttributedString):
Adjust to the new didPerformDictionaryLookup signature.
Since PDFPlugin can't trivially repaint the required part of the PDF,
we don't build a TextIndicator. This will result in PDFPlugin continuing
to use Lookup's built-in highlight.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performDictionaryLookupForRange):
Build a TextIndicator from the Lookup range and pass it along with
the DictionaryPopupInfo.

  • WebCore.exp.in:
  • platform/mac/WebCoreSystemInterface.h:
  • platform/mac/WebCoreSystemInterface.mm:

Remove a WKSI import/export that we don't need anymore.

  • platform/spi/mac/LookupSPI.h: Added.

(WebCore::canDisableLookupIndicator):
Add Lookup SPI header.
Add a 'canDisableLookupIndicator', which must be called in any translation
unit that wants to use either of the soft-linked constants related to
that functionality, before calling the get* function.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/mac/DictionaryLookup.mm:

(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
Adopt the Lookup SPI header.

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface):
Remove a WKSI import.

  • WebView/WebActionMenuController.mm:

(-[WebActionMenuController _lookupText:]):
(-[WebActionMenuController _createActionMenuItemForTag:]):
Make use of the new Lookup SPI header.
Disable the Lookup item if lookup is not available.

9:13 AM Changeset in webkit [176163] by jdiggs@igalia.com
  • 2 edits in trunk/Source/WebCore

AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
https://bugs.webkit.org/show_bug.cgi?id=138776

Reviewed by Chris Fleizach.

r166288 used #if...#else instead of #if...#endif, thus disabling the old
AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
new AtkValue API. Thus r166288 broke access to value-holding elements for
AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.

No new tests because catching this regression would require AT-SPI2.

  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp:

(webkitAccessibleValueGetMinimumIncrement):
(webkitAccessibleValueInterfaceInit):

8:51 AM Changeset in webkit [176162] by jdiggs@igalia.com
  • 12 edits in trunk

AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
https://bugs.webkit.org/show_bug.cgi?id=138771

Reviewed by Chris Fleizach.

Source/WebCore:

Add BlockquoteRole and assigns it to blockquote elements. Make
corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
for GTK and EFL; AXGroup (which was being used already) for the Mac.

No new tests are required. Instead, updated the existing expectations
to reflect the new mapping.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::determineAccessibilityRole):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isBlockquote):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):

Tools:

Add mapping for ATK_ROLE_BLOCK_QUOTE in roleToString()

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Updated the expectations for GTK and EFL as there is a new role
being used. The Mac expectations were not updated because the
new role on that platform continues to be to AXGroup.

  • platform/efl/accessibility/roles-exposed-expected.txt: Updated
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated
7:54 AM Changeset in webkit [176161] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash when setting 'alt' CSS property to inherit or initial
https://bugs.webkit.org/show_bug.cgi?id=138774
<rdar://problem/18995409>

Reviewed by Chris Fleizach.

Source/WebCore:

The StyleResolver was not handling 'inherit' or 'initial' values for
'alt' CSS property. As a result, the code was assuming the CSSValue
was a CSSPrimitiveValue (although it could be a CSSInitialValue or
a CSSInheritValue). In such case, the code would dereference a null
pointer because primitiveValue is initialized using:
CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)

? downcast<CSSPrimitiveValue>(value)
: nullptr;

Test: fast/css/alt-inherit-initial.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

LayoutTests:

Add a layout test to verify that setting the 'alt' CSS property to
inherit / initial is not crashing and working as intended.

  • fast/css/alt-inherit-initial-expected.txt: Added.
  • fast/css/alt-inherit-initial.html: Added.

Nov 15, 2014:

11:34 PM Changeset in webkit [176160] by jdiggs@igalia.com
  • 5 edits in trunk

AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
https://bugs.webkit.org/show_bug.cgi?id=127060

Reviewed by Chris Fleizach.

Source/WebCore:

Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.

No new tests. Instead, updated the expectations of roles-exposed.html to
reflect the corrected mapping.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

Updated the expectations to reflect the corrected role.

  • platform/efl/accessibility/roles-exposed-expected.txt: updated
  • platform/gtk/accessibility/roles-exposed-expected.txt: updated
11:32 PM Changeset in webkit [176159] by jdiggs@igalia.com
  • 11 edits in trunk

AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
https://bugs.webkit.org/show_bug.cgi?id=138767

Reviewed by Chris Fleizach.

Source/WebCore:

Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
in environments which have an older version of ATK.

No new tests are required. Instead, existing expectations were updated
to reflect the new mapping.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

Tools:

Add mappings for ATK_ROLE_AUDIO and ATK_ROLE_VIDEO to roleToString().

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Updated expectations to reflect the new mapping to ATK_ROLE_AUDIO and
ATK_ROLE_VIDEO.

  • platform/efl/accessibility/media-element-expected.txt: updated
  • platform/efl/accessibility/media-emits-object-replacement-expected.txt: updated
  • platform/gtk/accessibility/media-controls-panel-title-expected.txt: updated
  • platform/gtk/accessibility/media-controls-panel-title.html: updated
  • platform/gtk/accessibility/media-element-expected.txt: updated
  • platform/gtk/accessibility/media-emits-object-replacement-expected.txt: updated
11:26 PM Changeset in webkit [176158] by jdiggs@igalia.com
  • 6 edits in trunk

AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
https://bugs.webkit.org/show_bug.cgi?id=138773

Reviewed by Chris Fleizach.

Source/WebCore:

Map FooterRole to ATK_ROLE_FOOTER.

No new tests. Unskipped a test that verifies this mapping.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

  • accessibility/roles-exposed.html: Unskip the footer element test for GTK and EFL
  • platform/efl/accessibility/roles-exposed-expected.txt: Updated expectations
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated expectations
3:02 PM Changeset in webkit [176157] by dino@apple.com
  • 33 edits
    6 moves in trunk

Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
https://bugs.webkit.org/show_bug.cgi?id=138763
<rdar://problem/18991569>

Reviewed by Simon Fraser.

Source/WebCore:

Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
CSSKeyframeRule and CSSKeyframesRule respectively.

This *may* break some existing content, but is compatible with
what Blink and Firefox are doing. To minimize breakage, I kept an
alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
and WEBKIT_KEYFRAME_RULE.

Covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJS):

  • bindings/objc/DOMCSS.mm:

(kitClass):

  • css/CSSGrammar.y.includes:
  • css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.

(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::~StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
(WebCore::StyleKeyframe::parseKeyString):
(WebCore::StyleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::CSSKeyframeRule::~CSSKeyframeRule):
(WebCore::CSSKeyframeRule::style):
(WebCore::CSSKeyframeRule::reattach):

  • css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.

(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::keyText):
(WebCore::StyleKeyframe::setKeyText):
(WebCore::StyleKeyframe::getKeys):
(WebCore::StyleKeyframe::properties):

  • css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
  • css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.

(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::CSSKeyframesRule::CSSKeyframesRule):
(WebCore::CSSKeyframesRule::~CSSKeyframesRule):
(WebCore::CSSKeyframesRule::setName):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::insertRule):
(WebCore::CSSKeyframesRule::deleteRule):
(WebCore::CSSKeyframesRule::findRule):
(WebCore::CSSKeyframesRule::cssText):
(WebCore::CSSKeyframesRule::length):
(WebCore::CSSKeyframesRule::item):
(WebCore::CSSKeyframesRule::cssRules):
(WebCore::CSSKeyframesRule::reattach):

  • css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.

(WebCore::StyleRuleKeyframes::create):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::name):
(WebCore::StyleRuleKeyframes::setName):
(WebCore::StyleRuleKeyframes::copy):

  • css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
  • css/CSSParser.cpp:
  • css/CSSRule.h:
  • css/CSSRule.idl:
  • css/CSSStyleSheet.cpp:
  • css/RuleSet.cpp:
  • css/StyleResolver.cpp:
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::createCSSOMWrapper):

  • inspector/InspectorStyleSheet.cpp:

(WebCore::asCSSRuleList):

LayoutTests:

Some of the tests use the prefixed interface name. Replace that
with the unprefixed version.

The "keyframes-rule.html" test added a check to make sure the
old constant WEBKIT_KEYFRAMES_RULE is the same as the new
constant KEYFRAMES_RULE.

  • animations/keyframes-rule-expected.txt:
  • animations/keyframes-rule.html:
  • fast/dom/resources/wrapper-identity-base.js:
  • fast/dom/wrapper-classes.html:
  • fast/dom/wrapper-identity-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/fast/dom/objc-wrapper-identity-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
10:57 AM Changeset in webkit [176156] by ddkilzer@apple.com
  • 6 edits in trunk/Source

REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore

This regressed with the following commit:

Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>

Source/WebCore:

This fixes the following build failures:

In file included from WebCore/editing/mac/DataDetection.mm:29:
WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
@property NSRect highlightFrame;


WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)


2 errors generated.

  • WebCore.exp.in:

(DataDetection::detectItemAroundHitTestResult): Move symbol from
shared section to Mac-only section.

  • editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around

the entire implementation since it it unused on iOS.

  • platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)

check around DDActionContext class declarations.

Source/WebKit2:

  • Shared/mac/ActionMenuHitTestResult.mm: Add PLATFORM(MAC) check

around the entire implementation since it it unused on iOS.

10:41 AM Changeset in webkit [176155] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Raise an exception if -[WKWebView initWithFrame:configuration:] is passed a nil configuration
https://bugs.webkit.org/show_bug.cgi?id=138757

Reviewed by Simon Fraser.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView initWithFrame:configuration:]):

12:37 AM Changeset in webkit [176154] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Network process crash when running http/tests/appcache/fallback.html
https://bugs.webkit.org/show_bug.cgi?id=138740

Reviewed by Alexey Proskuryakov.

It happens because ResourceHandle::continueWillSendRequest() is
called with a null request. We could handle that case in the
ResourceHandle, but the thing is tha the behaviour is
not the same for async loads, or when loading in the web
process. In WebResourceLoader::willSendRequest(),
ResourceRequest::willSendRequest() is called, and cancels the load
if the client returns a null request. In this case, the
ResourceLoader is detached and WebResourceLoader::willSendRequest()
returns early without sending the ContinueWillSendRequest message
to the network process. However, for synchronous loads,
NetworkResourceLoader::continueWillSendRequest() is always called.

Fixes http/tests/appcache/fallback.html for GTK port when using
the network process.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRequest): Do not
call ResourceHandle::continueWillSendRequest() if the client
request is null, since the load is going to be cancelled.

12:12 AM Changeset in webkit [176153] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Implement data detectors and mailto action menus for WebKit1
https://bugs.webkit.org/show_bug.cgi?id=138765
<rdar://problem/18877535>

Reviewed by Beth Dakin.

  • WebView/WebActionMenuController.h:
  • WebView/WebActionMenuController.mm:

(-[WebActionMenuController willOpenMenu:withEvent:]):
Tell DataDetectors that the menu is going to open.
Select the text (or not) based on the number of items in the menu, just like WebKit2.

(-[WebActionMenuController didCloseMenu:withEvent:]):
Tell DataDetectors that the menu closed.

(-[WebActionMenuController _defaultMenuItemsForLink]):
Move these checks out of _defaultMenuItemsForLink, because we expect this
to always return a complete link menu.

(-[WebActionMenuController _defaultMenuItemsForMailtoLink]):
Implement. More or less copied from WebKit2.

(-[WebActionMenuController _selectDataDetectedText]):
Select the stashed range.

(-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
Implement. More or less copied from WebKit2.
The yellow highlight isn't hooked up yet.
Give the client a chance to override via _webView:actionContextForHitTestResult:range:.

(-[WebActionMenuController _selectLookupText]):
Remove an unnecessary return.

(-[WebActionMenuController _defaultMenuItems]):
Call into the two new menu types.

  • WebView/WebUIDelegatePrivate.h:
  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _defaultMenuItemsForMailtoLink]):

Note: See TracTimeline for information about the timeline view.