Timeline



Apr 3, 2016:

10:26 PM Changeset in webkit [198995] by ggaren@apple.com
  • 13 edits in trunk/Source/bmalloc

bmalloc: segregate small and large objects again, and allocate more objects on the small path
https://bugs.webkit.org/show_bug.cgi?id=156152

Reviewed by Sam Weinig.

Microbenchmark data suggested that it was a good idea for small and large
objects to share memory. But r198675 did not improve memory use in
full browser benchmarks.

This patch reverts to segregating small and large objects -- but without
going back to doubled VM usage -- in order to capture a few benefits:

(*) Small pages fragment the large heap. Separating them out saves a lot
of memory in our worst case fragmentation recording:

nimlang 276,076kB 209,636kB 1.32x smaller

(*) Small objects are common enough that even their slow paths benefit
from simpler code:

Execution Time:

...
facebook 234ms 216ms 1.08x faster
reddit 114ms 108ms
1.06x faster
flickr 118ms 111ms 1.06x faster
theverge 146ms 140ms
1.04x faster
...
<arithmetic mean> 107ms 102ms 1.04x faster

(*) We can use less metadata:

Memory at End:

...
list_allocate 460kB 384kB 1.2x smaller
tree_allocate 492kB 424kB
1.16x smaller
tree_churn 480kB 404kB 1.19x smaller
fragment 532kB 452kB
1.18x smaller
fragment_iterate 712kB 588kB 1.21x smaller
medium 15,152kB 11,796kB
1.28x smaller
big 15,044kB 10,976kB 1.37x smaller
...
<arithmetic mean> 7,724kB 7,190kB
1.07x smaller

This patch also takes advantage of our support for varying the page size
at runtime by allocating more objects on the small object path:

medium 178ms 150ms 1.19x faster

Some microbenchmarks report memory use increases from this change -- like
they reported memory use decreases from r198675 -- but I'm ignoring them
for now because I expect our full browser memory benchmarks to confirm
that this patch is fine.

  • bmalloc/BumpAllocator.h:

(bmalloc::BumpAllocator::BumpAllocator): Use a full unsigned because we
can allocate objects larger than 16kB - 1, and a full unsigned does not
make BumpAllocator any larger on 64bit systems.

  • bmalloc/Chunk.h:

(bmalloc::Chunk::begin):
(bmalloc::Chunk::end):
(bmalloc::Chunk::size):
(bmalloc::Chunk::objectType): Store ObjectType in the Chunk, since it only
varies by Chunk now, and not from page to page within a Chunk. Also,
union together small and large object metadata, since we will only use
one or the other. This saves memory.

(bmalloc::Chunk::Chunk): Conditionalize initialization based on object
type, since only one kind of metadata or the other can be used at runtime.

(bmalloc::Object::Object):
(bmalloc::Object::begin):
(bmalloc::SmallPage::end): Deleted.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::initializeLineMetadata): Save a little space, since we
know that lines are only 256 bytes long.

(bmalloc::Heap::initializePageMetadata): Store a dynamic page size for
each size class. We used to use only one page size (the system page size)
but that limited our ability to allocate objects larger than 1kB on the
small object path. Now we can handle any object size we want by storing
objects of that size in a custom page size.

(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPages): Revert to our old linked list
strategy for storing small pages.

(bmalloc::Heap::splitAndAllocate): Object type is per Chunk now.

(bmalloc::Heap::allocateLarge): Don't nuke the small page list when
allocating a large object because the two don't share memory anymore.

(bmalloc::Heap::allocateSmallPage): Revert to our old linked list
strategy for storing small pages.

(bmalloc::Heap::deallocateSmallLine): Don't return early in the case
where this is the first free object in the page. In the case of large-ish
objects, the first free object might also be the last free object,
since there's one object per page.

(bmalloc::Heap::allocateSmallBumpRangesByMetadata): Split out some helper
lambdas to make this code clearer.

(bmalloc::Heap::allocateSmallBumpRangesByObject): Added a fast scan
for objects larger than the line size. When multiple objects fit in
a single line, it's an optimization to scan a line at a time. But when
it's one object per line, or one object per 64 lines, it's better just
to scan an object at a time.

  • bmalloc/Heap.h:

(bmalloc::Heap::allocateSmallBumpRanges):
(bmalloc::Heap::derefSmallLine): Match the changes above.

  • bmalloc/LineMetadata.h: We weren't using all those bits.
  • bmalloc/List.h:

(bmalloc::List::remove): Put a removed Node fully back into the default
(empty) state it was in before it entered the list. This change is not
observable, but it makes things clearer when you're debugging.

  • bmalloc/Object.h:

(bmalloc::Object::Object):
(bmalloc::Object::chunk):
(bmalloc::Object::offset):
(bmalloc::Object::operator+):
(bmalloc::Object::operator<=): Added some helpers for iterating by object.

  • bmalloc/ObjectType.cpp:

(bmalloc::objectType): Updated for API change.

  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize): Support more page sizes.

  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::SmallPage):
(bmalloc::SmallPage::objectType): Deleted.
(bmalloc::SmallPage::setObjectType): Deleted.
(bmalloc::SmallPage::smallPageCount): Deleted.
(bmalloc::SmallPage::setSmallPageCount): Deleted. Object type is per
Chunk now, and we can infer page count from size class.

  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::allocateChunk):
(bmalloc::VMHeap::allocateSmallChunk):

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::deallocateSmallPage):
(bmalloc::VMHeap::allocateLargeObject): Support our old behavior of
storing free pages in linked lists.

4:01 PM Changeset in webkit [198994] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Remove unneeded UsePointersEvenForNonNullableObjectArguments in WebKitCSSMatrix.idl
https://bugs.webkit.org/show_bug.cgi?id=156142

Reviewed by Sam Weinig.

  • css/WebKitCSSMatrix.idl: Removed UsePointersEvenForNonNullableObjectArguments.

It was having no effect, I think because there were no non-nullable object arguments.

3:00 PM Changeset in webkit [198993] by clopez@igalia.com
  • 83 edits
    65 adds in trunk/LayoutTests

[GTK] Unreviewed GTK gardening.

Rebaseline many SVG tests after r197814 and mark new reported failures.

  • platform/gtk/TestExpectations:
  • platform/gtk/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/filters-felem-01-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/interact-pointer-03-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/painting-control-04-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/painting-control-04-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/painting-marker-07-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/paths-dom-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/pservers-pattern-04-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-05-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-tref-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-tspan-02-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/types-dom-07-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-24-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-24-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/filters-light-04-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/filters-turb-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/filters-turb-02-f-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-06-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-07-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-08-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/render-groups-01-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/render-groups-03-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-align-08-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-align-08-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-fonts-03-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-fonts-03-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-01-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-02-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-03-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-04-t-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt: Added.
  • platform/gtk/svg/batik/text/textEffect-expected.png:
  • platform/gtk/svg/batik/text/textEffect-expected.txt: Added.
  • platform/gtk/svg/batik/text/textEffect3-expected.png:
  • platform/gtk/svg/batik/text/textEffect3-expected.txt: Added.
  • platform/gtk/svg/batik/text/textPosition2-expected.png:
  • platform/gtk/svg/batik/text/textPosition2-expected.txt:
  • platform/gtk/svg/custom/glyph-selection-arabic-forms-expected.png:
  • platform/gtk/svg/custom/glyph-selection-arabic-forms-expected.txt:
  • platform/gtk/svg/custom/glyph-selection-non-bmp-expected.png:
  • platform/gtk/svg/custom/glyph-selection-non-bmp-expected.txt:
  • platform/gtk/svg/custom/glyph-setting-d-attribute-expected.txt: Added.
  • platform/gtk/svg/custom/glyph-transformation-with-hkern-expected.png:
  • platform/gtk/svg/custom/glyph-transformation-with-hkern-expected.txt: Added.
  • platform/gtk/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png:
  • platform/gtk/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
  • platform/gtk/svg/custom/svg-fonts-in-text-controls-expected.txt: Added.
  • platform/gtk/svg/custom/svg-fonts-no-latin-glyph-expected.txt: Added.
  • platform/gtk/svg/custom/svg-fonts-segmented-expected.png:
  • platform/gtk/svg/custom/svg-fonts-segmented-expected.txt:
  • platform/gtk/svg/custom/svg-fonts-with-no-element-reference-expected.png:
  • platform/gtk/svg/custom/svg-fonts-with-no-element-reference-expected.txt: Added.
  • platform/gtk/svg/custom/svg-fonts-without-missing-glyph-expected.png:
  • platform/gtk/svg/custom/svg-fonts-without-missing-glyph-expected.txt:
  • platform/gtk/svg/custom/svg-fonts-word-spacing-expected.png:
  • platform/gtk/svg/custom/svg-fonts-word-spacing-expected.txt:
  • platform/gtk/svg/foreignObject/text-tref-02-b-expected.png:
  • platform/gtk/svg/foreignObject/text-tref-02-b-expected.txt: Added.
  • platform/gtk/svg/text/text-overflow-ellipsis-svgfont-expected.png:
  • platform/gtk/svg/text/text-overflow-ellipsis-svgfont-expected.txt:
  • platform/gtk/svg/text/text-text-05-t-expected.png:
  • platform/gtk/svg/text/text-text-05-t-expected.txt: Added.
  • platform/gtk/svg/transforms/text-with-mask-with-svg-transform-expected.png:
  • platform/gtk/svg/transforms/text-with-mask-with-svg-transform-expected.txt: Added.
  • platform/gtk/svg/wicd/test-rightsizing-b-expected.png:
  • platform/gtk/svg/wicd/test-rightsizing-b-expected.txt:
3:00 PM Changeset in webkit [198992] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Tighten ComposedTreeAncestorIterator to return Elements
https://bugs.webkit.org/show_bug.cgi?id=150324

Reviewed by Andreas Kling.

Only other thing it could credibly return was Document. We can exclude it from the composed tree and avoid some casting.

  • dom/ComposedTreeAncestorIterator.h:

(WebCore::ComposedTreeAncestorIterator::operator*):
(WebCore::ComposedTreeAncestorIterator::operator->):
(WebCore::ComposedTreeAncestorIterator::operator==):
(WebCore::ComposedTreeAncestorIterator::operator!=):
(WebCore::ComposedTreeAncestorIterator::operator++):
(WebCore::ComposedTreeAncestorIterator::get):
(WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
(WebCore::ComposedTreeAncestorIterator::traverseParent):
(WebCore::ComposedTreeAncestorAdapter::begin):
(WebCore::ComposedTreeAncestorAdapter::end):
(WebCore::ComposedTreeAncestorAdapter::first):

  • dom/Element.cpp:

(WebCore::Element::resolveComputedStyle):

  • dom/Node.cpp:

(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::Node::setNeedsStyleRecalc):

  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::isChildAllowed):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):

  • style/RenderTreeUpdater.cpp:

(WebCore::findRenderingRoot):
(WebCore::RenderTreeUpdater::commit):

2:19 PM Changeset in webkit [198991] by ddkilzer@apple.com
  • 1 edit in branches/safari-601.1.46-branch/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm

Fix build by moving elementRectInWindow() to where it is used.

1:19 PM Changeset in webkit [198990] by Antti Koivisto
  • 7 edits
    2 adds in trunk

Shadow DOM: Slot style is not computed
https://bugs.webkit.org/show_bug.cgi?id=156144

Reviewed by Darin Adler.

Source/WebCore:

We don’t currently compute style for active slots. While slots have have implicit display:contents and don’t create
boxes themselves the style should still inherit to slotted children.

Basically

<slot style=“color:red”></slot>

should work as expected.

The implementation falls out from the new style resolve architecture and this patch mostly just removes the special
case code that prevented this from working.

Test: fast/shadow-dom/css-scoping-shadow-slot-style.html

  • html/HTMLSlotElement.h:

(WebCore::hasImplicitDisplayContents):

Move to a shared location.

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::RenderTreeUpdater):
(WebCore::findRenderingRoot):
(WebCore::RenderTreeUpdater::updateRenderTree):

Remove the special case code. What remains is a display:contents test for rendererless elements.

(WebCore::RenderTreeUpdater::updateElementRenderer):

Don't create renderers for (implicit) display:contents.

(WebCore::hasDisplayContents): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::detachRenderTree):
(WebCore::Style::affectsRenderedSubtree):

Factor into a function.

(WebCore::Style::TreeResolver::resolveElement):

Remove the special case code.

(WebCore::Style::TreeResolver::resolveComposedTree):

Always resolve slots as we don't currently save their style.

LayoutTests:

  • fast/shadow-dom/css-scoping-shadow-slot-style-expected.html: Added.
  • fast/shadow-dom/css-scoping-shadow-slot-style.html: Added.
12:45 PM Changeset in webkit [198989] by sbarati@apple.com
  • 19 edits
    1 add in trunk

Implement Annex B.3.3 function hoisting rules for function code
https://bugs.webkit.org/show_bug.cgi?id=155672

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The spec states that functions declared inside a function
inside a block scope are subject to the rules of Annex B.3.3:
https://tc39.github.io/ecma262/#sec-block-level-function-declarations-web-legacy-compatibility-semantics

The rule states that functions declared in such blocks should
be local bindings of the block. If declaring the function's name
as a "var" in the function would not lead to a syntax error (i.e,
if we don't have a let/const/class variable with the same name)
and if we don't have a parameter with the same name, then we
implictly also declare the funcion name as a "var". When evaluating
the block statement we bind the hoisted "var" to be the value
of the local function binding.

There is one more thing we do for web compatibility. We allow
function declarations inside if/else statements that aren't
blocks. For such statements, we transform the code as if the
function were declared inside a block statement. For example:
function foo() { if (cond) function baz() { } }
is transformed into:
function foo() { if (cond) { function baz() { } } }

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::initializeBlockScopedFunctions):

  • bytecompiler/BytecodeGenerator.h:
  • parser/Nodes.cpp:

(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ModuleProgramNode::ModuleProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionNode::FunctionNode):

  • parser/Nodes.h:

(JSC::ScopeNode::hasCapturedVariables):
(JSC::ScopeNode::captures):
(JSC::ScopeNode::hasSloppyModeHoistedFunction):
(JSC::ScopeNode::varDeclarations):
(JSC::ProgramNode::startColumn):
(JSC::ProgramNode::endColumn):
(JSC::EvalNode::startColumn):
(JSC::EvalNode::endColumn):
(JSC::ModuleProgramNode::startColumn):
(JSC::ModuleProgramNode::endColumn):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::didFinishParsing):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseIfStatement):

  • parser/Parser.h:

(JSC::Scope::declareVariable):
(JSC::Scope::declareFunction):
(JSC::Scope::addSloppyModeHoistableFunctionCandidate):
(JSC::Scope::appendFunction):
(JSC::Scope::declareParameter):
(JSC::Scope::mergeInnerArrowFunctionFeatures):
(JSC::Scope::getSloppyModeHoistedFunctions):
(JSC::Scope::getCapturedVars):
(JSC::ScopeRef::containingScope):
(JSC::ScopeRef::operator==):
(JSC::ScopeRef::operator!=):
(JSC::Parser::declareFunction):
(JSC::Parser::hasDeclaredVariable):
(JSC::Parser::isFunctionMetadataNode):
(JSC::Parser::DepthManager::DepthManager):
(JSC::Parser<LexerType>::parse):

  • parser/VariableEnvironment.h:

(JSC::VariableEnvironmentEntry::isImported):
(JSC::VariableEnvironmentEntry::isImportedNamespace):
(JSC::VariableEnvironmentEntry::isFunction):
(JSC::VariableEnvironmentEntry::isParameter):
(JSC::VariableEnvironmentEntry::isSloppyModeHoistingCandidate):
(JSC::VariableEnvironmentEntry::setIsCaptured):
(JSC::VariableEnvironmentEntry::setIsConst):
(JSC::VariableEnvironmentEntry::setIsImported):
(JSC::VariableEnvironmentEntry::setIsImportedNamespace):
(JSC::VariableEnvironmentEntry::setIsFunction):
(JSC::VariableEnvironmentEntry::setIsParameter):
(JSC::VariableEnvironmentEntry::setIsSloppyModeHoistingCandidate):
(JSC::VariableEnvironmentEntry::clearIsVar):

  • runtime/CodeCache.h:

(JSC::SourceCodeValue::SourceCodeValue):

  • runtime/JSScope.cpp:
  • runtime/JSScope.h:
  • tests/es6.yaml:
  • tests/stress/sloppy-mode-function-hoisting.js: Added.

(assert):
(test):
(falsey):
(truthy):
(test.):
(test.a):
(test.f):
(test.let.funcs.f):
(test.catch.f):
(test.foo):
(test.bar):
(test.switch.case.0):
(test.else.f):
(test.b):
(test.c):
(test.d):
(test.e):
(test.g):
(test.h):
(test.i):
(test.j):
(test.k):
(test.l):
(test.m):
(test.n):
(test.o):
(test.p):
(test.q):
(test.r):
(test.s):
(test.t):
(test.u):
(test.v):
(test.w):
(test.x):
(test.y):
(test.z):
(foo):
(bar):
(falsey.bar):
(baz):
(falsey.baz):

LayoutTests:

  • js/kde/func-decl-expected.txt:
  • js/kde/script-tests/func-decl.js:
  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:

(valid):
(onlyValidGlobally):
(onlyInvalidGlobally):
(invalid):

12:38 PM Changeset in webkit [198988] by mitz@apple.com
  • 2 edits in trunk/Tools

Use the correct value for the first nightly build with frameworks built for OS X 10.11.

  • Scripts/bisect-builds:

(makeNightlyList):

12:14 PM Changeset in webkit [198987] by mitz@apple.com
  • 2 edits in trunk/Tools

Made bisect-builds work again.

Rubber-stamped by Sam Weinig.

  • Scripts/bisect-builds:

Changed to use HTTPS to access nightly.webkit.org, and added a minimum revision for OS X 10.11.

11:56 AM Changeset in webkit [198986] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

REGRESSION (r198653, r198864): http/tests/contentdispositionattachmentsandbox/referer-header-stripped*.html tests crashing due to unavailable SPI
<http://webkit.org/b/156145>

Reviewed by Tim Horton.

Covered by existing tests under GuardMalloc:

http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-always.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-default.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-never.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer-when-downgrade.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-origin.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-unsafe-url.html
http/tests/contentdispositionattachmentsandbox/referer-header-stripped.html

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::isDataDetectorLink):
(WebCore::DataDetection::shouldCancelDefaultAction):

  • Restore iOS 9.x code.

(WebCore::DataDetection::detectContentInRange):

  • Guard new SPI with version macros.
  • platform/cocoa/DataDetectorsCoreSoftLink.h:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
  • Guard new SPI with version macros.
9:50 AM Changeset in webkit [198985] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, turn ES6 for-in loop test success
https://bugs.webkit.org/show_bug.cgi?id=155451

  • tests/es6.yaml:
3:56 AM Changeset in webkit [198984] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. Bump GTK+ versions numbers.

  • Source/cmake/OptionsGTK.cmake:
3:50 AM Changeset in webkit [198983] by Carlos Garcia Campos
  • 9 edits in trunk/Source/WebCore

Replace all RenderTheme::popupInternalPadding methods with a single one returning a LengthBox
https://bugs.webkit.org/show_bug.cgi?id=156098

Reviewed by Darin Adler.

The caller always wants all padding sides, so we can simplify both the caller and the implementations by using a
single method. It's also more efficient for the GTK+ port that creates and destroys the same style contexts on
every call.

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::adjustInnerStyle):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::popupInternalPaddingBox):
(WebCore::RenderTheme::popupInternalPaddingLeft): Deleted.
(WebCore::RenderTheme::popupInternalPaddingRight): Deleted.
(WebCore::RenderTheme::popupInternalPaddingTop): Deleted.
(WebCore::RenderTheme::popupInternalPaddingBottom): Deleted.

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::popupInternalPaddingBox):
(WebCore::getComboBoxMetrics): Deleted.
(WebCore::RenderThemeGtk::popupInternalPaddingLeft): Deleted.
(WebCore::RenderThemeGtk::popupInternalPaddingRight): Deleted.
(WebCore::RenderThemeGtk::popupInternalPaddingTop): Deleted.
(WebCore::RenderThemeGtk::popupInternalPaddingBottom): Deleted.

  • rendering/RenderThemeGtk.h:
  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::popupInternalPaddingBox):
(WebCore::RenderThemeIOS::popupInternalPaddingRight): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::popupInternalPaddingBox):
(WebCore::RenderThemeMac::popupInternalPaddingLeft): Deleted.
(WebCore::RenderThemeMac::popupInternalPaddingRight): Deleted.
(WebCore::RenderThemeMac::popupInternalPaddingTop): Deleted.
(WebCore::RenderThemeMac::popupInternalPaddingBottom): Deleted.

2:56 AM Changeset in webkit [198982] by ddkilzer@apple.com
  • 1 edit
    4 adds in trunk/LayoutTests

REGRESSION (r198859): fast/scrolling/rtl-scrollbars-animation-property.html fails on non-Mac platforms
<http://webkit.org/b/155962>

Unreviewed; land platform-specific test results.

  • platform/gtk/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
  • platform/ios-simulator/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
  • platform/win/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
1:37 AM Changeset in webkit [198981] by Yusuke Suzuki
  • 37 edits
    9 adds in trunk

[JSC] Add truncate operation (rounding to zero)
https://bugs.webkit.org/show_bug.cgi?id=156072

Reviewed by Saam Barati.

Source/JavaScriptCore:

Add TruncIntrinsic for Math.trunc. DFG handles it as ArithTrunc.
In DFG, ArithTrunc behaves similar to ArithRound, ArithCeil, and ArithFloor.
ArithTrunc rounds the value towards zero.

And we rewrite @toInteger to use @trunc instead of @abs, @floor, negation and branch.
This is completely the same to what we do in JSValue::toInteger.

Since DFG recognize it, DFG can convert ArithTrunc to Identity if the given argument is Int32.
This is useful because almost all the argument is Int32 in @toLength -> @toInteger -> @trunc case.
In such cases, we can eliminate trunc() call.

As a bonus, to speed up Math.trunc operation, we use x86 SSE round and frintz in ARM64 for ArithRound.
In DFG, we emit these instructions. In FTL, we use Patchpoint to emit these instructions to avoid adding a new B3 IR.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::roundTowardZeroDouble):
(JSC::MacroAssemblerARM64::roundTowardZeroFloat):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::roundTowardZeroDouble):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::roundTowardZeroDouble):

  • assembler/MacroAssemblerSH4.h:

(JSC::MacroAssemblerSH4::roundTowardZeroDouble):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::roundTowardZeroDouble):
(JSC::MacroAssemblerX86Common::roundTowardZeroFloat):

  • builtins/GlobalObject.js:

(toInteger):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::roundShouldSpeculateInt32):

  • dfg/DFGNode.h:

(JSC::DFG::Node::arithNodeFlags):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasArithRoundingMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithRounding):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArithTrunc):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::doubleTrunc):

  • ftl/FTLOutput.h:
  • jit/ThunkGenerators.cpp:

(JSC::truncThunkGenerator):

  • jit/ThunkGenerators.h:
  • runtime/CommonIdentifiers.h:
  • runtime/Intrinsic.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/MathObject.h:
  • runtime/VM.cpp:

(JSC::thunkGeneratorForIntrinsic):

  • tests/stress/math-rounding-infinity.js:

(testTrunc):

  • tests/stress/math-rounding-nan.js:

(testTrunc):

  • tests/stress/math-rounding-negative-zero.js:

(testTrunc):

  • tests/stress/math-trunc-arith-rounding-mode.js: Added.

(firstCareAboutZeroSecondDoesNot):
(firstDoNotCareAboutZeroSecondDoes):
(warmup):
(verifyNegativeZeroIsPreserved):

  • tests/stress/math-trunc-basics.js: Added.

(mathTruncOnIntegers):
(mathTruncOnDoubles):
(mathTruncOnBooleans):
(uselessMathTrunc):
(mathTruncWithOverflow):
(mathTruncConsumedAsDouble):
(mathTruncDoesNotCareAboutMinusZero):
(mathTruncNoArguments):
(mathTruncTooManyArguments):
(testMathTruncOnConstants):
(mathTruncStructTransition):
(Math.trunc):

  • tests/stress/math-trunc-should-be-truncate.js: Added.

(mathTrunc):

LayoutTests:

  • js/regress/many-foreach-calls-expected.txt: Added.
  • js/regress/many-foreach-calls.html: Added.
  • js/regress/math-trunc-expected.txt: Added.
  • js/regress/math-trunc.html: Added.
  • js/regress/script-tests/many-foreach-calls.js: Added.

forEach calls @toInteger. It includes @trunc now.
(i.array.forEach):

  • js/regress/script-tests/math-trunc.js: Added.

Call Math.trunc repeatedly.
(mathTruncInt):
(mathTruncDouble):
(mathTruncMixed):
(mathTruncDoubleDoesNotCareNegativeZero):

12:59 AM Changeset in webkit [198980] by gskachkov@gmail.com
  • 18 edits in trunk/Source/JavaScriptCore

[ES6] Class syntax. Access to new.target inside of the eval should not lead to SyntaxError
https://bugs.webkit.org/show_bug.cgi?id=155545

Reviewed by Saam Barati.

Current patch allow to invoke new.target in eval if this eval is executed within function,
otherwise this will lead to Syntax error

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::getSlow):

  • bytecode/ExecutableInfo.h:

(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::evalContextType):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::evalContextType):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::generateUnlinkedFunctionCodeBlock):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluate):

  • interpreter/Interpreter.cpp:

(JSC::eval):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::setEvalContextType):
(JSC::Scope::evalContextType):
(JSC::parse):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):

  • runtime/CodeCache.h:
  • runtime/Executable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::EvalExecutable::create):
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::ModuleProgramExecutable::ModuleProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):

  • runtime/Executable.h:

(JSC::ScriptExecutable::evalContextType):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createEvalCodeBlock):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • tests/stress/arrowfunction-lexical-bind-newtarget.js:
  • tests/stress/new-target.js:

Apr 2, 2016:

6:55 PM Changeset in webkit [198979] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

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

"Causes js/regress/array-nonarray-polymorhpic-access.html to
crash." (Requested by ddkilzer on #webkit).

Reverted changeset:

"[JSC] Initialize SSA's live values at tail lazily"
https://bugs.webkit.org/show_bug.cgi?id=156126
http://trac.webkit.org/changeset/198976

6:22 PM Changeset in webkit [198978] by gskachkov@gmail.com
  • 3 edits in trunk/LayoutTests

[ES6] Arrow function syntax. Add missed test for using 'with' and 'this' in arrow function.
https://bugs.webkit.org/show_bug.cgi?id=156059

Reviewed by Saam Barati.

Added test case that cover using 'with' with lexically bound 'this' in arrow function, this case was not
covered by tests for arrow function.

  • js/arrowfunction-lexical-bind-this-expected.txt:
  • js/script-tests/arrowfunction-lexical-bind-this.js:
3:04 PM Changeset in webkit [198977] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r198933): Web Inspector and inspected page hang in local builds
https://bugs.webkit.org/show_bug.cgi?id=156138
<rdar://problem/25507724>

Reviewed by Alexey Proskuryakov.

Similar to the sandbox policy for WebProcess and NetworkProcess, grant a Database process
read-only filesystem access and mach lookup capability to various Security framework files
and SecurityServer, respectively.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
2:16 PM Changeset in webkit [198976] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Initialize SSA's live values at tail lazily
https://bugs.webkit.org/show_bug.cgi?id=156126

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-04-02
Reviewed by Mark Lam.

Setting up the clean state early looks harmless but it is
actually quite expensive.

The problem is AbstractValue is gigantic, you really want
to minimize how much you touch that memory.

By removing the initialization, most blocks only
get 2 or 3 accesses. Once to setup the value, and a few
queries for merging the current block with the successors.

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::endBasicBlock):
(JSC::DFG::setLiveValues): Deleted.
(JSC::DFG::InPlaceAbstractState::initialize): Deleted.

2:14 PM Changeset in webkit [198975] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Add an option to avoid disassembling baseline code for the JSC Profiler
https://bugs.webkit.org/show_bug.cgi?id=156127

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-04-02
Reviewed by Mark Lam.

The profiler run out of memory on big programs if you dump
the baseline disassembly.

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • runtime/Options.h:
1:01 PM Changeset in webkit [198974] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Cleanup DataDetection.mm a little bit
https://bugs.webkit.org/show_bug.cgi?id=156128

Patch by Sam Weinig <sam@webkit.org> on 2016-04-02
Reviewed by Dan Bernstein.

  • html/HTMLAttributeNames.in:

Add x-apple-data-detectors, x-apple-data-detectors-type, x-apple-data-detectors-result

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::requiresExtendedContext):
(WebCore::DataDetection::dataDetectorIdentifier):
(WebCore::DataDetection::shouldCancelDefaultAction):
(WebCore::removeResultLinksFromAnchor):
(WebCore::searchForLinkRemovingExistingDDLinks):
Use new generated qualified name attributes, switch to using fastGetAttribute and
equalIgnoringASCIICase, and fix the position of some *s.

(WebCore::dataDetectorStringForPath):
Fix some *s and switch to using StringBuilder.

(WebCore::buildQuery):
Fix some *s.

(WebCore::DataDetection::detectContentInRange):
Use new generated qualified name attributes.

12:34 PM Changeset in webkit [198973] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

Another attempt to fix the Apple Internal Yosemite and El Capitan builds following
<http://trac.webkit.org/changeset/198933> (https://bugs.webkit.org/show_bug.cgi?id=155455)

Similar to the sandbox policy for WebProcess and NetworkProcess, grant a Database process
access to the passed user's cache directory and passed user's temporary directory so that
the Security framework can verify the code signature of the app that launched it when the
Database process is itself code signed.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
9:34 AM Changeset in webkit [198972] by mitz@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

jsc binary embedded in relocatable JavaScriptCore.framework links against system JavaScriptCore.framework
https://bugs.webkit.org/show_bug.cgi?id=156134
<rdar://problem/25443824>

Reviewed by Mark Lam.

  • Configurations/JSC.xcconfig: Define WK_RELOCATABLE_FRAMEWORKS_LDFLAGS when building relocatable frameworks to include a -dyld_env option setting DYLD_FRAMEWORK_PATH to point to the directory containing JavaScript.framework, and add WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to OTHER_LDFLAGS.
1:59 AM Changeset in webkit [198971] by ddkilzer@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r198963): css3/filters/backdrop/dynamic-backdrop-filter-change.html frequently fails
<http://webkit.org/b/149319>

Unreviewed attempt to fix layout test.

  • css3/filters/backdrop/dynamic-backdrop-filter-change.html:

Use testRunner.notifyDone() after testRunner.waitUntilDone().

12:01 AM Changeset in webkit [198970] by mmaxfield@apple.com
  • 9 edits in trunk/Source/WebCore

Migrate BidiRunList and BidiRun to automatic memory management
https://bugs.webkit.org/show_bug.cgi?id=156123

Reviewed by Simon Fraser.

BidiRunList, BidiRun, and BidiCharacterRun have all been doing manual
"new"s and "delete"s for years. This patch migrates those classes to
using std::unique_ptr.

No new tests because there is no behavior change.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawBidiText):

  • platform/text/BidiResolver.h:

(WebCore::BidiCharacterRun::BidiCharacterRun):
(WebCore::BidiCharacterRun::next):
(WebCore::BidiCharacterRun::takeNext):
(WebCore::BidiCharacterRun::setNext):
(WebCore::Subclass>::appendRunInternal):

  • platform/text/BidiRunList.h:

(WebCore::BidiRunList::BidiRunList):
(WebCore::BidiRunList::firstRun):
(WebCore::BidiRunList<Run>::appendRun):
(WebCore::BidiRunList<Run>::prependRun):
(WebCore::BidiRunList<Run>::moveRunToEnd):
(WebCore::BidiRunList<Run>::moveRunToBeginning):
(WebCore::BidiRunList<Run>::replaceRunWithRuns):
(WebCore::BidiRunList<Run>::clear):
(WebCore::BidiRunList<Run>::reverseRuns):
(WebCore::BidiRunList<Run>::clearWithoutDestroyingRuns): Deleted.
(WebCore::BidiRunList<Run>::deleteRuns): Deleted.

  • rendering/BidiRun.cpp:

(WebCore::BidiRun::takeNext):

  • rendering/BidiRun.h:

(WebCore::BidiRun::next):
(WebCore::BidiRun::takeNext):

  • rendering/InlineIterator.h:

(WebCore::addPlaceholderRunForIsolatedInline):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::createRun):
(WebCore::RenderBlockFlow::handleTrailingSpaces):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::skipLeadingWhitespace):

Apr 1, 2016:

11:38 PM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
10:41 PM Changeset in webkit [198969] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed follow-up to r198968. Remove debug statements.

  • Scripts/remove-console-asserts.pl:

(removeConsoleAssertsInFile):

10:23 PM Changeset in webkit [198968] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove console.asserts from Worker code in optimized builds
https://bugs.webkit.org/show_bug.cgi?id=156124
<rdar://problem/25505031>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-04-01
Reviewed by Timothy Hatcher.

  • Scripts/copy-user-interface-resources.pl:

Remove console asserts on the Worker results directory.

  • Scripts/remove-console-asserts.pl:

(removeConsoleAssertsInFile):
(removeConsoleAssertsInDirectory):
Refactor into functions for a file and a file for
recursing through directories.

8:21 PM Changeset in webkit [198967] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

Attempt to fix the Apple Internal Yosemite and El Capitan builds following
<http://trac.webkit.org/changeset/198933> (https://bugs.webkit.org/show_bug.cgi?id=155455)
<rdar://problem/25502181>

Only check the code signature of the client app if the "user-directory-suffix" sandbox
initialization parameter will not be used. This parameter is only used/passed as an
initialization parameter if the client app is not sandboxed, which seems sufficient
criterion to determine whether it is safe to honor it.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::initializeSandbox):

7:30 PM Changeset in webkit [198966] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.26.0.1/Source

Versioning.

7:28 PM Changeset in webkit [198965] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.26.0.1

New tag.

6:48 PM Changeset in webkit [198964] by jiewen_tan@apple.com
  • 3 edits
    1 move in trunk/Tools

Build fix for r198956.

Unreviewed.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLNotChange.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm.

(-[ProvisionalURLNotChangeController webView:didFinishNavigation:]):
(-[ProvisionalURLNotChangeController webView:didFailProvisionalNavigation:withError:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm:

(-[LoadInvalidSchemeDelegate browsingContextController:didFailProvisionalLoadWithError:]):
(TestWebKitAPI::TEST):

5:19 PM Changeset in webkit [198963] by Simon Fraser
  • 3 edits
    2 adds in trunk

Backdrop Filter should repaint when changed via script
https://bugs.webkit.org/show_bug.cgi?id=149319
rdar://problem/22749892

Reviewed by Tim Horton.

Source/WebCore:

When backdrop filters change, we need to trigger a recomposite, just as we do
for filters. It's ok to re-use ContextSensitivePropertyFilter because
adjustStyleDifference() does the right thing.

Test: css3/filters/backdrop/dynamic-backdrop-filter-change.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayerRepaint):

LayoutTests:

  • css3/filters/backdrop/dynamic-backdrop-filter-change-expected.html: Added.
  • css3/filters/backdrop/dynamic-backdrop-filter-change.html: Added.
5:09 PM Changeset in webkit [198962] by bshafiei@apple.com
  • 5 edits in branches/safari-601-branch/Source

Versioning.

5:08 PM Changeset in webkit [198961] by bshafiei@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source

Versioning.

4:52 PM Changeset in webkit [198960] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.1.46.125

New tag.

4:51 PM Changeset in webkit [198959] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.6.14

New tag.

4:25 PM Changeset in webkit [198958] by Alan Bujtas
  • 3 edits
    2 adds in trunk

putImageData leaves visible artifacts on retina display
https://bugs.webkit.org/show_bug.cgi?id=156039
<rdar://problem/25482243>

Reviewed by Simon Fraser.

Inflate the repaint rect to cover anti-aliasing bits.

Source/WebCore:

Test: fast/canvas/hidpi-repaint-on-retina-leaves-bits-behind.html

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::didDraw):

LayoutTests:

  • fast/canvas/hidpi-repaint-on-retina-leaves-bits-behind-expected.html: Added.
  • fast/canvas/hidpi-repaint-on-retina-leaves-bits-behind.html: Added.
2:44 PM Changeset in webkit [198957] by matthew_hanson@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source/WebCore

Roll out r198035 via r198903. rdar://problem/25467558

2:40 PM Changeset in webkit [198956] by jiewen_tan@apple.com
  • 9 edits
    3 adds in trunk

WebKit should dispatchDidFailProvisionalLoad while loading invalid URLs
https://bugs.webkit.org/show_bug.cgi?id=155995
<rdar://problem/14967004>

Reviewed by Andy Estes.

Source/WebCore:

Added API Tests.

If a loading request contains an invalid URL, DocumentLoader will now dispatch
cannotShowURLError to the clients.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):

Source/WebKit2:

Ensure that alternative HTML string will not be loaded back to back for
failing provisional loads.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::didFinishLoadForFrame):

  • UIProcess/WebPageProxy.h:

Tools:

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

(-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didFailProvisionalNavigation:withError:]):
(-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didStartProvisionalNavigation:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm: Added.

(literalURL):
(-[LoadInvalidURLNavigationActionDelegate webView:didCommitNavigation:]):
(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.html: Added.
  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm: Added.

(-[LoadInvalidURLWebFrameLoadDelegate webView:didCommitLoadForFrame:]):
(-[LoadInvalidURLWebFrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
(TestWebKitAPI::TEST):

2:10 PM Changeset in webkit [198955] by Brent Fulgham
  • 23 edits
    9 adds in trunk

Confirm <a download> satisfies specification criteria
https://bugs.webkit.org/show_bug.cgi?id=156057

Reviewed by Andy Estes.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:

(WKBundleNavigationActionGetHasDownloadAttribute): Added.

  • WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:

(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:

(WebKit::InjectedBundleNavigationAction::hasDownloadAttribute): Added.

Tools:

Revise WebKitTestRunner:
(1) Provide a download client delegate.
(2) Teach WKTR to wait to finish a test until a download finishes.
(3) Allow WKTR to notify the current TestRunner that it can finish.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage): Update to recognize a new
message "NotifyDownloadDone".

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::decidePolicyForNavigationAction): Handle 'download'
attribute case.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::waitUntilDownload): Added.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(WTR::TestRunner::shouldFinishAfterDownload): Added.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions): Set up the download client.
(WTR::TestController::downloadDidStart): Added.
(WTR::TestController::decideDestinationWithSuggestedFilename): Added.
(WTR::TestController::downloadDidFinish): Added.
(WTR::TestController::downloadDidFail): Added.
(WTR::TestController::downloadDidCancel): Added.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::notifyDownloadDone): Added.

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

Import <a download> tests from the Blink project.

Based on a Blink change (patch by <asanka@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=172767&view=revision>

  • TestExpectations: Mark two expected failures with the new tests.
  • fast/dom/HTMLAnchorElement/anchor-download-expected.txt: Updated for

expected output (blob URL currently not working).

  • fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt: Ditto.
  • http/tests/security/anchor-download-allow-blob-expected.txt: Added.
  • http/tests/security/anchor-download-allow-blob.html: Added.
  • http/tests/security/anchor-download-allow-data-expected.txt: Added.
  • http/tests/security/anchor-download-allow-data.html: Added.
  • http/tests/security/anchor-download-allow-sameorigin-expected.txt: Added.
  • http/tests/security/anchor-download-allow-sameorigin.html: Added.
  • http/tests/security/anchor-download-block-crossorigin-expected.txt: Added.
  • http/tests/security/anchor-download-block-crossorigin.html: Added.
  • http/tests/security/resources/attachment.php: Added.
  • platform/ios-simulator-wk1/TestExpectations: Disable download tests until WK1 support

is implemented.

  • platform/ios-simulator-wk2/TestExpectations: Disable download tests until

NETWORK_SESSION support exists.

  • platform/mac/TestExpectations: Reactivate the HTMLAnchorElement tests.
  • platform/mac-wk1/TestExpectations: Disable download tests until WK1 support

is implemented.

1:58 PM Changeset in webkit [198954] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline tests added with r198951
https://bugs.webkit.org/show_bug.cgi?id=156092

Unreviewed test gardening.

  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src-expected.txt:
12:20 PM Changeset in webkit [198953] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC][x86] Add the 3 operands form of floating point substraction
https://bugs.webkit.org/show_bug.cgi?id=156095

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-04-01
Reviewed by Geoffrey Garen.

Same old, same old. Add the AVX form of subsd and subss.

Unfortunately, we cannot benefit from the 3 register form
in B3 yet because the Air script does not support CPU flags yet.
That can be fixed later.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::subDouble):
(JSC::MacroAssemblerX86Common::subFloat):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::vsubsd_rr):
(JSC::X86Assembler::subsd_mr):
(JSC::X86Assembler::vsubsd_mr):
(JSC::X86Assembler::vsubss_rr):
(JSC::X86Assembler::subss_mr):
(JSC::X86Assembler::vsubss_mr):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):

  • b3/air/AirOpcode.opcodes:
12:15 PM Changeset in webkit [198952] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Reset CSS spacing rules on the <math> element.
https://bugs.webkit.org/show_bug.cgi?id=155433

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-01
Reviewed by Brent Fulgham.

Source/WebCore:

Test: mathml/presentation/css-spacing.html

When the authors has changed some CSS spacing rules on a page, they are currently inherited on MathML too, potentially causing broken math rendering.
For example, this caused a bug in Firefox on Wikipedia in the past. Hence we align on Gecko and just reset the CSS spacing rules by default. We also import Mozilla's test.

  • css/mathml.css:

(math): Set line-height, word-spacing and letter-spacing to normal.

LayoutTests:

We import a test from Mozilla to ensure that CSS spacing rules line-height, word-spacing and letter-spacing are by default reset to normal on the <math> element.

  • mathml/presentation/css-spacing-expected.html: Added.
  • mathml/presentation/css-spacing.html: Added.
11:40 AM Changeset in webkit [198951] by dbates@webkit.org
  • 6 edits
    6 adds in trunk

CSP: child-src violations reported as frame-src violation
https://bugs.webkit.org/show_bug.cgi?id=156092
<rdar://problem/25478509>

Reviewed by Andy Estes.

Source/WebCore:

Tests: http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src.html

http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src.html
http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src.html

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Determine the name of the effective violation
directive from the name of the violated directive. If the name of the violated directive is "frame-src"
then use that name for the name of the effective violated directive. Otherwise, use "child-src" for the
name of the effective violated directive. A byproduct of this decision is that we report child-src as the
effective violated directive when a frame load was blocked by the default-src directive. This seems reasonable
because directive frame-src is deprecated in Content Security Policy Level 2. The child-src directive is
its replacement.

LayoutTests:

  • TestExpectations: Mark the newly added tests as PASS so that we run them.
  • http/tests/security/contentSecurityPolicy/1.1/child-src/frame-blocked-expected.txt: Substitute "child-src" for "frame-src" in the

expected console warning.

  • http/tests/security/contentSecurityPolicy/1.1/child-src/frame-redirect-blocked-expected.txt: Ditto.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-child-src.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-default-src.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/securityviolationpolicy-block-frame-using-frame-src.html: Added.
11:22 AM Changeset in webkit [198950] by dbates@webkit.org
  • 2 edits in trunk

Fix up ChangeLog entries for r198936 (https://bugs.webkit.org/show_bug.cgi?id=156079) to reference
the update bug title that reflects that r198936 fixes the regression caused by r196012.

11:15 AM Changeset in webkit [198949] by adachan@apple.com
  • 2 edits in trunk/LayoutTests

Add a way to reset the eventTrigger in ControlsTest in LayoutTests/media/controls/controls-test-helpers.js
https://bugs.webkit.org/show_bug.cgi?id=154616

Reviewed by Dean Jackson.

  • media/controls/controls-test-helpers.js:

(ControlsTest.prototype.resetEventTrigger):

10:55 AM Changeset in webkit [198948] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

CMake build fix.

  • PlatformMac.cmake:
9:45 AM Changeset in webkit [198947] by commit-queue@webkit.org
  • 19 edits
    1 copy
    1 add in trunk

Compile DumpRenderTree with CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=156088

Patch by Alex Christensen <achristensen@webkit.org> on 2016-04-01
Reviewed by Brent Fulgham.

Source/WebCore:

  • PlatformMac.cmake:
  • platform/mock/mediasource/MockBox.cpp:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKit/mac:

  • Misc/WebKit.h:

Alphabetize headers.

Source/WebKit2:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • UIProcess/API/Cocoa/WebKitLegacy.h: Added.

Tools:

  • CMakeLists.txt:
  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/DefaultPolicyDelegate.m:

(-[DefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):

  • DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
  • DumpRenderTree/PlatformMac.cmake: Added.
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/mac/AppleScriptController.m:

(convertAEDescToObject):

  • DumpRenderTree/mac/DumpRenderTreeMain.mm:
  • DumpRenderTree/mac/LayoutTestHelper.m:
9:18 AM Changeset in webkit [198946] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking three media controls tests as flaky on El Capitan
https://bugs.webkit.org/show_bug.cgi?id=156112

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:49 AM WebKitGTK/2.12.x edited by berto@igalia.com
(diff)
3:36 AM Changeset in webkit [198945] by berto@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Missing PATH_MAX definition
https://bugs.webkit.org/show_bug.cgi?id=156102

Reviewed by Yusuke Suzuki.

Not all systems define PATH_MAX, so add a fallback value that is
long enough.

  • jsc.cpp:
3:21 AM Changeset in webkit [198944] by jh718.park@samsung.com
  • 2 edits
    1 add in trunk/LayoutTests

Unreviewed EFL gardening about new RTL scrollbar testcase
This testcase has been added in r198859.

  • platform/efl/TestExpectations:
  • platform/efl/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
2:54 AM Changeset in webkit [198943] by Antti Koivisto
  • 41 edits
    5 adds in trunk

Separate render tree updating from style resolve
https://bugs.webkit.org/show_bug.cgi?id=155298

Reviewed by Andreas Kling.

Source/WebCore:

This patch splits computing document style and applying the results into two distinct steps:

Style::TreeResolver::resolve()

|
| Style::Update
V

RenderTreeUpdater::commit()

Style::TreeResolver::resolve() returns a Style::Update object that contains all the changes to be made
for the whole composed tree. RenderTreeUpdater then applies the changes updating, building or tearing
down portions of the render tree as needed.

Style::Update consists of a map that contains new style for each newly resolved element along with some
metadata. A separate map contains text nodes that require reconstruction. It also tracks change roots so
RenderTreeUpdater needs to traverse the changed subtrees only.

The patch eliminates the recursive render tree build code path replacing it with iterative functions.

This will enable future optimizations. For example we won't need to commit to immediate rendering
changes simply because some script or internal function requires up-to-date style.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::styleForElement):

  • css/StyleResolver.h:

(WebCore::StyleResolver::setOverrideDocumentElementStyle):
(WebCore::StyleResolver::State::State):

Root element style is needed for resolving other elements. Add a way to provide it without looking
into active document style.

  • dom/Document.cpp:

(WebCore::Document::recalcStyle):

Resolve the document style and commit it immediately (for now).

(WebCore::Document::styleForElementIgnoringPendingStylesheets):

  • dom/Document.h:

(WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
(WebCore::Document::inStyleRecalc):
(WebCore::Document::inRenderTreeUpdate):

  • dom/Element.cpp:

(WebCore::Element::setChildIndex):

Setting the unique bit is now done by style relations update code.

  • dom/Node.cpp:

(WebCore::Node::setNeedsStyleRecalc):

Prevent spurious style invalidation during render tree updating.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

Capturing body element color for color:-webkit-text is now done by TreeResolver.

  • rendering/RenderElement.h:

(WebCore::RenderElement::setAnimatableStyle): Deleted.

No longer used.

  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::nextSiblingRenderer):

Skip over non-rendered slot elements.

  • style/RenderTreeUpdater.cpp: Added.

(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::RenderTreeUpdater):
(WebCore::hasDisplayContents):
(WebCore::findRenderingRoot):
(WebCore::RenderTreeUpdater::commit):

Call updateRenderTree for each change root.

(WebCore::shouldCreateRenderer):
(WebCore::RenderTreeUpdater::updateRenderTree):

Iteratively traverse the composed tree starting for a change root.
Apply the changes calling updateElementRenderer and updateTextRenderer as needed.
Enter subtrees that haves changes to apply.

(WebCore::RenderTreeUpdater::renderTreePosition):

We may not create renderers for all elements (<slot> or more generally display:contents) that
have rendered descendants. Search the parent stack to find the valid position.

(WebCore::RenderTreeUpdater::pushParent):
(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::popParentsToDepth):

Maintain parent stack.

(WebCore::pseudoStyleCacheIsInvalid):
(WebCore::RenderTreeUpdater::updateElementRenderer):

Create, delete or update the renderer.

(WebCore::moveToFlowThreadIfNeeded):
(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::textRendererIsNeeded):
(WebCore::createTextRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):

This is moved from TreeResolver.

(WebCore::needsPseudoElement):
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):

Pseudo elements are handled entirely during render tree construction. Compute their style and
create or delete them as needed.

  • style/RenderTreeUpdater.h: Added.

(WebCore::RenderTreeUpdater::parent):

  • style/StyleRelations.cpp:

(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):

Commit to Style::Update instead of the document if needed.

(WebCore::Style::commitRelationsToDocument): Deleted.

  • style/StyleRelations.h:
  • style/StyleSharingResolver.cpp:

(WebCore::Style::elementHasDirectionAuto):
(WebCore::Style::SharingResolver::resolve):

Fetch the shareable style from Style::Update instead of the active document style.

(WebCore::Style::SharingResolver::findSibling):
(WebCore::Style::SharingResolver::canShareStyleWithElement):

  • style/StyleSharingResolver.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Parent::Parent):

No need for render tree position anymore.

(WebCore::Style::TreeResolver::popScope):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
(WebCore::Style::createTextRendererIfNeeded):
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::detachChildren):
(WebCore::Style::detachSlotAssignees):
(WebCore::Style::detachRenderTree):
(WebCore::Style::TreeResolver::resolveElement):

Just resolve the style and return it, no more applying or entering render tree construction code paths.

(WebCore::Style::resolveTextNode):
(WebCore::Style::elementImplicitVisibility):
(WebCore::Style::TreeResolver::pushParent):
(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::TreeResolver::popParentsToDepth):
(WebCore::Style::shouldResolvePseudoElement):
(WebCore::Style::TreeResolver::resolveComposedTree):

Add style changes to Style::Update.

(WebCore::Style::TreeResolver::resolve):

Return Style::Update object if non-empty.

(WebCore::Style::postResolutionCallbackQueue):
(WebCore::Style::shouldCreateRenderer): Deleted.
(WebCore::Style::moveToFlowThreadIfNeeded): Deleted.
(WebCore::Style::TreeResolver::createRenderer): Deleted.
(WebCore::Style::TreeResolver::createRenderTreeForChildren): Deleted.
(WebCore::Style::TreeResolver::createRenderTreeForShadowRoot): Deleted.
(WebCore::Style::beforeOrAfterPseudoElement): Deleted.
(WebCore::Style::setBeforeOrAfterPseudoElement): Deleted.
(WebCore::Style::clearBeforeOrAfterPseudoElement): Deleted.
(WebCore::Style::needsPseudoElement): Deleted.
(WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement): Deleted.
(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees): Deleted.
(WebCore::Style::TreeResolver::createRenderTreeRecursively): Deleted.
(WebCore::Style::pseudoStyleCacheIsInvalid): Deleted.
(WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement): Deleted.

Remove the recursive render tree building code path.

  • style/StyleTreeResolver.h:

(WebCore::Style::TreeResolver::scope):

  • style/StyleUpdate.cpp: Added.

(WebCore::Style::Update::Update):
(WebCore::Style::Update::elementUpdate):
(WebCore::Style::Update::textUpdate):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::addText):
(WebCore::Style::Update::addPossibleRoot):

  • style/StyleUpdate.h: Added.

(WebCore::Style::Update::roots):
(WebCore::Style::Update::document):

  • svg/SVGElement.h:

(WebCore::SVGElement::updateRelativeLengthsInformation):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::willRecalcStyle):
(WebCore::SVGUseElement::willAttachRenderers): Deleted.

Switvh willAttachRenderers to willRecalcStyle as the former is now called too late.

  • svg/SVGUseElement.h:

LayoutTests:

Skip mathml/presentation/menclose-notation-attribute-change-value.html. It will be fixed by upcoming MathML refactoring.

  • css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt:
  • css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt:

This is a progression.

  • editing/mac/spelling/autocorrection-contraction-expected.txt:
  • editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt:
  • editing/mac/spelling/autocorrection-removing-underline-expected.txt:
  • editing/mac/spelling/autocorrection-simple-expected.txt:
  • editing/style/remove-underline-from-stylesheet-expected.txt:
  • editing/style/typing-style-003-expected.txt:

Non-rendered whitespace related changes.

  • platform/ios-simulator/TestExpectations:

Skip fast/regions/position-writing-modes-in-variable-width-regions.html on iOS. Similar tests are mostly already skipped.

  • platform/ios-simulator/editing/style/typing-style-003-expected.txt: Added.
  • platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt:
  • platform/mac/editing/inserting/editable-html-element-expected.txt:
  • platform/mac/editing/inserting/editing-empty-divs-expected.txt:
  • platform/mac/editing/inserting/insert-at-end-02-expected.txt:
  • platform/mac/editing/pasteboard/4989774-expected.txt:
  • platform/mac/editing/selection/4983858-expected.txt:

Non-rendered whitespace related changes.

1:06 AM WebKitNightlyElCapWorkaround edited by Manuel Rego Casasnovas
run-safari was not working after the workaround, explained how to run … (diff)
12:23 AM WebKitGTK/2.12.x edited by berto@igalia.com
(diff)

Mar 31, 2016:

11:31 PM Changeset in webkit [198942] by Chris Fleizach
  • 15 edits
    4 adds in trunk

AX: <attachment> element not accessible
https://bugs.webkit.org/show_bug.cgi?id=156045

Reviewed by Joanmarie Diggs.

Source/WebCore:

Make this element accessible by exposing title, subtitle, action, progress to accessibility.

Test: accessibility/attachment-element.html

  • accessibility/AXObjectCache.cpp:

(WebCore::createFromRenderer):

  • accessibility/AccessibilityAttachment.cpp: Added.

(WebCore::AccessibilityAttachment::AccessibilityAttachment):
(WebCore::AccessibilityAttachment::create):
(WebCore::AccessibilityAttachment::hasProgress):
(WebCore::AccessibilityAttachment::valueForRange):
(WebCore::AccessibilityAttachment::attachmentElement):
(WebCore::AccessibilityAttachment::roleDescription):
(WebCore::AccessibilityAttachment::computeAccessibilityIsIgnored):
(WebCore::AccessibilityAttachment::accessibilityText):
(WebCore::AccessibilityAttachment::accessibilityDescription):

  • accessibility/AccessibilityAttachment.h: Added.
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::hasHighlighting):
(WebCore::AccessibilityObject::roleDescription):
(WebCore::AccessibilityObject::supportsRangeValue):
(WebCore::AccessibilityObject::supportsARIASetSize):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isAttachmentElement):
(WebCore::AccessibilityObject::isHeading):
(WebCore::AccessibilityObject::isLink):
(WebCore::AccessibilityObject::isImage):
(WebCore::AccessibilityObject::isRadioButton):
(WebCore::AccessibilityObject::isListBox):
(WebCore::AccessibilityObject::isListBoxOption):
(WebCore::AccessibilityObject::isAttachment):
(WebCore::AccessibilityObject::isMediaTimeline):
(WebCore::AccessibilityObject::isMenuRelated):
(WebCore::AccessibilityObject::isMenu):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityValue]):

LayoutTests:

  • accessibility/attachment-element-expected.txt: Added.
  • accessibility/attachment-element.html: Added.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
10:34 PM Changeset in webkit [198941] by n_wang@apple.com
  • 4 edits
    2 adds in trunk

AX: AX hit-testing does not work on WebKit video playback buttons
https://bugs.webkit.org/show_bug.cgi?id=156084

Reviewed by Darin Adler.

Source/WebCore:

Use the element at point instead of the shadow host for hit testing on video tags.

Test: accessibility/mac/video-tag-hit-test.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::elementAccessibilityHitTest):
(WebCore::shouldUseShadowHostForHitTesting):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):

LayoutTests:

  • accessibility/mac/video-tag-hit-test-expected.txt: Added.
  • accessibility/mac/video-tag-hit-test.html: Added.
9:54 PM Changeset in webkit [198940] by ap@apple.com
  • 3 edits in trunk/Source/WebCore

Page overlay tests sometimes crash under MockPageOverlayClient::uninstallAllOverlays()
https://bugs.webkit.org/show_bug.cgi?id=156080
rdar://problem/24922183

Reviewed by Alex Christensen.

Make MockPageOverlayClient::m_overlays reference the overlays. There is no reference
cycle because they are all removed between test page loads.

  • testing/MockPageOverlayClient.cpp:

(WebCore::MockPageOverlayClient::uninstallAllOverlays):
(WebCore::MockPageOverlayClient::pageOverlayDestroyed):

  • testing/MockPageOverlayClient.h:
9:52 PM Changeset in webkit [198939] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebKit2

Unreviewed EFL build fix caused by r198929.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::layerVolatilityTimerFired): Need to use type casting in WEBPAGE_LOG_ALWAYS_ERROR() log.

8:23 PM Changeset in webkit [198938] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

https://bugs.webkit.org/show_bug.cgi?id=156094
[Win] TestWebCore target build sometimes fail.

Patch by Bill Ming <mbbill@gmail.com> on 2016-03-31
Reviewed by Alex Christensen.

  • Tools/TestWebKitAPI/PlatformWin.cmake:
8:15 PM Changeset in webkit [198937] by Jon Davis
  • 2 edits
    1 add in trunk/Websites/webkit.org

Show tweets by @webkit in the Twitter tile on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=156093

Reviewed by Timothy Hatcher.

  • wp-content/plugins/tweet-listener.php: Added.
  • wp-content/themes/webkit/widgets/twitter.php:
6:54 PM Changeset in webkit [198936] by dbates@webkit.org
  • 10 edits
    8 adds in trunk

REGRESSION (r197724): <object>/<embed> with no URL does not match source *
https://bugs.webkit.org/show_bug.cgi?id=156079
<rdar://problem/25470805>

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes an issue where HTML object and embed elements that are not associated with a URL are
allowed to load when object-src/default-src contains source *. More generally, we allow
such elements to load so long as object-src/default-src is not 'none' per section object-src
of the Content Security Policy Level 3 spec., <http://w3c.github.io/webappsec-csp> (Editor's Draft, 29 February 2016).

Tests: http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-default-src-star.html

http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-star.html
http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-default-src-star.html
http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-star.html

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowObjectFromSource): Modified to call violatedDirectiveInAnyPolicy() passing
ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::Yes.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::checkSource): Modified to take argument of type ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone (defaults to false)
and pass it through to ContentSecurityPolicySourceListDirective.
(WebCore::checkFrameAncestors): Explicitly pass ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::No
to avoid URL from having the compiler implicitly convert it to a String and selecting override ContentSecurityPolicySourceListDirective::allows(const String&),
which will lead to incorrect results. We will look to make this code less error prone in <https://bugs.webkit.org/show_bug.cgi?id=156086>.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource): Modified to take argument of type
ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone and pass it through.

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::parse): Set instance variable m_isNone to true so that we can differentiate
a source list with value 'none' from a source list that lists one or more sources or non-none keywords.

  • page/csp/ContentSecurityPolicySourceList.h:

(WebCore::ContentSecurityPolicySourceList::isNone): Added.

  • page/csp/ContentSecurityPolicySourceListDirective.cpp:

(WebCore::ContentSecurityPolicySourceListDirective::allows): Modified to take argument of type ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone
and updated code to return true for an empty URL only if this argument is ContentSecurityPolicySourceListDirective::ShouldAllowEmptyURLIfSourceListIsNotNone::Yes and
the source list does not have value 'none'.

  • page/csp/ContentSecurityPolicySourceListDirective.h:

LayoutTests:

Add tests to ensure that HTML object and embed elements are allowed by source *.

  • platform/ios-simulator/TestExpectations: Skip added tests as plugins are not supported on iOS.
  • http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-default-src-star-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-default-src-star.html: Added.
  • http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-star-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/embed-with-no-url-allowed-by-star.html: Added.
  • http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-default-src-star-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-default-src-star.html: Added.
  • http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-star-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/object-with-no-url-allowed-by-star.html: Added.
6:48 PM Changeset in webkit [198935] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] CFA's valuesAtHead should be a list, not a map
https://bugs.webkit.org/show_bug.cgi?id=156087

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-31
Reviewed by Mark Lam.

One more step toward moving to the Air-style of liveness analysis:

Make DFG's valuesAtHead a list of Node*-AbstractValue.
This patch alone is already a speedup because our many CFAs
spend an unreasonable amount of time updating at block boundaries.

  • dfg/DFGBasicBlock.h:
  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::performBlockCFA):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::setLiveValues):
(JSC::DFG::InPlaceAbstractState::merge):

  • dfg/DFGNode.h:

(JSC::DFG::nodeValuePairComparator):
(JSC::DFG::nodeValuePairListDump):

6:40 PM Changeset in webkit [198934] by Gyuyoung Kim
  • 2 edits in trunk/Tools

[EFL] Bump EFL version to 1.17.0
https://bugs.webkit.org/show_bug.cgi?id=153008

Reviewed by Michael Catanzaro.

Original author is Csaba Osztrogonác <Csaba Osztrogonác>

  • efl/jhbuild.modules:
6:12 PM Changeset in webkit [198933] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r194660): Navigating to HTTPS sites may fail with error
https://bugs.webkit.org/show_bug.cgi?id=155455
<rdar://problem/24308793>

Reviewed by Alexey Proskuryakov.

Fixes an issue where navigating to an HTTPS site may fail because the Security Framework uses
a cache directory that it does not have permission to use.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::codeSigningIdentifierForProcess): Queries the Security Framework for the code signed
bundle identifier/code signing identifier.
(WebKit::ChildProcess::initializeSandbox): Use the client identifier as part of the user directory
suffix. Verify that the client identifier matches the code signed bundled identifier/code
signing identifier for the code signed app/tool. Fix minor code style issue; use a C++-style cast
instead of a C-style cast when casting an OSStatus to a long.
(WebKit::findSecCodeForProcess): Deleted; incorporated logic into WebKit::codeSigningIdentifierForProcess().

5:24 PM Changeset in webkit [198932] by sbarati@apple.com
  • 12 edits in trunk/Source

Revert rewrite const as var workaround
https://bugs.webkit.org/show_bug.cgi?id=155393

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • parser/Parser.h:

(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):

  • runtime/VM.h:

(JSC::VM::setShouldRewriteConstAsVar): Deleted.
(JSC::VM::shouldRewriteConstAsVar): Deleted.

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::commonVM):

  • page/Settings.cpp:
  • page/Settings.h:

(WebCore::Settings::shouldUseHighResolutionTimers):
(WebCore::Settings::backgroundShouldExtendBeyondPage):
(WebCore::Settings::shouldRewriteConstAsVar): Deleted.
(WebCore::Settings::setShouldRewriteConstAsVar): Deleted.

Source/WebKit2:

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

4:59 PM Changeset in webkit [198931] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Unreviewed, rolling out r196854.

We do not need those assertions anymore as it seems
<rdar://problem/24457478> is fixed

Reverted changeset:

"Land release assertions to help track down a possible
HTMLCollection lifetime bug"
https://bugs.webkit.org/show_bug.cgi?id=154490
http://trac.webkit.org/changeset/196854

4:45 PM Changeset in webkit [198930] by dbates@webkit.org
  • 3 edits in trunk/Tools

run-webkit-tests fails to create user's cache directory when System Integrity Protection is enabled
https://bugs.webkit.org/show_bug.cgi?id=156071
<rdar://problem/25467827>

Reviewed by Brent Fulgham.

Fixes an issue where run-webkit-tests will fail to create the suffixed user's cache directory
on non-Apple Internal machines with System Integrity Protection enabled because the OS only
honors the suffix, specified by the environment variable DIRHELPER_USER_DIR_SUFFIX, in
privileged processes. And python(1) does not have sufficient privileges. As a workaround for
systems that have System Integrity Protection enabled we compute the path to the suffixed
user's cache directory by hand.

Additionally, fix an issue where the user's cache directory created by run-webkit-test was
never deleted on cessation of the test run.

  • Scripts/webkitpy/port/driver.py:

(Driver._start): Actually store the path to the user's cache directory in self._driver_user_cache_directory
so that we can delete this directory on cessation of the test run.

  • Scripts/webkitpy/port/mac.py:

(MacPort):
(MacPort._path_to_user_cache_directory): Unset the environment variable DIRHELPER_USER_DIR_SUFFIX (if set),
query the OS for the path to the user's cache directory and concatenate this path with the
specified suffix.

4:33 PM Changeset in webkit [198929] by Chris Dumez
  • 8 edits in trunk/Source

[iOS] Both WebPage's volatility timer and WebProcess's processSuspensionCleanupTimer are trying to make surfaces volatile with very short interval
https://bugs.webkit.org/show_bug.cgi?id=156065
<rdar://problem/25452004>

Reviewed by Simon Fraser.

Source/WebCore:

Export a symbol so it can be used from WebKit2.

  • page/Page.h:

Source/WebKit2:

Upon process suspension, both the WebPage's volatility timer and
WebProcess' processSuspensionCleanupTimer are trying to make surfaces
volatile with a very short interval. This is overly aggressive given
that this operation normally succeeds very quickly or does not (due
to underlying bugs).

This patch does the following:

  • Drop the WebProcess' processSuspensionCleanupTimer and have the WebProcess drive the WebPages' volatility timer instead.
  • Update the WebPages' volatility timer to do exponential back off.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::layerVolatilityTimerFired):
(WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
(WebKit::WebPage::markLayersVolatile):
(WebKit::WebPage::cancelMarkLayersVolatile):
(WebKit::WebPage::isAlwaysOnLoggingAllowed):
(WebKit::WebPage::setLayerTreeStateIsFrozen): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::markLayersVolatile):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationWillEnterForeground):
(WebKit::WebPage::applicationDidBecomeActive): Deleted.
(WebKit::adjustVelocityDataForBoundedScale): Deleted.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::processWillSuspendImminently):
(WebKit::WebProcess::prepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::markAllLayersVolatile):
(WebKit::WebProcess::cancelMarkAllLayersVolatile):
(WebKit::WebProcess::setAllLayerTreeStatesFrozen):
(WebKit::WebProcess::processDidResume):
(WebKit::WebProcess::WebProcess): Deleted.

  • WebProcess/WebProcess.h:
4:07 PM Changeset in webkit [198928] by sbarati@apple.com
  • 5 edits in trunk

[ES6] Disallow var assignments in for-in loops
https://bugs.webkit.org/show_bug.cgi?id=155451

Reviewed by Mark Lam.

Source/JavaScriptCore:

We're doing this in its own patch instead of the patch for https://bugs.webkit.org/show_bug.cgi?id=155384
because last time we made this change it broke some websites. Lets try making
it again because it's what the ES6 mandates. If it still breaks things we will
roll it out.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseForStatement):

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
4:01 PM Changeset in webkit [198927] by sbarati@apple.com
  • 7 edits in trunk

parsing arrow function expressions slows down the parser by 8% lets recoup some loss
https://bugs.webkit.org/show_bug.cgi?id=155988

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

We used to eagerly check if we're parsing an arrow function.
We did this inside parseAssignmentExpression(), and it was
very costly. The reason it was costly is that arrow functions
might start with an identifier. This means anytime we saw an
identifier we would have to do a lookahead, and then most likely
backtrack because more often than not, we wouldn't see "=>"
as the next token.

In this patch I implement a new approach. We just parse
the lhs of an assignment expression eagerly without doing any
lookahead. Retroactively, if we see that we might have started
with an arrow function, and we don't have a valid lhs or the
next token is a "=>", we try to parse as an arrow function.

Here are a few examples motivating why this is valid:

x => x
In this example:

  • "x" is a valid arrow function starting point.
  • "x" also happens to be a valid lhs
  • because we see "=>" as the next token, we parse as an arrow function and succeed.

(x) => x
In this example:

  • "(" is a valid arrow function starting point.
  • "(x)" also happens to be a valid lhs
  • because we see "=>" as the next token, we parse as an arrow function and succeed.

({x = 30}) => x;
In this example:

  • "(" is a valid arrow function starting point.
  • "({x = 30})" is NOT a valid lhs. Because of this, we try to parse it as an arrow function and succeed.

There is one interesting implementation detail where we might
parse something that is both a valid LHS but happens
to actually be the arrow function parameters. The valid LHS
parsing might declare such variables as "uses" which would cause
weird capture analysis. This patch also introduces a mechanism
to backtrack on used variable analysis.

This is a 3.5%-4.5% octane code load speedup.

  • parser/Lexer.h:

(JSC::Lexer::sawError):
(JSC::Lexer::setSawError):
(JSC::Lexer::getErrorMessage):
(JSC::Lexer::setErrorMessage):
(JSC::Lexer::sourceURL):
(JSC::Lexer::sourceMappingURL):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::isArrowFunctionParameters):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parsePrimaryExpression):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::startSwitch):
(JSC::Scope::declareParameter):
(JSC::Scope::usedVariablesContains):
(JSC::Scope::useVariable):
(JSC::Scope::pushUsedVariableSet):
(JSC::Scope::currentUsedVariablesSize):
(JSC::Scope::revertToPreviousUsedVariables):
(JSC::Scope::setNeedsFullActivation):
(JSC::Scope::needsFullActivation):
(JSC::Scope::isArrowFunctionBoundary):
(JSC::Scope::setInnerArrowFunctionUsesEvalAndUseArgumentsIfNeeded):
(JSC::Scope::collectFreeVariables):
(JSC::Scope::fillParametersForSourceProviderCache):
(JSC::Scope::restoreFromSourceProviderCache):
(JSC::Scope::setIsModule):

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:

(catch):

3:54 PM Changeset in webkit [198926] by peavo@outlook.com
  • 11 edits in trunk/LayoutTests

[Win] Skip INTL related tests.
https://bugs.webkit.org/show_bug.cgi?id=156074

Reviewed by Alex Christensen.

Temporarily skip failing INTL related tests, because AppleWin currently
does not have INTL enabled.

  • js/script-tests/array-toLocaleString.js:
  • js/script-tests/date-toLocaleString.js:
  • js/script-tests/intl-collator.js:
  • js/script-tests/intl-datetimeformat.js:
  • js/script-tests/intl-numberformat.js:
  • js/script-tests/intl.js:
  • js/script-tests/number-toLocaleString.js:
  • js/script-tests/string-toLocaleLowerCase.js:
  • js/script-tests/string-toLocaleUpperCase.js:
  • platform/win/TestExpectations:
3:50 PM Changeset in webkit [198925] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: ScriptSyntaxTree doesn't handle RestElement AST nodes
https://bugs.webkit.org/show_bug.cgi?id=156085

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-31
Reviewed by Saam Barati.

Source/WebInspectorUI:

  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
When searching for identifiers in Function parameters, pass
through the RestElement to its argument.

(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Create a ScriptSyntaxTree RestElement node.
Also, every case in recurse visits the current
node, so simplify the code!

LayoutTests:

  • inspector/model/parse-script-syntax-tree-expected.txt:
  • inspector/model/parse-script-syntax-tree.html:

Add a test for a RestElement.

3:43 PM Changeset in webkit [198924] by dbates@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r195605): ASSERTION FAILED: !NoEventDispatchAssertion::isEventDispatchForbidden()
when pressing the back button on a page with a focused subframe
https://bugs.webkit.org/show_bug.cgi?id=156033
<rdar://problem/25446561>

Reviewed by Chris Dumez.

Source/WebCore:

Fixes an assertion failure when navigating back, by pressing the browser back button, to
the previous page from a page with a focused subframe.

Following r195605 (https://bugs.webkit.org/show_bug.cgi?id=153449), the responsibility for
dispatching a DOM pagehide event moved from CachedFrame to PageCache and we now instantiate
a NoEventDispatchAssertion object to enforce the invariant that no additional DOM events are
dispatched as part of adding a page to the page cache. When adding a page with a focused
subframe to the page cache we focus its main frame, which implicitly defocuses the subframe
and dispatches a DOM blur event at it. Therefore an assertion failure occurs when dispatching
this DOM blur event (because a NoEventDispatchAssertion object was allocated on the stack).

Test: fast/history/back-from-page-with-focused-iframe.html

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame): Move logic to focus the main frame from here...

  • history/PageCache.cpp:

(WebCore::PageCache::addIfCacheable): to here such that any DOM blur and focus events
are dispatched before instantiate the NoEventDispatchAssertion object and enter the page
cache.

LayoutTests:

Add a test to ensure that when navigating back from a page with a focused <iframe> f, a DOM
blur event is dispatched to f, a DOM focus event is dispatched at the main frame and that
an assertion failure does not occur (only applicable in a debug build).

  • fast/history/back-from-page-with-focused-iframe-expected.txt: Added.
  • fast/history/back-from-page-with-focused-iframe.html: Added.
3:42 PM Changeset in webkit [198923] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

Simplify API of Test model by removing Test.setParentTest
https://bugs.webkit.org/show_bug.cgi?id=156055

Reviewed by Joseph Pecoraro.

Removed Test.setParentTest. Keep track of the child-parent relationship using the static map instead.

Now each test only stores parent's id and uses the ID static map in Test.parentTest().

  • public/v3/models/manifest.js:

(Manifest._didFetchManifest.buildObjectsFromIdMap): Removed the code to create the map of child-parent
relationship and call setParentTest.

  • public/v3/models/test.js:

(Test): Updated a static map by the name of "childTestMap" to store itself. We should probably sort
child tests using some fixed criteria in the future instead of relying on the creation order but
preserve the old code's ordering for now.
(Test.prototype.parentTest): Look up the static map by the parent test's id.
(Test.prototype.onlyContainsSingleMetric):
(Test.prototype.setParentTest): Deleted.
(Test.prototype.childTests): Look up the child test map.

3:38 PM Changeset in webkit [198922] by dbates@webkit.org
  • 1 edit
    1 add in trunk

tool tip/alt. text appears when mouse is no longer hovering over link
https://bugs.webkit.org/show_bug.cgi?id=24427
<rdar://problem/8045235>

Reviewed by Antonio Gomes.

Although the bug no longer reproduces, add a manual test that can be used to determine if a
tooltip for a hyperlink is shown when the cursor no longer hovers over it.

  • ManualTests/tooltip-when-mouse-not-directly-over-hyperlink.html: Added.
3:22 PM Changeset in webkit [198921] by matthew_hanson@apple.com
  • 4 edits
    5 deletes in branches/safari-601-branch

Roll out r191180. rdar://problem/25448882

2:55 PM Changeset in webkit [198920] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fix download links for desktops with small resolutions
https://bugs.webkit.org/show_bug.cgi?id=156081

Reviewed by Timothy Hatcher.

  • wp-content/themes/webkit/downloads.php:
2:52 PM Changeset in webkit [198919] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Fails to build in Linux / PowerPC due to different ucontext_t definition
https://bugs.webkit.org/show_bug.cgi?id=156015

Reviewed by Michael Catanzaro.

PPC does not have mcontext_t in ucontext_t::uc_mcontext.
So we take the special way to retrieve mcontext_t in PPC.

  • heap/MachineStackMarker.cpp:

(pthreadSignalHandlerSuspendResume):

2:51 PM Changeset in webkit [198918] by BJ Burg
  • 2 edits in trunk/Source/WebKit2

Web Automation: the interaction queue in WebAutomationSession::performKeyInteractions doesn't work
https://bugs.webkit.org/show_bug.cgi?id=156083

Reviewed by Timothy Hatcher.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performKeyboardInteractions):
Use Vector::reserveCapacity instead of the size constructor since we use append.
Empty the interaction queue outside of loops so all interactions are performed once.

2:12 PM Changeset in webkit [198917] by Chris Dumez
  • 4 edits
    5 deletes in trunk

REGRESSION (r191180): Safari does not send Referer Header to iframe src in certain situations
https://bugs.webkit.org/show_bug.cgi?id=155754
<rdar://problem/25296445>

Unreviewed, roll out r191180 as it breaks sites and needs to be reworked.

Source/WebCore:

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::tagIdFor): Deleted.
(WebCore::TokenPreloadScanner::initiatorFor): Deleted.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType): Deleted.

  • html/parser/HTMLPreloadScanner.h:

LayoutTests:

  • fast/preloader/frame-src-expected.txt: Removed.
  • fast/preloader/frame-src.html: Removed.
  • fast/preloader/resources/testFrame.html: Removed.
  • http/tests/loading/preload-no-store-frame-src-expected: Removed.
  • http/tests/loading/preload-no-store-frame-src.html: Removed.
2:05 PM Changeset in webkit [198916] by matthew_hanson@apple.com
  • 4 edits
    5 deletes in branches/safari-601.1.46-branch

Roll out r191180. rdar://problem/25449273

2:03 PM Changeset in webkit [198915] by timothy@apple.com
  • 2 edits in trunk/Source/WebKit2

Web Automation: Add support for script timeouts to the evaluateJavaScriptFunction command

https://bugs.webkit.org/show_bug.cgi?id=156052
rdar://problem/25457151

Address additional review comments.

  • WebProcess/Automation/WebAutomationSessionProxy.js:

(AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Add semicolons and remove
and clearTimeout that wasn't needed.

1:52 PM Changeset in webkit [198914] by timothy@apple.com
  • 6 edits in trunk/Source/WebKit2

Web Automation: Navigation commands should not return until page loads or fails

https://bugs.webkit.org/show_bug.cgi?id=156063
rdar://problem/25464373

Reviewed by Brian Burg.

  • UIProcess/Automation/Automation.json: Make navigation commands async.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::navigateBrowsingContext): Save callback and timeout previous.
(WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
(WebKit::WebAutomationSession::navigationOccuredForPage): Added. Fire callback for page.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFinishLoadForFrame): Call WebAutomationSession::navigationOccuredForPage.
(WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.

  • UIProcess/WebProcessPool.h: Added automationSession() getter.
1:52 PM Changeset in webkit [198913] by timothy@apple.com
  • 8 edits in trunk/Source/WebKit2

Web Automation: Add support for script timeouts to the evaluateJavaScriptFunction command

https://bugs.webkit.org/show_bug.cgi?id=156052
rdar://problem/25457151

Reviewed by Brian Burg.

  • UIProcess/Automation/Automation.json: Added callbackTimeout to evaluateJavaScriptFunction.

Also made expectsImplicitCallbackArgument optional, since it is not required. Added JavaScriptTimeout error.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::evaluateJavaScriptFunction): Added callbackTimeout.

  • UIProcess/Automation/WebAutomationSession.h:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::evaluateJavaScriptCallback): Send JavaScriptTimeout error if the timeout fired.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Added callbackTimeout.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.js:

(AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Set a timeout to fire if the
callback is not called, then return an error.

  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:

(EvaluateJavaScriptFunction): Added callbackTimeout parameter.

1:43 PM Changeset in webkit [198912] by eric.carlson@apple.com
  • 37 edits
    1 copy
    5 adds
    3 deletes in trunk/LayoutTests

Rebaseline media control tests when new media control appearances are finalized
https://bugs.webkit.org/show_bug.cgi?id=142142

Reviewed by Brent Fulgham.

  • fullscreen/video-controls-override.html: Test height as an integer.
  • http/tests/media/hls/video-controls-live-stream.html: Start playback explicitly instead of using autoplay, and pause playback before dumping controls state to make the test results more deterministic.
  • media/audio-delete-while-slider-thumb-clicked.html: Make the <audio> element wide enough that it will always have a timeline scrubber. Trigger test on 'canplaythrough' instead of autoplay + 'playing' to simplify the test slightly.
  • media/nodesFromRect-shadowContent.html: Test for controls panel-background instead timeline-container because of changes to the controls structure.
  • platform/mac-mavericks/media/audio-controls-rendering-expected.png: Removed.
  • platform/mac-mavericks/media/audio-controls-rendering-expected.txt: Removed.
  • platform/mac-mavericks/media/video-volume-slider-expected.txt: Removed.
  • platform/mac-wk1/media/controls-styling-expected.txt: Removed.
  • platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt: Added
  • platform/mac-yosemite/media: Added.
  • platform/mac-yosemite/media/controls-styling-expected.txt: Added.
  • platform/mac/TestExpectations: Unskip some tests.
  • platform/mac/accessibility/media-element-expected.txt: Update results.
  • platform/mac/fast/layers/video-layer-expected.png: Ditto.
  • platform/mac/fast/layers/video-layer-expected.txt: Ditto.
  • platform/mac/fullscreen/video-controls-override-expected.txt: Ditto.
  • platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt: Ditto.
  • platform/mac/media/audio-controls-rendering-expected.png: Ditto.
  • platform/mac/media/audio-controls-rendering-expected.txt: Ditto.
  • platform/mac/media/controls-after-reload-expected.png: Ditto.
  • platform/mac/media/controls-after-reload-expected.txt: Ditto.
  • platform/mac/media/controls-strict-expected.png: Ditto.
  • platform/mac/media/controls-strict-expected.txt: Ditto.
  • platform/mac/media/controls-styling-expected.png: Ditto.
  • platform/mac/media/controls-styling-expected.txt: Ditto.
  • platform/mac/media/controls-without-preload-expected.png: Ditto.
  • platform/mac/media/controls-without-preload-expected.txt: Ditto.
  • platform/mac/media/media-controls-clone-expected.png: Ditto.
  • platform/mac/media/media-controls-clone-expected.txt: Ditto.
  • platform/mac/media/media-document-audio-repaint-expected.png: Ditto.
  • platform/mac/media/video-controls-rendering-expected.png: Ditto.
  • platform/mac/media/video-controls-rendering-expected.txt: Ditto.
  • platform/mac/media/video-display-toggle-expected.png: Ditto.
  • platform/mac/media/video-display-toggle-expected.txt: Ditto.
  • platform/mac/media/video-empty-source-expected.png: Ditto.
  • platform/mac/media/video-empty-source-expected.txt: Ditto.
  • platform/mac/media/video-no-audio-expected.png: Ditto.
  • platform/mac/media/video-no-audio-expected.txt: Ditto.
  • platform/mac/media/video-volume-slider-expected.png: Ditto.
  • platform/mac/media/video-volume-slider-expected.txt: Ditto.
  • platform/mac/media/video-zoom-controls-expected.png: Ditto.
  • platform/mac/media/video-zoom-controls-expected.txt: Ditto.
1:39 PM Changeset in webkit [198911] by jiewen_tan@apple.com
  • 12 edits
    3 adds in trunk

WebKit should set Original URL of a download request correctly
https://bugs.webkit.org/show_bug.cgi?id=155914
<rdar://problem/10473811>

Reviewed by Anders Carlsson.

Source/WebCore:

Added API tests.

Replace the old logic for identifying the Original URL of a download request
with a new method based on the logic from Document::firstPartyForCookies, which
does a much better job determining the URL a user actually visited.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setOriginalURLForDownloadRequest):
(WebCore::originatingURLFromBackForwardList): Deleted.

Source/WebKit2:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • NetworkProcess/NetworkProcess.h:

Add logic to set the original URL of a download request when a main resource load
is converted to a download.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download):

  • UIProcess/WebProcessPool.h:

Add logic to set the original URL of a download request during a context menu:
Download Linked File action.

Tools:

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

(-[DownloadRequestOriginalURLDelegate initWithExpectOriginalURL:]):
(-[DownloadRequestOriginalURLDelegate _downloadDidStart:]):
(-[DownloadRequestOriginalURLNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/DownloadRequestOriginalURL.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/DownloadRequestOriginalURL2.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/DownloadRequestOriginalURLFrame.html: Added.
12:36 PM Changeset in webkit [198910] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Moving a few skipped tests from ios-simulator-wk2 to ios-simulator TestExpectations file.

Unreviewed test gardening.

These particular tests time out due to lack of touch event support, which applies
to both wk1 and wk2 ios-simulator testers.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
12:25 PM Changeset in webkit [198909] by tonikitoo@webkit.org
  • 2 edits in trunk/Source/WebCore

eventMayStartDrag() does not check for shiftKey or isOverLink
https://bugs.webkit.org/show_bug.cgi?id=155746

Reviewed by Darin Adler.

There is currently a mismatch between the logic that checks whether
an event can start a dragging action in EventHandler::handleMousePressEvent
and in EventHandler::eventMayStartDrag
Basically the former checks for event's count, type, button, target and modifier.
The later, on the other hand, only checks for event's button and count.

In order to sync them up again, as per the comment in the code,
patch factors out the logic in ::handleMousePressEvent into a helper function,
and ultimately reuses it in ::eventMayStartDrag.

No new tests for two reasons:

1) ::handleMousePressEvent will not have any behavior change. Code is factored out
into a helper.

2) The callees of ::eventMayStartDrag are currently WebPage::shouldDelayWindowOrderingEvent
and ::acceptsFirstMouse. Based on my understanding of [1], these methods
are called when there is a (say) browser window in background with some text selected,
and user starts to drag the selected content. Dragging happens without bringing the window
foreground. This is called "non-activating click".
Such behavior will not change with the patch.

[1] https://bugs.webkit.org/show_bug.cgi?id=55053 - "Implement non-activating clicks to allow dragging out of a background window"

  • page/EventHandler.cpp:

(WebCore::isSingleMouseDownOnLinkOrImage):
(WebCore::canMouseEventStartDragInternal):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::documentPointForWindowPoint): Moved up in the file to be used elsewhere.
(WebCore::EventHandler::eventMayStartDrag):

12:12 PM Changeset in webkit [198908] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/console/heapSnapshot.html as a flaky timeout on Mac
https://bugs.webkit.org/show_bug.cgi?id=156078

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:03 PM Changeset in webkit [198907] by Joseph Pecoraro
  • 9 edits in trunk/Source/WebKit2

Web Automation: Add Automation.screenshot
https://bugs.webkit.org/show_bug.cgi?id=156073
<rdar://problem/25468646>

Reviewed by Timothy Hatcher and Brian Burg.

  • UIProcess/Automation/Automation.json:

Add Automation.screenshot which returns base64 encoded PNG data.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::screenshot):
(WebKit::WebAutomationSession::didTakeScreenshot):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
Send a message to the WebPage to get an Image of the page
and handle the response.

  • UIProcess/Cocoa/WebAutomationSessionCocoa.mm:

(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
Convert the bitmap data to a base64 encoded PNG.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::evaluateJavaScriptCallback):
(WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
Use null string where possible for efficiency.

(WebKit::WebAutomationSessionProxy::takeScreenshot):
Take an image of the entire page and pass back to the UIProcess.

11:56 AM Changeset in webkit [198906] by timothy@apple.com
  • 2 edits in trunk/Source/WebKit2

Web Automation: Handle undefined when calling a function that has no result

https://bugs.webkit.org/show_bug.cgi?id=156075
rdar://problem/25468907

Reviewed by Brian Burg.

  • WebProcess/Automation/WebAutomationSessionProxy.js:

(let.AutomationSessionProxy.prototype._jsonParse): Return undefined for empty string.
(let.AutomationSessionProxy.prototype._jsonStringify): Always return a string.

11:54 AM Changeset in webkit [198905] by benjamin@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

[JSC][x86] Add the indexed forms of floating point addition and multiplication
https://bugs.webkit.org/show_bug.cgi?id=156058

Reviewed by Geoffrey Garen.

B3 supports lowering [base, index] addresses into
arbitrary instructions but we were not using that feature.

This patch adds the missing support for the lowering
of Add and Mul.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::addDouble):
(JSC::MacroAssemblerX86Common::addFloat):
(JSC::MacroAssemblerX86Common::mulDouble):
(JSC::MacroAssemblerX86Common::mulFloat):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::addsd_mr):
(JSC::X86Assembler::vaddsd_mr):
(JSC::X86Assembler::addss_mr):
(JSC::X86Assembler::vaddss_mr):
(JSC::X86Assembler::mulsd_mr):
(JSC::X86Assembler::vmulsd_mr):
(JSC::X86Assembler::mulss_mr):
(JSC::X86Assembler::vmulss_mr):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::appendBinOp):
Unlike the Addr form, we never need to transform a Tmp
into an Index for spilling.

Instead of duplicating all the code in MacroAssembler, I can
just have the lowering phase try using addresses for the first
argument when possible.

  • b3/air/AirOpcode.opcodes:
  • b3/air/testair.cpp:

(JSC::B3::Air::testX86VMULSDBaseNeedsRex):
(JSC::B3::Air::testX86VMULSDIndexNeedsRex):
(JSC::B3::Air::testX86VMULSDBaseIndexNeedRex):
(JSC::B3::Air::run):

11:50 AM Changeset in webkit [198904] by tonikitoo@webkit.org
  • 3 edits in trunk/Source/WebCore

SelectionController::positionForPlatform should ask EditingBehavior for platform specific behavior
https://bugs.webkit.org/show_bug.cgi?id=41976

Reviewed by Darin Adler.

SSIA.

No new tests needed.

  • editing/EditingBehavior.h:

(WebCore::EditingBehavior::shouldAlwaysExtendSelectionFromExtentEndpoint):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::positionForPlatform):

11:45 AM Changeset in webkit [198903] by matthew_hanson@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source/WebCore

Merge r198035. rdar://problem/25467558

11:28 AM Changeset in webkit [198902] by sbarati@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

DFG JIT bug in typeof constant folding where the input to typeof is an object or function
https://bugs.webkit.org/show_bug.cgi?id=156034
<rdar://problem/25446785>

Reviewed by Ryosuke Niwa.

AI would constant fold TypeOf to the string "object" if it saw that
its input type didn't expand past the types contained in the set
"SpecObject - SpecObjectOther". But, SpecObject contains SpecFunction.
And typeof of a function should return "function". This patch fixes
this bug by making sure we constant fold to object iff the type
doesn't expand past the set "SpecObject - SpecObjectOther - SpecFunction".

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • tests/stress/typeof-dfg-function-or-object.js: Added.

(assert):
(foo.else.o):
(foo):

11:24 AM Changeset in webkit [198901] by commit-queue@webkit.org
  • 14 edits in trunk/Source

mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
https://bugs.webkit.org/show_bug.cgi?id=155924

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-03-31
Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

Remove machinery for mediaShouldUsePersistentCache() adopt usesEphemeralSession().

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache):

  • page/ChromeClient.h: remove mediaShouldUsePersistentCache()

Source/WebKit/mac:

Remove mediaShouldUsePersistentCache machinery as it is redundant.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::mediaShouldUsePersistentCache): Deleted.

Source/WebKit2:

Remove machinery for mediaShouldUsePersistentCache as it is redundant.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode): Deleted.
(WebKit::WebPageCreationParameters::decode): Deleted.

  • Shared/WebPageCreationParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::mediaShouldUsePersistentCache): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_mediaShouldUsePersistentCache): Deleted.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::mediaShouldUsePersistentCache): Deleted.

11:23 AM Changeset in webkit [198900] by adachan@apple.com
  • 13 edits in trunk/Source

Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.
https://bugs.webkit.org/show_bug.cgi?id=156031

Reviewed by Eric Carlson.

Source/WebCore:

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):
Handle the selection of the context menu item.
(WebCore::ContextMenuController::populate):
Add this menu item on Mac.
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
Set the menu item's title depending on the current enhanced fullscreen state
and enable this menu item if supported.

  • platform/ContextMenuItem.h:

Define the new tag for this menu item.

  • platform/LocalizedStrings.cpp:

(WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen):
(WebCore::contextMenuItemTagExitVideoEnhancedFullscreen):

  • platform/LocalizedStrings.h:
  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::mediaSupportsEnhancedFullscreen):
(WebCore::HitTestResult::mediaIsInEnhancedFullscreen):
(WebCore::HitTestResult::toggleEnhancedFullscreenForVideo):

  • rendering/HitTestResult.h:

Source/WebKit/mac:

  • WebView/WebHTMLView.mm:

(toAction):
(toTag):

  • WebView/WebUIDelegatePrivate.h:

Source/WebKit2:

  • Shared/API/c/WKContextMenuItemTypes.h:
  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

11:16 AM Changeset in webkit [198899] by Yusuke Suzuki
  • 5 edits in trunk/LayoutTests

Three js/regress/string-repeat-* are flaky timeouts on Mac
https://bugs.webkit.org/show_bug.cgi?id=156062

Reviewed by Saam Barati.

Reduce the test cases to avoid timeouts.

  • js/regress/script-tests/string-repeat-resolving-no-inline.js:
  • js/regress/script-tests/string-repeat-resolving.js:
  • js/regress/script-tests/string-repeat-small-resolving.js:
  • platform/mac/TestExpectations:
9:48 AM Changeset in webkit [198898] by Alan Bujtas
  • 1 edit
    2 adds in trunk/LayoutTests

Add a -mismatch test case for r198785.
see webkit.org/b/155973

Unreviewed.

  • plugins/missing-plugin-placeholder-expected-mismatch.html: Added.
  • plugins/missing-plugin-placeholder.html: Added.
9:45 AM Changeset in webkit [198897] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Removed leftovers of ENABLE(INSPECTOR) and ENABLE(VIEWPORT).
https://bugs.webkit.org/show_bug.cgi?id=156064

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-31
Reviewed by Csaba Osztrogonác.

This ifdef guards were removed in r178820 and r147714, respectively.

  • wtf/FeatureDefines.h:
9:39 AM Changeset in webkit [198896] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix after r198893.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation): Pass
new argument to download method.

9:17 AM Changeset in webkit [198895] by n_wang@apple.com
  • 5 edits in trunk

AX: aria-hidden=false causes video fallback content to be exposed to AX API
https://bugs.webkit.org/show_bug.cgi?id=149278

Reviewed by Chris Fleizach.

Source/WebCore:

The comment says when aria-hidden="false" and object is not rendered, we should
check each parent's aria-hidden status until we encounter a rendered object. So
added a check for the rendered parent in order to break out of the loop earlier.

Test case covered in modified accessibility/aria-hidden-negates-no-visibility.html

  • accessibility/AXObjectCache.cpp:

(WebCore::isNodeAriaVisible):

LayoutTests:

  • accessibility/aria-hidden-negates-no-visibility-expected.txt:
  • accessibility/aria-hidden-negates-no-visibility.html:
9:12 AM Changeset in webkit [198894] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: Build and logic fix after r198873.
https://bugs.webkit.org/show_bug.cgi?id=156043

Not reviewed.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::addFloat):

  • 2 args were meant to be ordered differently in order to call the other addFloat. Instead, there was an infinite recursion bug. This is now fixed.
8:35 AM Changeset in webkit [198893] by Brent Fulgham
  • 37 edits in trunk

[WK2] Support download attribute feature
https://bugs.webkit.org/show_bug.cgi?id=102914
<rdar://problem/13177492>

Reviewed by Darin Adler.

Source/WebCore:

Tested by imported/w3c/web-platform-tests/html/dom/interfaces.html

imported/w3c/web-platform-tests/html/dom/reflection-text.html

A first draft implementation of this feature.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick): If the anchor has the 'download'
attribute, pass along the information to the rest of the load system.

  • loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::FrameLoadRequest): Create new overload that
accepts a download attribute flag and a suggested filename.
(WebCore::FrameLoadRequest::hasDownloadAttribute): Added.
(WebCore::FrameLoadRequest::suggestedFilename): Added.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected): Expand to accept the download attribute
flag and suggested filename.
(WebCore::FrameLoader::loadURL): Populate the NavigationAction with the new
download attribute flag and suggested filename.
(WebCore::FrameLoader::loadPostRequest): Ditto.

  • loader/FrameLoader.h:
  • loader/FrameLoaderTypes.h: Add new 'HasDownloadAttribute' enum.
  • loader/NavigationAction.cpp:

(WebCore::navigationType):
(WebCore::NavigationAction::NavigationAction): Update to accept new download
attribute flag and suggested filename.

  • loader/NavigationAction.h:

(WebCore::NavigationAction::hasDownloadAttribute): Added.
(WebCore::NavigationAction::suggestedFilename): Added.

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy): Pass more information to
'continueAfterNavigationPolicy'
(WebCore::PolicyChecker::continueAfterNavigationPolicy): Accept suggested
filename

  • loader/PolicyChecker.h:

Source/WebKit2:

A first draft implementation of this feature.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download): Update to accept default filename.
(WebKit::Download::didStart): Send default filename in message.

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload): Expect a default filename argument.

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::startDownload): Expect a default
filename argument.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in: Update messages to

expect a default filename argument.

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode): Handle the download attribute flag and
the default filename.
(WebKit::NavigationActionData::decode): Ditto.

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigationAction.h:
  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didStart): Expect a default filename argument.
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Use the suggested
filename if the client delegate does not override it.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in: Include a default filename value.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision): If the feature is enabled, and
the load was started with a download attribute, convert a "PolicyUse" decision
to "PolicyDownload".
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Remember if the load
is happening due to a 'download' attribute link.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createWindow): Populate the navigationActionData object
with any download attribute and suggested filename.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Populate the
navigationActionData object with any download attribute and suggested filename.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
(WebKit::WebFrameLoaderClient::startDownload): Expect a suggested filename argument.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::startDownload): Expect a suggested filename argument.

  • WebProcess/WebPage/WebFrame.h:

Source/WTF:

  • wtf/FeatureDefines.h: Turn the ENABLE_DOWNLOAD_ATTRIBUTE flag

on to see what happens.

LayoutTests:

  • imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Update for

<a download>.

  • imported/w3c/web-platform-tests/html/dom/reflection-text-expected.txt: Ditto.
  • js/dom/dom-static-property-for-in-iteration-expected.txt: Ditto.
  • platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Ditto.
7:57 AM Changeset in webkit [198892] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking three js/regress/string-repeat-* tests as flaky timeouts on Mac
https://bugs.webkit.org/show_bug.cgi?id=156062

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:32 AM EnvironmentVariables edited by clopez@igalia.com
(diff)
5:20 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
4:05 AM Changeset in webkit [198891] by youenn.fablet@crf.canon.fr
  • 21 edits
    1 add in trunk

[Fetch API] Add basic loading of resources for Workers
https://bugs.webkit.org/show_bug.cgi?id=155886

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Updating test expectations as new tests are passing.

  • web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/integrity-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt:

Source/WebCore:

Adding impplementation to WorkerGlobalScopeFetch::fetch similarly to DOMWindowFetch::fetch.
Refactored code in FetchResponse to share code between the two.

Updated WorkerThreadableLoader to cope with an ASSERT.
The ASSERT ensures that a DocumentThreadableLoader::create returns non null.
In our case, it might happen as all cross origin fetch requests are denied at the moment.
This leads to calling didFail in DocumentThreadableLoader::create call and DocumentThreadableLoader::create to return null.
Updated the ASSERT to ensures that either the load is finished or DocumentThreadableLoader::create does not return null.

Covered by rebased tests.

  • Modules/fetch/DOMWindowFetch.cpp:

(WebCore::DOMWindowFetch::fetch):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::startFetching):
(WebCore::FetchResponse::fetch):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/WorkerGlobalScopeFetch.cpp:

(WebCore::WorkerGlobalScopeFetch::fetch):

  • Modules/fetch/WorkerGlobalScopeFetch.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):

  • loader/WorkerThreadableLoader.h:

LayoutTests:

Soup and Mac HTTP backends differ on Content-Length header handling.

  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt: Added.
3:31 AM Changeset in webkit [198890] by youenn.fablet@crf.canon.fr
  • 7 edits in trunk/Source/WebCore

[Fetch API] Move isDisturbed handling to FetchBodyOwner
https://bugs.webkit.org/show_bug.cgi?id=155968

Reviewed by Darin Adler.

Moved isDisturbed handling in FetchBodyOwner.
This includes promise rejection in case of disturbed bodies.

No behavior change observable from user scripts.

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::arrayBuffer):
(WebCore::FetchBody::blob):
(WebCore::FetchBody::json):
(WebCore::FetchBody::text):
(WebCore::FetchBody::extractFromBody):
(WebCore::FetchBody::consume):
(WebCore::FetchBody::consumeArrayBuffer):
(WebCore::FetchBody::processIfEmptyOrDisturbed): Deleted.

  • Modules/fetch/FetchBody.h:

(WebCore::FetchBody::isEmpty): Deleted.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::arrayBuffer):
(WebCore::FetchBodyOwner::blob):
(WebCore::FetchBodyOwner::formData):
(WebCore::FetchBodyOwner::json):
(WebCore::FetchBodyOwner::text):

  • Modules/fetch/FetchBodyOwner.h:

(WebCore::FetchBodyOwner::isDisturbed):
(WebCore::FetchBodyOwner::setDisturbed):

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::create):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::clone):

1:31 AM Changeset in webkit [198889] by youenn.fablet@crf.canon.fr
  • 5 edits
    1 copy
    6 moves
    1 add in trunk

Remove forEach use from Fetch Headers builtin constructor
https://bugs.webkit.org/show_bug.cgi?id=155967

Reviewed by Joseph Pecoraro.

Source/WebCore:

Tests: fetch/shadowing-forEach.html

streams/shadowing-Promise.html
streams/shadowing-defineProperty.html

  • Modules/fetch/FetchHeaders.idl: Adding fillFromJS private method.
  • Modules/fetch/FetchHeaders.js:

(initializeFetchHeaders): Using fillFromJS private method. Using
instanceof test to check whether parameter is Headers or subclass of it.

  • bindings/js/WebCoreBuiltinNames.h: Adding fillFromJS private symbol.

LayoutTests:

Renaming tests covering user scripts breaking some WebCore JS built ins.

  • fetch/header-constructor-subclass-expected.txt: Added.
  • fetch/header-constructor-subclass.html: Added.
  • fetch/shadowing-forEach-expected.txt: Renamed from LayoutTests/streams/builtin-overrides-expected.txt.
  • fetch/shadowing-forEach.html: Renamed from LayoutTests/fetch/builtin-overrides.html.
  • streams/shadowing-Promise-expected.txt: Renamed from LayoutTests/streams/streams-promises-expected.txt.
  • streams/shadowing-Promise.html: Renamed from LayoutTests/streams/streams-promises.html.
  • streams/shadowing-defineProperty-expected.txt: Renamed from LayoutTests/fetch/builtin-overrides-expected.txt.
  • streams/shadowing-defineProperty.html: Renamed from LayoutTests/streams/builtin-overrides.html.
1:26 AM Changeset in webkit [198888] by youenn.fablet@crf.canon.fr
  • 18 edits
    4 adds in trunk/LayoutTests

[Fetch API] Update web-platform-test fetch API tests
https://bugs.webkit.org/show_bug.cgi?id=155969

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resyncing tests and updated expectations.
New test web-platform-tests/fetch/api/request/request-cache.html is timing out.

  • web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob.js:

(checkFetchResponse):

  • web-platform-tests/fetch/api/headers/headers-basic.html:
  • web-platform-tests/fetch/api/request/request-cache-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-cache.html: Added.
  • web-platform-tests/fetch/api/request/request-consume-empty.html:
  • web-platform-tests/fetch/api/request/request-consume.html:
  • web-platform-tests/fetch/api/request/request-idl-expected.txt:
  • web-platform-tests/fetch/api/request/request-idl.html:
  • web-platform-tests/fetch/api/request/request-init-002-expected.txt:
  • web-platform-tests/fetch/api/request/request-init-002.html:
  • web-platform-tests/fetch/api/request/resources/cache.py: Added.

(main):

  • web-platform-tests/fetch/api/resources/utils.js:

(stringToArray):
(validateBufferFromString):
(validateStreamFromString):

  • web-platform-tests/fetch/api/response/response-clone.html:
  • web-platform-tests/fetch/api/response/response-consume-empty.html:
  • web-platform-tests/fetch/api/response/response-consume.html:
  • web-platform-tests/fetch/api/response/response-init-002.html:

LayoutTests:

  • TestExpectations: Marking imported/w3c/web-platform-tests/fetch/api/request/request-cache.html as timing out.

Mar 30, 2016:

11:18 PM Changeset in webkit [198887] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

CMake build fix.

  • PlatformMac.cmake:
11:08 PM Changeset in webkit [198886] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build.

  • platform/text/LineEnding.cpp:

make the char's and uint8_t's compile.

11:00 PM Changeset in webkit [198885] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Speculative Yosemite fix after r198872.

  • UIProcess/Cocoa/WebAutomationSessionCocoa.mm:

(WebKit::WebAutomationSession::platformSimulateKeySequence):
Yosemite didn't like _Nullable.

10:49 PM Changeset in webkit [198884] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix.

  • platform/text/LineEnding.cpp:
10:44 PM Changeset in webkit [198883] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix GTK and Windows builds after r198869.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::blobIsOutOfDate):
(WebCore::addEncodedBlobItemToSoupMessageBody):

  • platform/text/LineEnding.cpp:
9:18 PM Changeset in webkit [198882] by rniwa@webkit.org
  • 5 edits in trunk/Websites/perf.webkit.org

BuildRequest should have associated platform and test
https://bugs.webkit.org/show_bug.cgi?id=156054

Reviewed by Joseph Pecoraro.

Added methods to retrieve the platform and the test associated with a build request with tests.

  • public/v3/models/build-request.js:

(BuildRequest):
(BuildRequest.prototype.platform): Added.
(BuildRequest.prototype.test): Added.

  • server-tests/api-build-requests-tests.js:
  • server-tests/api-manifest.js: Fixed a typo. This tests /api/manifest, not /api/build-requests.
  • unit-tests/buildbot-syncer-tests.js:

(.createSampleBuildRequest): Now takes Platform and Test objects to avoid hitting assertions in
BuildRequest's constructor.

8:56 PM Changeset in webkit [198881] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Need to expose makeAllShadowRootsOpen in WKWebProcessPlugInScriptWorld.
https://bugs.webkit.org/show_bug.cgi?id=156046

Add an SPI makeAllShadowRootsOpen method in WKWebProcessPlugInScriptWorld.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2016-03-30
Reviewed by Dan Bernstein.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:

(-[WKWebProcessPlugInScriptWorld makeAllShadowRootsOpen]):

8:43 PM Changeset in webkit [198880] by bshafiei@apple.com
  • 3 edits in tags/Safari-602.1.25.1/Source/WebCore

Merged r198875. rdar://problem/25424541

8:42 PM Changeset in webkit [198879] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.25.1/Source

Versioning.

8:39 PM Changeset in webkit [198878] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.25.1

New tag.

7:20 PM Changeset in webkit [198877] by bshafiei@apple.com
  • 3 edits in tags/Safari-602.1.26/Source/WebCore

Merged r198875. rdar://problem/25424541

7:13 PM Changeset in webkit [198876] by Dewei Zhu
  • 2 edits in trunk/Tools

Extend animometer timeout for slow CPUs.
https://bugs.webkit.org/show_bug.cgi?id=156047

Reviewed by Ryosuke Niwa.

Extend animometer timeout to 30 minutes for slow device.

  • Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan:
7:07 PM Changeset in webkit [198875] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

[iOS WK2] Avoid creating tiles that are too large for rendering
https://bugs.webkit.org/show_bug.cgi?id=156050
rdar://problem/25424541

Reviewed by Darin Adler.

In the case of a WKWebView which is sized large enough to show an entire document
(for example, when enclosed inside a UIScrollView), we would create tiles that were
larger than CoreAnimation was willing to deal with.

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::tileSize): Take the device scale, and the max IOSurface size
into account when computing the max tile size.

  • platform/graphics/cocoa/IOSurface.mm:

(IOSurface::maximumSize): CoreAnimation imposes limits in addition to the size reported
by IOSurfaceGetPropertyMaximum(), namely an 8k cap, so mimic that here.
(IOSurface::ensurePlatformContext): Typo.

7:07 PM Changeset in webkit [198874] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Fixed typo in fast/css/viewport-vmin-border test.
https://bugs.webkit.org/show_bug.cgi?id=156028

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-30
Reviewed by Darin Adler.

  • fast/css/viewport-vmin-border.html: Test should should say "vmin" instead of

"vmax".

  • fast/css/viewport-vmin-border-expected.txt: Adjust expectation.
7:05 PM Changeset in webkit [198873] by benjamin@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

[JSC][x86] Add the 3 operands forms of floating point addition and multiplication
https://bugs.webkit.org/show_bug.cgi?id=156043

Reviewed by Geoffrey Garen.

When they are available, VADD and VMUL are better options to lower
floating point addition and multiplication.

In the simple cases when one of the operands is aliased to the destination,
those forms have the same size or 1 byte shorter depending on the registers.

In the more advanced cases, we gain nice advantages with the new forms:
-We can get rid of the MoveDouble in front the instruction when we cannot

alias.

-We can disable aliasing entirely in Air. That is useful for latency

since computing coalescing is not exactly cheap.

  • assembler/MacroAssemblerX86Common.cpp:
  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::and32):
(JSC::MacroAssemblerX86Common::mul32):
(JSC::MacroAssemblerX86Common::or32):
(JSC::MacroAssemblerX86Common::xor32):
(JSC::MacroAssemblerX86Common::branchAdd32):
The change in B3LowerToAir exposed a bug in the fake 3 operands
forms of those instructions. If the address is equal to
the destination, we were nuking the address.

For example,

Add32([%r11], %eax, %r11)

would generate:

move %eax, %r11
add32 [%r11], %r11

which crashes.

I updated codegen of those cases to support that case through

load32 [%r11], %r11
add32 %eax, %r11

The weird case were all arguments have the same registers
is handled too.

(JSC::MacroAssemblerX86Common::addDouble):
(JSC::MacroAssemblerX86Common::addFloat):
(JSC::MacroAssemblerX86Common::mulDouble):
(JSC::MacroAssemblerX86Common::mulFloat):
(JSC::MacroAssemblerX86Common::supportsFloatingPointRounding):
(JSC::MacroAssemblerX86Common::supportsAVX):
(JSC::MacroAssemblerX86Common::updateEax1EcxFlags):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::branchAdd64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::vaddsd_rr):
(JSC::X86Assembler::vaddsd_mr):
(JSC::X86Assembler::vaddss_rr):
(JSC::X86Assembler::vaddss_mr):
(JSC::X86Assembler::vmulsd_rr):
(JSC::X86Assembler::vmulsd_mr):
(JSC::X86Assembler::vmulss_rr):
(JSC::X86Assembler::vmulss_mr):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::appendBinOp):
Add the 3 operand forms so that we lower Add and Mul
to the best form directly.

I will change how we lower the fake 3 operands instructions
but the codegen should end up the same in most cases.
The new codegen is the load32 + op above.

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::shouldTryAliasingDef):

  • b3/air/testair.cpp:

(JSC::B3::Air::testX86VMULSD):
(JSC::B3::Air::testX86VMULSDDestRex):
(JSC::B3::Air::testX86VMULSDOp1DestRex):
(JSC::B3::Air::testX86VMULSDOp2DestRex):
(JSC::B3::Air::testX86VMULSDOpsDestRex):
(JSC::B3::Air::testX86VMULSDAddr):
(JSC::B3::Air::testX86VMULSDAddrOpRexAddr):
(JSC::B3::Air::testX86VMULSDDestRexAddr):
(JSC::B3::Air::testX86VMULSDRegOpDestRexAddr):
(JSC::B3::Air::testX86VMULSDAddrOpDestRexAddr):
Make sure we have some coverage for AVX encoding of instructions.

7:03 PM Changeset in webkit [198872] by Joseph Pecoraro
  • 7 edits in trunk/Source

Web Automation: Add Automation.performKeyboardInteractions
https://bugs.webkit.org/show_bug.cgi?id=155990
<rdar://problem/25426408>

Patch by Brian Burg <BJ Burg> on 2016-03-30
Reviewed by Timothy Hatcher.

Source/WebKit2:

Add a command that allows automation to simulate single
key strokes or insertion of an entire string, character
by character.

  • UIProcess/Automation/Automation.json: Add new command.

Add a large enumeration of all virtual keys that exist
on a US 109-key keyboard layout. Add an interaction object.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performKeyboardInteractions):
Added. This method validates the incoming key interactions
from the protocol and makes a list of simulated interactions
to perform. If everything validates, then delegate the key
interaction simulations to platform-specific methods.

(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
Add stubs for other platforms.

  • UIProcess/Automation/WebAutomationSession.h: Add new

protocol command handler and platform simulation methods.

  • UIProcess/Cocoa/WebAutomationSessionCocoa.mm:

(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
These methods implement keyboard simulation for AppKit, used
by the Mac port. In the keystroke case, figure out the AppKit
keyCode for the key as well as any key modifiers that should
be included with the key event. Keep track of sticky modifiers
and update the session state appropriately. In the key sequence
case, split the string into combining character sequences and
send a 'key up/down'. This is a weird way to send non-ASCII
text, so a better alternative should be explored in the future.

Source/WTF:

Add a missing NSEventType declaration.

  • wtf/mac/AppKitCompatibilityDeclarations.h:
6:36 PM Changeset in webkit [198871] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebCore

[EFL][CMake] WebKit include path has been added to system include path
https://bugs.webkit.org/show_bug.cgi?id=156019

Reviewed by Darin Adler.

Fix wrong include path addition.

  • PlatformEfl.cmake:

Add ${WEBCORE_DIR}/platform/graphics/surfaces/egl to WebCore include directory path.

6:31 PM Changeset in webkit [198870] by jdiggs@igalia.com
  • 7 edits in trunk

AX: Update handling of SVG elements with presentational role
https://bugs.webkit.org/show_bug.cgi?id=156042

Reviewed by Chris Fleizach.

Source/WebCore:

Because the new expected behavior is to treat SVG elements with a
presentational role just like we treat other host language elements
with a presentational role, delete AccessibilitySVGElement's
determineAriaRoleAttribute().

No new test files. The expectations for w3c-svg-presentational-role.html
were updated because the presentational elements which have global ARIA
attributes are now being included in the accessibility tree. In addition,
several new test cases were added to this layout test so that we have
coverage for more presentational elements which lack global ARIA attributes.

  • accessibility/AccessibilitySVGElement.cpp:

(WebCore::AccessibilitySVGElement::determineAriaRoleAttribute): Deleted.

  • accessibility/AccessibilitySVGElement.h:

LayoutTests:

The expectations needed to be updated to reflect the elements which are
now being included in the accessibility tree. Also added several new test
cases with presentational elements that lack global ARIA attributes.

  • accessibility/w3c-svg-presentational-role.html: Added several new test cases.
  • platform/gtk/accessibility/w3c-svg-presentational-role-expected.txt: Updated.
  • platform/mac/accessibility/w3c-svg-presentational-role-expected.txt: Updated
6:21 PM Changeset in webkit [198869] by beidson@apple.com
  • 29 edits in trunk/Source

Make BlobData use ThreadSafeSharedBuffer instead of RawData.
https://bugs.webkit.org/show_bug.cgi?id=156041

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeText):
(WebCore::FetchBody::extractFromText):
(WebCore::blobFromArrayBuffer):

  • Modules/fetch/FetchBody.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:

(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::didReceiveBinaryData):

  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::processFrame):

  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WebSocketChannelClient.h:

(WebCore::WebSocketChannelClient::didReceiveBinaryData):

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):

  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • fileapi/Blob.cpp:

(WebCore::Blob::Blob):

  • fileapi/Blob.h:

(WebCore::Blob::create):

  • fileapi/WebKitBlobBuilder.h:
  • platform/network/BlobData.cpp:

(WebCore::BlobData::BlobData):
(WebCore::BlobDataItem::length):
(WebCore::BlobData::appendData):
(WebCore::BlobData::setContentType): Deleted.

  • platform/network/BlobData.h:

(WebCore::BlobDataItem::type):
(WebCore::BlobDataItem::data):
(WebCore::BlobDataItem::file):
(WebCore::BlobDataItem::BlobDataItem):
(WebCore::BlobData::create):
(WebCore::RawData::create): Deleted.
(WebCore::RawData::data): Deleted.
(WebCore::RawData::length): Deleted.
(WebCore::RawData::RawData): Deleted.

  • platform/network/BlobPart.h:

(WebCore::BlobPart::BlobPart):
(WebCore::BlobPart::data):
(WebCore::BlobPart::moveData):

  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::BlobRegistryImpl::registerFileBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::getSizeForNext):
(WebCore::BlobResourceHandle::readSync):
(WebCore::BlobResourceHandle::readDataSync):
(WebCore::BlobResourceHandle::readFileSync):
(WebCore::BlobResourceHandle::readAsync):
(WebCore::BlobResourceHandle::readDataAsync):
(WebCore::BlobResourceHandle::readFileAsync):

  • platform/network/BlobResourceHandle.h:
  • platform/network/FormData.cpp:

(WebCore::appendBlobResolved):

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::blobIsOutOfDate):
(WebCore::addEncodedBlobItemToSoupMessageBody):

  • platform/text/LineEnding.cpp:

(WebCore::normalizeToCROrLF):
(WebCore::normalizeLineEndingsToNative):
(WebCore::normalizeLineEndingsToCR): Deleted.
(WebCore::normalizeLineEndingsToLF): Deleted.

  • platform/text/LineEnding.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseBlob):

Source/WebKit2:

  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::filesInBlob):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<BlobPart>::decode):

5:47 PM Changeset in webkit [198868] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change some release asserts in CodeBlock linking into debug asserts
https://bugs.webkit.org/show_bug.cgi?id=155500

Reviewed by Filip Pizlo.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

5:40 PM Changeset in webkit [198867] by Joseph Pecoraro
  • 8 edits in trunk/Source

Remove unused ScriptProfiler.Samples.totalTime
https://bugs.webkit.org/show_bug.cgi?id=156002

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::buildSamples):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):

  • inspector/protocol/ScriptProfiler.json:

Remove totalTime.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::SamplingProfiler): Deleted.

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::totalTime): Deleted.
Remove now unused m_totalTime.

Source/WebInspectorUI:

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):

  • UserInterface/Models/CallingContextTree.js:

(WebInspector.CallingContextTree.prototype.get totalExecutionTime): Deleted.
(WebInspector.CallingContextTree.prototype.reset): Deleted.
(WebInspector.CallingContextTree.prototype.increaseExecutionTime): Deleted.
Remove unused totalExecutionTime.

5:38 PM Changeset in webkit [198866] by msaboff@apple.com
  • 5 edits in trunk

[ES6] Quantified unicode regular expressions do not work for counts greater than 1
https://bugs.webkit.org/show_bug.cgi?id=156044

Reviewed by Mark Lam.

Source/JavaScriptCore:

Fixed incorrect indexing of non-BMP characters in fixed patterns. The old code
was indexing by character units, a single JS character, instead of code points
which is 2 JS characters.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::matchDisjunction):

LayoutTests:

Added new test cases.

  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:
4:44 PM Changeset in webkit [198865] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

Unreviewed, rolling out r198856.

Broke the tests on the Apple El Capitan Release WK2 (Tests)
bot. Further investigation needed.

Reverted changeset:

"REGRESSION (r194660): Navigating to HTTPS sites may fail with
error"
https://bugs.webkit.org/show_bug.cgi?id=155455
http://trac.webkit.org/changeset/198856

4:09 PM Changeset in webkit [198864] by enrica@apple.com
  • 4 edits in trunk/Source/WebCore

Add a style for Data Detectors links.
https://bugs.webkit.org/show_bug.cgi?id=155996
rdar://problem/25343514

Reviewed by Sam Weinig.

Based on indication from the data detection engine,
we style some of the links differently.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

  • platform/cocoa/DataDetectorsCoreSoftLink.h:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
4:06 PM Changeset in webkit [198863] by matthew_hanson@apple.com
  • 5 edits
    1 copy in branches/safari-601.1.46-branch/Tools

Merge r194115. rdar://problem/25253479

4:06 PM Changeset in webkit [198862] by matthew_hanson@apple.com
  • 8 edits in branches/safari-601.1.46-branch/Tools

Merge r192375. rdar://problem/25253479

3:42 PM Changeset in webkit [198861] by matthew_hanson@apple.com
  • 5 edits
    1 add
    4 deletes in branches/safari-601-branch

Merge r198687. rdar://problem/25448871

3:34 PM Changeset in webkit [198860] by bshafiei@apple.com
  • 42 edits
    5 deletes in tags/Safari-602.1.26

Merged r198844. rdar://problem/25450997

3:19 PM Changeset in webkit [198859] by mmaxfield@apple.com
  • 11 edits
    2 adds in trunk

[OS X] [RTL Scrollbars] Overlay RTL scrollbars animate in from the wrong side
https://bugs.webkit.org/show_bug.cgi?id=155962

Reviewed by Darin Adler.

Source/WebCore:

We can control the animation direction with the NSScrollerImp property
userInterfaceLayoutDirection.

This patch also adds an Internals function to set whether or not we
should mock the scrollbars. Not mocking the scrollbars is required
to use NSScrollerImps.

Test: fast/scrolling/rtl-scrollbars-animation-property.html

  • platform/ScrollableArea.h: Use nullptr instead of 0.

(WebCore::ScrollableArea::horizontalScrollbar):
(WebCore::ScrollableArea::verticalScrollbar):
(WebCore::ScrollableArea::tiledBacking):
(WebCore::ScrollableArea::layerForHorizontalScrollbar):
(WebCore::ScrollableArea::layerForVerticalScrollbar):
(WebCore::ScrollableArea::layerForScrolling):
(WebCore::ScrollableArea::layerForScrollCorner):
(WebCore::ScrollableArea::layerForOverhangAreas):

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::updateScrollerStyle): Set the direction
of the new NSScrollerImps.

  • platform/mac/ScrollbarThemeMac.h:
  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::didCreateScrollerImp): Set the direction
of an NSScrollerImp.
(WebCore::ScrollbarThemeMac::registerScrollbar): Call
didCreateScrollerImp().
(WebCore::ScrollbarThemeMac::isLayoutDirectionRTL): Used for testing,
to tell if the scroller's direction is RTL.

  • platform/spi/mac/NSScrollerImpSPI.h:
  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • testing/Internals.cpp:

(WebCore::Internals::setMockScrollbarsEnabled): Used for testing.

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

This test only prints the "RTL" token when running on certain OSes.

  • fast/scrolling/rtl-scrollbars-animation-property.html: Added.
  • platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
3:06 PM Changeset in webkit [198858] by weinig@apple.com
  • 3 edits
    2 adds in trunk

-webkit-text-underline-position: under; does not work in ToT
https://bugs.webkit.org/show_bug.cgi?id=156038

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html

  • style/InlineTextBoxStyle.cpp:

(WebCore::computeUnderlineOffset):
Only resolve the underline position when based on the InlineTextBox when it is specified as auto.

LayoutTests:

  • fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html: Added.
  • fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html: Added.

Add mismatch test to show that -webkit-text-underline-position: under works.

3:05 PM Changeset in webkit [198857] by eric.carlson@apple.com
  • 2 edits in trunk/LayoutTests

Fix the media test added in r185402
https://bugs.webkit.org/show_bug.cgi?id=156040

Reviewed by Simon Fraser.

  • media/video-transformed-by-javascript.html: Load a valid media file.
2:48 PM Changeset in webkit [198856] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r194660): Navigating to HTTPS sites may fail with error
https://bugs.webkit.org/show_bug.cgi?id=155455
<rdar://problem/24308793>

Reviewed by Alexey Proskuryakov.

Fixes an issue where navigating to an HTTPS site may fail because the Security Framework uses
a cache directory that it does not have permission to use.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::codeSigningIdentifierForProcess): Queries the Security Framework for the code signed
bundle identifier/code signing identifier.
(WebKit::ChildProcess::initializeSandbox): Use the client identifier as part of the user directory
suffix. Verify that the client identifier matches the code signed bundled identifier/code
signing identifier for the code signed app/tool. Fix minor code style issue; use a C++-style cast
instead of a C-style cast when casting an OSStatus to a long.
(WebKit::findSecCodeForProcess): Deleted; incorporated logic into WebKit::codeSigningIdentifierForProcess().

1:47 PM Changeset in webkit [198855] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Make the $vm debugging tools available to builtins as @$vm.
https://bugs.webkit.org/show_bug.cgi?id=156012

Reviewed by Saam Barati.

We also need some debugging tools for builtin development. The $vm object will
be made available to builtins as @$vm, which gives us, amongst many goodies,
@$vm.print() (which prints the toString() values of its args) and
@$vm.printValue() (which dataLogs its arg as a JSValue). @$vm will only be
available if we run with JSC_useDollarVM=true.

Also changed @$vm.print() to not automatically insert a space between the
printing of each of its args. This makes it clearer as to what will be printed
i.e. it will only print what is passed to it.

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):
(JSC::BuiltinNames::dollarVMPublicName):
(JSC::BuiltinNames::dollarVMPrivateName):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • tools/JSDollarVMPrototype.cpp:

(JSC::functionPrint):

1:39 PM Changeset in webkit [198854] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix Windows EWS after r198766
https://bugs.webkit.org/show_bug.cgi?id=156029

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-30
Reviewed by Brent Fulgham.

  • CMakeLists.txt:
  • PlatformWin.cmake:

Copy headers before compiling WebCoreDerivedSources, not just before compiling WebCore.

12:46 PM Changeset in webkit [198853] by rniwa@webkit.org
  • 7 edits in trunk/Websites/perf.webkit.org

BuildRequest should have a method to fetch all in-progress and pending requests for a triggerable
https://bugs.webkit.org/show_bug.cgi?id=156008

Reviewed by Darin Adler.

Add a method to BuildRequest that fetches all pending and in-progress requests for a triggerable.

Now, new syncing scripts must be able to figure out the build slave the first build requests in
a given test group had used in order to schedule subsequent build requests in the test group.

For this purpose, /api/build-requests has been modified to return all build requests whose test
group had not finished yet. A test group is finished if all build requests in the test group had
finished (completed, failed, or canceled).

  • public/include/build-requests-fetcher.php:

(BuildRequestFetcher::fetch_incomplete_requests_for_triggerable): Return all build requests in test
groups that have not been finished.

  • public/v3/models/build-request.js:

(BuildRequest):
(BuildRequest.prototype.testGroupId): Added.
(BuildRequest.prototype.isPending): Renamed from hasPending to fix a bad grammar.
(BuildRequest.fetchForTriggerable): Added.
(BuildRequest.constructBuildRequestsFromData): Extracted from _createModelsFromFetchedTestGroups in
TestGroup.

  • public/v3/models/manifest.js:

(Manifest.fetch): Use the full path from root so that it works in server tests.

  • public/v3/models/test-group.js:

(TestGroup.hasPending):
(TestGroup._createModelsFromFetchedTestGroups):

  • server-tests/api-build-requests-tests.js: Added tests to ensure all build requests for a test group

is present in the response returned by /api/build-requests iff any build request in the group had not
finished yet.
(.addMockData):
(.addAnotherMockTestGroup): Added.

  • unit-tests/test-groups-tests.js:
12:42 PM Changeset in webkit [198852] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

Random SerializedScriptValue cleanup.
https://bugs.webkit.org/show_bug.cgi?id=156032

Rubberstamped by Tim Hatcher.

  • Remove two unused functions.
  • Make the class always be ThreadSafeRefCounted.
  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::numberValue): Deleted.
(WebCore::SerializedScriptValue::undefinedValue): Deleted.

  • bindings/js/SerializedScriptValue.h:
12:36 PM Changeset in webkit [198851] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Calculate more accurate time per-sample instead of assuming 1ms
https://bugs.webkit.org/show_bug.cgi?id=155961
<rdar://problem/25404505>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-30
Reviewed by Geoffrey Garen.

Give each sample a duration based on the best time bounds we have available.
Script Profiler Events give us time bounds for (nearly) all script evaluations.
The only evaluations that are missed are Inspector scripts.

The duration per-sample is computed per-event:

durationPerSample = (event.endTime - event.startTime) / numSamplesInTimeRange.

If a 10ms Script Event contains 5 samples, they would each get a 2ms duration.
If a 0.5ms Script Event contains 1 sample, it would get a 0.5ms duration.

We were seeing an average of 1.6-1.8ms per sample for events that had more
than 3 samples.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
Associate a time duration per sample. For each Script Event we compute
an average time for all the samples in the event and assign it to the sample.

  • UserInterface/Models/CallingContextTree.js:

(WebInspector.CallingContextTree.prototype.totalDurationInTimeRange):
(WebInspector.CallingContextTree.prototype.numberOfSamplesInTimeRange): Deleted.
Accumulate the duration by checking each sample. Number of samples
is now meaningless.

(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
Give CCTNodes a list of durations and leafDurations that parallels
the timestamps and leafTimestamps lists of individual samples.

(WebInspector.CCTNode.prototype.filteredTimestampsAndDuration):
(WebInspector.CCTNode.prototype.filteredLeafTimestampsAndDuration):
(WebInspector.CCTNode.prototype.filteredTimestamps): Deleted.
(WebInspector.CCTNode.prototype.numberOfLeafTimestamps): Deleted.
Whenever we get a list of timestamps, also compute the duration
of those timestamps at the same time.

  • UserInterface/Views/ProfileDataGridNode.js:

(WebInspector.ProfileDataGridNode):
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype._recalculateData):

  • UserInterface/Views/ProfileDataGridTree.js:

(WebInspector.ProfileDataGridTree):
(WebInspector.ProfileDataGridTree.prototype.get totalSampleTime):
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
(WebInspector.ProfileDataGridTree.prototype.get sampleInterval): Deleted.
(WebInspector.ProfileDataGridTree.prototype.get numberOfSamples): Deleted.
Instead of computing total time from (samples * sampleInterval),
accumulate it by adding up the duration of each individual sample.
Update the Profile Data Grid nodes to use the new calculations.

12:36 PM Changeset in webkit [198850] by Brent Fulgham
  • 13 edits in trunk/Source/WebCore

Avoid WebCore-prefixed paths when building WebCore
https://bugs.webkit.org/show_bug.cgi?id=156027

Reviewed by David Kilzer.

Replace instances of '#include <WebCore/XXXYYY.h>"' with the normal
'#include "XXXYYY.h"' for files inside WebCore.

  • config.h:
  • inspector/InspectorTimelineAgent.cpp:
  • page/ViewportConfiguration.cpp:
  • platform/audio/ios/AudioDestinationIOS.cpp:
  • platform/cocoa/WebVideoFullscreenModel.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:
  • platform/graphics/Font.h:
  • platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
  • platform/graphics/cg/ColorCG.cpp:
  • platform/ios/WebVideoFullscreenInterfaceAVKit.h:
  • platform/mac/WebVideoFullscreenInterfaceMac.h:
  • platform/mock/MediaPlaybackTargetPickerMock.cpp:
12:10 PM Changeset in webkit [198849] by commit-queue@webkit.org
  • 5 edits
    1 copy
    1 add in trunk/Source/WebCore

Move the CG ImageDecoder class from ImageSourceCG.cpp to ImageDecoderCG.h and .cpp
https://bugs.webkit.org/show_bug.cgi?id=155980

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-03-30
Reviewed by Simon Fraser.

After this step, ImageSource.cpp and ImageSourceCG.cpp look very similar
so they can be merged in one file. All the redundant code in these two files
can be removed.

  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cg/ImageDecoderCG.cpp: Copied from Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp.

(WebCore::createImageSourceOptions):
(WebCore::imageSourceOptions):
(WebCore::orientationFromProperties):
(WebCore::sharedBufferGetBytesAtPosition):
(WebCore::sharedBufferRelease):
(WebCore::ImageDecoder::ImageDecoder):
(WebCore::ImageDecoder::subsamplingLevelForScale):
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
(WebCore::ImageDecoder::filenameExtension):
(WebCore::ImageDecoder::isSizeAvailable):
(WebCore::ImageDecoder::size):
(WebCore::ImageDecoder::frameCount):
(WebCore::ImageDecoder::repetitionCount):
(WebCore::ImageDecoder::hotSpot):
(WebCore::ImageDecoder::frameSizeAtIndex):
(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::orientationAtIndex):
(WebCore::ImageDecoder::frameDurationAtIndex):
(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::frameBytesAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):
(WebCore::ImageDecoder::setData):

  • platform/graphics/cg/ImageDecoderCG.h: Added.

(WebCore::ImageDecoder::create):

  • platform/graphics/cg/ImageSourceCG.cpp:

(WebCore::ImageDecoder::create): Deleted.
(WebCore::createImageSourceOptions): Deleted.
(WebCore::imageSourceOptions): Deleted.
(WebCore::orientationFromProperties): Deleted.
(WebCore::sharedBufferGetBytesAtPosition): Deleted.
(WebCore::sharedBufferRelease): Deleted.
(WebCore::ImageDecoder::ImageDecoder): Deleted.
(WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties): Deleted.
(WebCore::ImageDecoder::filenameExtension): Deleted.
(WebCore::ImageDecoder::isSizeAvailable): Deleted.
(WebCore::ImageDecoder::size): Deleted.
(WebCore::ImageDecoder::frameCount): Deleted.
(WebCore::ImageDecoder::repetitionCount): Deleted.
(WebCore::ImageDecoder::hotSpot): Deleted.
(WebCore::ImageDecoder::frameSizeAtIndex): Deleted.
(WebCore::ImageDecoder::frameIsCompleteAtIndex): Deleted.
(WebCore::ImageDecoder::orientationAtIndex): Deleted.
(WebCore::ImageDecoder::frameDurationAtIndex): Deleted.
(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex): Deleted.
(WebCore::ImageDecoder::frameHasAlphaAtIndex): Deleted.
(WebCore::ImageDecoder::frameBytesAtIndex): Deleted.
(WebCore::ImageDecoder::createFrameImageAtIndex): Deleted.
(WebCore::ImageDecoder::setData): Deleted.

11:31 AM Changeset in webkit [198848] by peavo@outlook.com
  • 3 edits in trunk/Source/WebCore

[WinCairo][MediaFoundation] Video size is not always set.
https://bugs.webkit.org/show_bug.cgi?id=156020

Reviewed by Darin Adler.

Getting the video display control object from the media session might fail the first time.
In case it fails, we should try again when setting the video size.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
(WebCore::MediaPlayerPrivateMediaFoundation::getVideoDisplay):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
11:24 AM Changeset in webkit [198847] by commit-queue@webkit.org
  • 38 edits
    5 deletes in trunk

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

Confirming PLT regression (Requested by anttik on #webkit).

Reverted changeset:

"Separate render tree updating from style resolve"
https://bugs.webkit.org/show_bug.cgi?id=155298
http://trac.webkit.org/changeset/198828

11:08 AM Changeset in webkit [198846] by Jon Davis
  • 1 edit in trunk/Websites/webkit.org/wp-content/themes/webkit/style.css

Tweak styles for transparent, isolated image presentation for blog posts.

Reviewed by Timothy Hatcher.

  • wp-content/themes/webkit/style.css:

(.tile .background-image.loaded):
(.tile .featured-image):
(.tag-transparent:not(.featured-tile) .featured-image):
(.tag-transparent:not(.featured-tile) .background-image.loaded):

11:03 AM Changeset in webkit [198845] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, buildfix.

  • bytecode/BytecodeIntrinsicRegistry.h:
10:55 AM Changeset in webkit [198844] by keith_miller@apple.com
  • 42 edits
    5 deletes in trunk

Unreviewed, rollout r198808. The patch causes crashes on 32-bit and appears to be a JSBench regression.

10:34 AM Changeset in webkit [198843] by mmaxfield@apple.com
  • 6 edits
    10 adds in trunk

[OS X] [RTL Scrollbars] List boxes should obey RTL scrollbars
https://bugs.webkit.org/show_bug.cgi?id=155991

Reviewed by Darin Adler.

Source/WebCore:

List boxes were created before RenderLayers, and therefore don't share
the scollbar logic with them. Instead, they manage their own Scrollbars.
The placement logic needs to be updated to take RTL scrollbars into
account.

Tests: fast/scrolling/rtl-scrollbars-listbox-scroll.html

fast/scrolling/rtl-scrollbars-listbox-select-left.html
fast/scrolling/rtl-scrollbars-listbox-select-right.html
fast/scrolling/rtl-scrollbars-listbox-simple.html
fast/scrolling/rtl-scrollbars-listbox.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::contentBoxRect):

  • rendering/RenderBox.h:

(WebCore::RenderBox::contentBoxRect): Deleted.

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::itemBoundingBoxRect):
(WebCore::RenderListBox::paintScrollbar):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::isPointInOverflowControl):
(WebCore::RenderListBox::listIndexAtOffset):
(WebCore::RenderListBox::nodeAtPoint):
(WebCore::RenderListBox::controlClipRect):
(WebCore::RenderListBox::invalidateScrollbarRect):
(WebCore::RenderListBox::convertFromScrollbarToContainingView):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar):
(WebCore::RenderListBox::scrolledToTop):
(WebCore::RenderListBox::scrolledToBottom):

LayoutTests:

As with the previous patches, mark new tests as failing on all OSes that
don't support RTL scrollbars.

  • TestExpectations:
  • fast/scrolling/rtl-scrollbars-listbox-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-scroll.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-select-left.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-select-right.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox-simple.html: Added.
  • fast/scrolling/rtl-scrollbars-listbox.html: Added.
10:23 AM Changeset in webkit [198842] by dbates@webkit.org
  • 4 edits in trunk/Tools

run-webkit-tests must create parent directory of user's cache directory before running tests
https://bugs.webkit.org/show_bug.cgi?id=156009
<rdar://problem/25442682>

Reviewed by Alexey Proskuryakov.

The script run-webkit-tests must create the parent directory of the user's cache directory
before running tests because a WebKit2 child process expects that this directory exists
when it starts.

The script run-webkit-tests influences the path chosen by a WebKit2 child process for the
user's temporary directory and user's cache directory via the environment variable
DIRHELPER_USER_DIR_SUFFIX. For the user's temporary directory, run-webkit-tests creates it
as part of setting up the test environment. But run-webkit-tests does not create the user's
cache directory. Therefore there is race between the time AppKit creates it and when the
launched WebContent and Network processes query for the path to the user's cache directory
such that the OS may return the empty string to the WebContent and Network processes if
queried for this directory before AppKit creates it.

  • Scripts/webkitpy/port/base.py:

(Port._path_to_user_cache_directory): Added. Base class implementation that returns the
empty string. We will override this method for the OS X port to return the path to the
user's cache directory with the specified suffix.
(Port.remove_cache_directory): Deleted.

  • Scripts/webkitpy/port/driver.py:

(Driver.init): Initialize self._driver_user_directory_suffix and self._driver_user_cache_directory
to the suffix to use for the user's temporary and cache directories and the path to the
user's cache directory, respectively.
(Driver._setup_environ_for_driver): Modified to set the environment variable DIRHELPER_USER_DIR_SUFFIX
to self._driver_user_directory_suffix.
(Driver._start): Compute the user directory suffix and the path to the user's cache
directory. Create the user's cache directory (if applicable).
(Driver.stop): Modified to remove directory self._driver_user_cache_directory (if applicable).

  • Scripts/webkitpy/port/mac.py:

(MacPort.user_cache_directory): Added. Overrides Port._path_to_user_cache_directory().
(MacPort.remove_cache_directory): Deleted.

9:50 AM Changeset in webkit [198841] by mmaxfield@apple.com
  • 18 edits in trunk/Source

Use references instead of pointers in scrollbar-related code
https://bugs.webkit.org/show_bug.cgi?id=155998

Reviewed by Dean Jackson.

Source/WebCore:

Migrate pointers to references.

No new tests because there is no behavior change.

  • page/FrameView.cpp:

(WebCore::FrameView::invalidateScrollbarRect):
(WebCore::FrameView::setVisibleScrollerThumbRect):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::convertFromScrollbarToContainingView):
(WebCore::ScrollView::convertFromContainingViewToScrollbar):

  • platform/ScrollView.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::invalidateScrollbar):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::convertFromScrollbarToContainingView):
(WebCore::ScrollableArea::convertFromContainingViewToScrollbar):

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::invalidateRect):
(WebCore::Scrollbar::convertToContainingView):
(WebCore::Scrollbar::convertFromContainingView):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::convertFromScrollbarToContainingView):
(WebCore::RenderLayer::convertFromContainingViewToScrollbar):
(WebCore::RenderLayer::scrollbarOffset):
(WebCore::RenderLayer::invalidateScrollbarRect):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::destroyRootLayer):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::invalidateScrollbarRect):
(WebCore::RenderListBox::convertFromScrollbarToContainingView):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar):

  • rendering/RenderListBox.h:
  • platform/win/PopupMenuWin.cpp:

(WebCore::RenderListBox::invalidateScrollbarRect):

  • platform/win/PopupMenuWin.h:

Source/WebKit2:

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(WebKit::PDFPlugin::convertFromScrollbarToContainingView):
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
(WebKit::PDFPlugin::invalidateScrollbarRect):

9:37 AM Changeset in webkit [198840] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

9:34 AM Changeset in webkit [198839] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.26

New tag.

9:34 AM Changeset in webkit [198838] by Yusuke Suzuki
  • 11 edits
    31 adds in trunk

[JSC] Implement String.prototype.repeat in builtins JS
https://bugs.webkit.org/show_bug.cgi?id=155974

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch converts C++ String.prototype.repeat implementation into JS builtins.
|this| in strict mode is correctly inferred as String[1]. This fact encourages us
to write PrimitiveTypes.prototype.XXX methods in builtin JS.

LayoutTests/js/string-repeat.html already covers the tests for this change.

Note: String.prototype.repeat functionality is similar to Harmony's
String.prototype.{padStart, padEnd}. It's nice to port them to builtin JS in
the other patch.

The existing C++ code has the fast path for singleCharacterString repeating.
Since this use is important (e.g. generating N length spaces: ' '.repeat(N)),
we keep this fast path as @repeatCharacter().

The performance results show that, while the performance of the single character fast path
is neutral, other string repeating has significant speed up.
There are two reasons.

  1. Not resolving string rope.

We added several tests postfixed "not-resolving". In that tests, we do not touch the content
of the generated string. As a result, the generated rope is not resolved.

  1. O(log N) intermediate JSRopeStrings.

In the existing C++ implementation, we use JSString::RopeBuilder. We iterate N times and append
the given string to the builder.
In this case, the intermediate rope strings generated in JSString::RopeBuilder is O(N).
In JS builtin implementation, we only iterate log N times. As a result, the number of the
intermediate rope strings becomes O(log N).

[1]: http://trac.webkit.org/changeset/195938

  • builtins/StringPrototype.js:

(repeatSlowPath):
(repeat):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncRepeatCharacter):
(JSC::StringPrototype::finishCreation): Deleted.
(JSC::stringProtoFuncRepeat): Deleted.

  • runtime/StringPrototype.h:
  • tests/stress/string-repeat-edge-cases.js: Added.

(shouldBe):
(let.object.toString):
(valueOf):
(shouldThrow):

LayoutTests:

Update the error messages.

  • js/regress/script-tests/string-repeat-not-resolving-fixed.js: Added.

(test):

  • js/regress/script-tests/string-repeat-not-resolving-no-inline.js: Added.

(test):

  • js/regress/script-tests/string-repeat-not-resolving.js: Added.

(test):

  • js/regress/script-tests/string-repeat-resolving-fixed.js: Added.

(test):

  • js/regress/script-tests/string-repeat-resolving-no-inline.js: Added.

(test):

  • js/regress/script-tests/string-repeat-resolving.js: Added.

(test):

  • js/regress/script-tests/string-repeat-single-not-resolving.js: Added.

(test):

  • js/regress/script-tests/string-repeat-single-resolving.js: Added.

(test):

  • js/regress/script-tests/string-repeat-small-not-resolving.js: Added.

(test):

  • js/regress/script-tests/string-repeat-small-resolving.js: Added.

(test):

  • js/regress/string-repeat-not-resolving-expected.txt: Added.
  • js/regress/string-repeat-not-resolving-fixed-expected.txt: Added.
  • js/regress/string-repeat-not-resolving-fixed.html: Added.
  • js/regress/string-repeat-not-resolving-noinline-expected.txt: Added.
  • js/regress/string-repeat-not-resolving-noinline.html: Added.
  • js/regress/string-repeat-not-resolving.html: Added.
  • js/regress/string-repeat-resolving-expected.txt: Added.
  • js/regress/string-repeat-resolving-fixed-expected.txt: Added.
  • js/regress/string-repeat-resolving-fixed.html: Added.
  • js/regress/string-repeat-resolving-no-inline-expected.txt: Added.
  • js/regress/string-repeat-resolving-no-inline.html: Added.
  • js/regress/string-repeat-resolving.html: Added.
  • js/regress/string-repeat-single-not-resolving-expected.txt: Added.
  • js/regress/string-repeat-single-not-resolving.html: Added.
  • js/regress/string-repeat-single-resolving-expected.txt: Added.
  • js/regress/string-repeat-single-resolving.html: Added.
  • js/regress/string-repeat-small-not-resolving-expected.txt: Added.
  • js/regress/string-repeat-small-not-resolving.html: Added.
  • js/regress/string-repeat-small-resolving-expected.txt: Added.
  • js/regress/string-repeat-small-resolving.html: Added.
  • js/script-tests/string-repeat.js:
  • js/string-repeat-expected.txt:
9:25 AM Changeset in webkit [198837] by Simon Fraser
  • 3 edits
    2 adds in trunk

Make animation events non-cancelable
https://bugs.webkit.org/show_bug.cgi?id=78110

Reviewed by Dan Bates.

Source/WebCore:

Make the animation events non-cancelable.

Test: animations/animation-events-not-cancelable.html

  • dom/AnimationEvent.cpp:

(WebCore::AnimationEvent::AnimationEvent):

LayoutTests:

  • animations/animation-events-not-cancelable-expected.txt: Added.
  • animations/animation-events-not-cancelable.html: Added.
7:37 AM Changeset in webkit [198836] by Jon Davis
  • 1 edit in trunk/Websites/webkit.org/wp-content/themes/webkit/single.php

Update the Twitter URLs for Twitter handles in blog post bylines.

  • wp-content/themes/webkit/single.php:
6:58 AM Changeset in webkit [198835] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Mark svg zoom and pageoverlay tests to failure

Unreviewed EFL gardening.

  • platform/efl/TestExpectations: Assign new bugs to the failures.
6:32 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
4:45 AM Changeset in webkit [198834] by Manuel Rego Casasnovas
  • 17 edits in trunk

[css-grid] Refactor positioned children code
https://bugs.webkit.org/show_bug.cgi?id=155972

Reviewed by Sergio Villar Senin.

Source/WebCore:

This is a refactoring of RenderGrid::offsetAndBreadthForPositionedChild()
in order to calculate offset and breadth in a more clean way.
Hopefully making the code easier to follow.

Thanks to the refactoring, now positioned children in RTL
are working fine if they use the static inline position
(when "left" and "right" properties are both "auto").

The other case (not having a static inline position)
will be fixed in a separated patch.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):

LayoutTests:

Added RTL cases for most of the positioned tests,
which are now passing with this patch.

Pending to add RTL tests when "left" and "right" are not "auto"
(the item doesn't use the static inline position),
but that will be done in the other patch.

  • fast/css-grid-layout/absolute-positioning-grid-container-containing-block-expected.txt:
  • fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html:
  • fast/css-grid-layout/absolute-positioning-grid-container-parent-expected.txt:
  • fast/css-grid-layout/absolute-positioning-grid-container-parent.html:
  • fast/css-grid-layout/grid-positioned-items-background-expected.html:
  • fast/css-grid-layout/grid-positioned-items-background.html:

Fix test setting transparent background as it couldn't fail before.
Also using a different width, to have different values when we create the RTL version.

  • fast/css-grid-layout/grid-positioned-items-implicit-grid-expected.txt:
  • fast/css-grid-layout/grid-positioned-items-implicit-grid-line-expected.txt:
  • fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html:
  • fast/css-grid-layout/grid-positioned-items-implicit-grid.html:
  • fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line-expected.txt:
  • fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html:
  • fast/css-grid-layout/grid-sizing-positioned-items-expected.txt:
  • fast/css-grid-layout/grid-sizing-positioned-items.html:
1:18 AM Changeset in webkit [198833] by youenn.fablet@crf.canon.fr
  • 72 edits in trunk/Source/WebCore

Binding generator should allow passing DOM objects parameters as references
https://bugs.webkit.org/show_bug.cgi?id=155953

Reviewed by Alex Christensen.

Updating binding generator to pass DOM object parameters as references.
Introducing UsePointersEvenForNonNullableObjectArguments to disable that change.

Updating FetchRequest.idl and DOMWindowFetch.idl to pass parameters as references.

Updated other IDL interfaces to keep passing DOM object parameters as pointers.
This should not change the behavior for these interfaces.
UsePointersEvenForNonNullableObjectArguments should be progressively removed on those interfaces.

Binding generator tests covered by rebased binding tests.

  • Modules/encryptedmedia/MediaKeySession.idl:
  • Modules/encryptedmedia/MediaKeys.idl:
  • Modules/fetch/DOMWindowFetch.cpp:

(WebCore::DOMWindowFetch::fetch):

  • Modules/fetch/DOMWindowFetch.h:
  • Modules/fetch/DOMWindowFetch.idl:
  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::create):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/WorkerGlobalScopeFetch.cpp:

(WebCore::WorkerGlobalScopeFetch::fetch):

  • Modules/fetch/WorkerGlobalScopeFetch.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/mediasource/MediaSource.idl:
  • Modules/mediasource/SourceBuffer.idl:
  • Modules/mediastream/MediaStream.idl:
  • Modules/speech/SpeechSynthesis.idl:
  • Modules/webaudio/AudioContext.idl:
  • Modules/webaudio/OscillatorNode.idl:
  • Modules/websockets/WebSocket.idl:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheck):
(IsParameterPassedByReference):
(GenerateConstructorDefinition):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors3):

  • css/FontFaceSet.idl:
  • css/WebKitCSSMatrix.idl:
  • dom/CompositionEvent.idl:
  • dom/DataTransfer.idl:
  • dom/Document.idl:
  • dom/Element.idl:
  • dom/EventTarget.idl:
  • dom/KeyboardEvent.idl:
  • dom/MouseEvent.idl:
  • dom/MutationEvent.idl:
  • dom/MutationObserver.idl:
  • dom/NamedNodeMap.idl:
  • dom/Node.idl:
  • dom/Range.idl:
  • dom/TextEvent.idl:
  • dom/TouchEvent.idl:
  • dom/UIEvent.idl:
  • dom/WebKitNamedFlow.idl:
  • dom/WheelEvent.idl:
  • fileapi/FileReader.idl:
  • fileapi/FileReaderSync.idl:
  • html/DOMURL.idl:
  • html/HTMLElement.idl:
  • html/HTMLMediaElement.idl:
  • html/HTMLOptionsCollection.idl:
  • html/HTMLSelectElement.idl:
  • html/canvas/CanvasRenderingContext2D.idl:
  • html/canvas/DOMPath.idl:
  • html/canvas/OESVertexArrayObject.idl:
  • html/canvas/WebGLDebugShaders.idl:
  • html/canvas/WebGLRenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
  • html/track/TextTrack.idl:
  • inspector/InspectorFrontendHost.idl:
  • page/DOMSelection.idl:
  • storage/StorageEvent.idl:
  • svg/SVGGraphicsElement.idl:
  • svg/SVGLengthList.idl:
  • svg/SVGNumberList.idl:
  • svg/SVGPathSegList.idl:
  • svg/SVGPointList.idl:
  • svg/SVGSVGElement.idl:
  • svg/SVGTransformList.idl:
  • testing/Internals.idl:
  • xml/XMLSerializer.idl:
  • xml/XPathEvaluator.idl:
  • xml/XPathExpression.idl:
  • xml/XSLTProcessor.idl:
12:17 AM Changeset in webkit [198832] by benjamin@webkit.org
  • 16 edits
    1 copy
    1 add
    4 deletes in trunk/Source/JavaScriptCore

[JSC] Update udis86
https://bugs.webkit.org/show_bug.cgi?id=156005

Reviewed by Geoffrey Garen.

  • CMakeLists.txt:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • disassembler/udis86/differences.txt:
  • disassembler/udis86/itab.py: Removed.
  • disassembler/udis86/optable.xml:
  • disassembler/udis86/ud_itab.py: Added.
  • disassembler/udis86/ud_opcode.py:
  • disassembler/udis86/ud_optable.py: Removed.
  • disassembler/udis86/udis86.c:
  • disassembler/udis86/udis86_decode.c:
  • disassembler/udis86/udis86_decode.h:
  • disassembler/udis86/udis86_extern.h:
  • disassembler/udis86/udis86_input.c: Removed.
  • disassembler/udis86/udis86_input.h: Removed.
  • disassembler/udis86/udis86_syn-att.c:
  • disassembler/udis86/udis86_syn.h:
  • disassembler/udis86/udis86_types.h:
  • disassembler/udis86/udis86_udint.h:
12:14 AM Changeset in webkit [198831] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Get rid of operationInitGlobalConst(), it is useless
https://bugs.webkit.org/show_bug.cgi?id=156010

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-30
Reviewed by Geoffrey Garen.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
Note: See TracTimeline for information about the timeline view.