fb66d4ff9d5c47fd73799eb2b6939b8276560129
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-26  Roger Fong  <roger_fong@apple.com>
2
3         WebGL 2.0: Actually allow for experimental-webgl2 context creation.
4         https://bugs.webkit.org/show_bug.cgi?id=140906
5         <rdar://problem/19606875>.
6
7         Reviewed by Brent Fulgham.
8
9         * html/HTMLCanvasElement.cpp:
10         (WebCore::HTMLCanvasElement::is3dType): Include "experimental-webgl2" in the list of acceptable 3d context types.
11
12 2015-01-26  Chris Dumez  <cdumez@apple.com>
13
14         Rename Document::body() to Document::bodyOrFrameset() for clarity
15         https://bugs.webkit.org/show_bug.cgi?id=140902
16
17         Reviewed by Andreas Kling.
18
19         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
20         method does not necessarily return an HTMLBodyElement, it can also
21         return a frameset as per the specification:
22         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
23
24         This method is often misused internally (the caller is only interested
25         in the <body> element). I will fix these instances in a follow-up patch,
26         this patch is only renaming mechanically.
27
28 2015-01-26  Byungseon Shin  <sun.shin@lge.com>
29
30         Fix Border-radius clipping issue on a composited descendants
31         https://bugs.webkit.org/show_bug.cgi?id=138551 
32
33         Reviewed by Simon Fraser.
34
35         Fix assertion in RenderLayerBacking::paintIntoLayer
36         by not checking out of sync with the GraphicsLayer heirarchy
37         in GraphicsLayerPaintChildClippingMask phase.
38
39         Test: compositing/clipping/border-radius-overflow-hidden-stacking-context.html
40
41         * rendering/RenderLayerBacking.cpp:
42         (WebCore::RenderLayerBacking::paintIntoLayer):
43
44 2015-01-26  Chris Dumez  <cdumez@apple.com>
45
46         Simplify RenderElement's shouldRepaintForImageAnimation()
47         https://bugs.webkit.org/show_bug.cgi?id=140890
48
49         Reviewed by Darin Adler.
50
51         Simplify RenderElement's shouldRepaintForImageAnimation() by
52         not calling rendererForRootBackground(). The previous code was
53         doing a null-check on Document::documentElement() but failing
54         to do a null-check on the renderer just after, which lead me
55         to refactor this code.
56
57         Instead of calling document().documentElement.renderer(), we
58         now call renderer.parent(). This is equivalent because we already
59         know that renderer.isBody() returns true. The parent of the <body>
60         has to be the <html> element, which has to be the documentElement.
61         There is also no need to do a null-check on renderer.parent(). We
62         already know that the <body> has a renderer (because |renderer| is
63         its renderer), thus its parent <html> element has to have a renderer
64         as well.
65
66         Finally, simply call !rootElement.hasBackground() instead of
67         rootElement.rendererForRootBackground() == &bodyRenderer to determine
68         if the background painted by the root. This is equivalent but more
69         efficient because:
70         - We already know that the root renderer's is an <html> element. We
71           can thus avoid the check in rendererForRootBackground().
72         - We already have the <body>'s renderer so we don't need to do the
73           DOM tree traversal in rendererForRootBackground() to get it.
74
75         No new tests, already covered by:
76         fast/images/animated-gif-body-delegated-background-image.html
77         fast/images/animated-gif-html-background-image.html
78
79         * rendering/RenderElement.cpp:
80         (WebCore::shouldRepaintForImageAnimation):
81
82 2015-01-26  Chris Dumez  <cdumez@apple.com>
83
84         First argument to DOM traversal functions should be a reference
85         https://bugs.webkit.org/show_bug.cgi?id=140895
86
87         Reviewed by Antti Koivisto.
88
89         First argument to DOM traversal functions should be a reference instead
90         of a pointer as it is dereferenced without null-check.
91
92 2015-01-26  Roger Fong  <roger_fong@apple.com>
93
94         [WebGL2] Update IDL for WebGL2.
95         https://bugs.webkit.org/show_bug.cgi?id=126406
96         <rdar://problem/15002268>.
97
98         Reviewed by Brent Fulgham.
99
100         Update WebGL2RenderingContext idl to match spec. Create method stubs as necessary.
101
102         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
103         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter):
104         (WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
105         (WebCore::JSWebGL2RenderingContext::getQueryParameter):
106         (WebCore::JSWebGL2RenderingContext::getSamplerParameter):
107         (WebCore::JSWebGL2RenderingContext::getSyncParameter):
108         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
109         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
110         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
111         * html/canvas/WebGL2RenderingContext.cpp:
112         (WebCore::WebGL2RenderingContext::copyBufferSubData):
113         (WebCore::WebGL2RenderingContext::getBufferSubData):
114         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
115         (WebCore::WebGL2RenderingContext::blitFramebuffer):
116         (WebCore::WebGL2RenderingContext::framebufferTextureLayer):
117         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
118         (WebCore::WebGL2RenderingContext::invalidateFramebuffer):
119         (WebCore::WebGL2RenderingContext::invalidateSubFramebuffer):
120         (WebCore::WebGL2RenderingContext::readBuffer):
121         (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
122         (WebCore::WebGL2RenderingContext::texStorage2D):
123         (WebCore::WebGL2RenderingContext::texStorage3D):
124         (WebCore::WebGL2RenderingContext::texImage3D):
125         (WebCore::WebGL2RenderingContext::texSubImage3D):
126         (WebCore::WebGL2RenderingContext::copyTexSubImage3D):
127         (WebCore::WebGL2RenderingContext::compressedTexImage3D):
128         (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
129         (WebCore::WebGL2RenderingContext::getFragDataLocation):
130         (WebCore::WebGL2RenderingContext::uniform1ui):
131         (WebCore::WebGL2RenderingContext::uniform2ui):
132         (WebCore::WebGL2RenderingContext::uniform3ui):
133         (WebCore::WebGL2RenderingContext::uniform4ui):
134         (WebCore::WebGL2RenderingContext::uniform1uiv):
135         (WebCore::WebGL2RenderingContext::uniform2uiv):
136         (WebCore::WebGL2RenderingContext::uniform3uiv):
137         (WebCore::WebGL2RenderingContext::uniform4uiv):
138         (WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
139         (WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
140         (WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
141         (WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
142         (WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
143         (WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
144         (WebCore::WebGL2RenderingContext::vertexAttribI4i):
145         (WebCore::WebGL2RenderingContext::vertexAttribI4iv):
146         (WebCore::WebGL2RenderingContext::vertexAttribI4ui):
147         (WebCore::WebGL2RenderingContext::vertexAttribI4uiv):
148         (WebCore::WebGL2RenderingContext::vertexAttribIPointer):
149         (WebCore::WebGL2RenderingContext::vertexAttribDivisor):
150         (WebCore::WebGL2RenderingContext::drawArraysInstanced):
151         (WebCore::WebGL2RenderingContext::drawElementsInstanced):
152         (WebCore::WebGL2RenderingContext::drawRangeElements):
153         (WebCore::WebGL2RenderingContext::drawBuffers):
154         (WebCore::WebGL2RenderingContext::clearBufferiv):
155         (WebCore::WebGL2RenderingContext::clearBufferuiv):
156         (WebCore::WebGL2RenderingContext::clearBufferfv):
157         (WebCore::WebGL2RenderingContext::clearBufferfi):
158         (WebCore::WebGL2RenderingContext::createQuery):
159         (WebCore::WebGL2RenderingContext::deleteQuery):
160         (WebCore::WebGL2RenderingContext::isQuery):
161         (WebCore::WebGL2RenderingContext::beginQuery):
162         (WebCore::WebGL2RenderingContext::endQuery):
163         (WebCore::WebGL2RenderingContext::getQuery):
164         (WebCore::WebGL2RenderingContext::getQueryParameter):
165         (WebCore::WebGL2RenderingContext::createSampler):
166         (WebCore::WebGL2RenderingContext::deleteSampler):
167         (WebCore::WebGL2RenderingContext::isSampler):
168         (WebCore::WebGL2RenderingContext::bindSampler):
169         (WebCore::WebGL2RenderingContext::samplerParameteri):
170         (WebCore::WebGL2RenderingContext::samplerParameterf):
171         (WebCore::WebGL2RenderingContext::getSamplerParameter):
172         (WebCore::WebGL2RenderingContext::fenceSync):
173         (WebCore::WebGL2RenderingContext::isSync):
174         (WebCore::WebGL2RenderingContext::deleteSync):
175         (WebCore::WebGL2RenderingContext::clientWaitSync):
176         (WebCore::WebGL2RenderingContext::waitSync):
177         (WebCore::WebGL2RenderingContext::getSyncParameter):
178         (WebCore::WebGL2RenderingContext::createTransformFeedback):
179         (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
180         (WebCore::WebGL2RenderingContext::isTransformFeedback):
181         (WebCore::WebGL2RenderingContext::bindTransformFeedback):
182         (WebCore::WebGL2RenderingContext::beginTransformFeedback):
183         (WebCore::WebGL2RenderingContext::endTransformFeedback):
184         (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
185         (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
186         (WebCore::WebGL2RenderingContext::pauseTransformFeedback):
187         (WebCore::WebGL2RenderingContext::resumeTransformFeedback):
188         (WebCore::WebGL2RenderingContext::bindBufferBase):
189         (WebCore::WebGL2RenderingContext::bindBufferRange):
190         (WebCore::WebGL2RenderingContext::getIndexedParameter):
191         (WebCore::WebGL2RenderingContext::getUniformIndices):
192         (WebCore::WebGL2RenderingContext::getActiveUniforms):
193         (WebCore::WebGL2RenderingContext::getUniformBlockIndex):
194         (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter):
195         (WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
196         (WebCore::WebGL2RenderingContext::uniformBlockBinding):
197         (WebCore::WebGL2RenderingContext::createVertexArray):
198         (WebCore::WebGL2RenderingContext::deleteVertexArray):
199         (WebCore::WebGL2RenderingContext::isVertexArray):
200         (WebCore::WebGL2RenderingContext::bindVertexArray):
201         * html/canvas/WebGL2RenderingContext.h:
202         * html/canvas/WebGL2RenderingContext.idl:
203         * platform/graphics/GraphicsTypes3D.h:
204
205 2015-01-26  Andreas Kling  <akling@apple.com>
206
207         Don't let the CSSValuePool's font family cache grow unbounded.
208         <https://webkit.org/b/140894>
209
210         Reviewed by Chris Dumez.
211
212         Darin pointed out to Chris who pointed out to me that the font family cache
213         in CSSValuePool can grow unbounded until we get a system memory pressure
214         notification. Put a limit on it like we did with the font face cache.
215
216         * css/CSSValuePool.cpp:
217         (WebCore::CSSValuePool::createFontFamilyValue):
218
219 2015-01-26  Andreas Kling  <akling@apple.com>
220
221         Plug leak in jsValueWithDictionaryInContext().
222         <https://webkit.org/b/140889>
223
224         Reviewed by Alexey Proskuryakov.
225
226         Add a missing JSStringRelease to plug leak that was showing up on leaks bot.
227
228         * platform/mac/SerializedPlatformRepresentationMac.mm:
229         (WebCore::jsValueWithDictionaryInContext):
230
231 2015-01-26  Benjamin Poulain  <benjamin@webkit.org>
232
233         Fix CSS Selector's tag name matching when mixing HTML and XML
234         https://bugs.webkit.org/show_bug.cgi?id=140878
235
236         Reviewed by Darin Adler.
237
238         Previsouly, WebKit was unable to match any XML element that had
239         any uppercase character if the stylesheet was in a HTML document.
240         This problem was most often reported due to the inability to style
241         SVG-in-HTML.
242
243         The reason was that the tag local name was incorrectly transformed
244         to lowercase at parsing time. Instead, we are supposed to only
245         do case-insensitive match for HTML elements in a HTML document.
246
247         This fix is very similar with how we handle attributes:
248         -Keep both the original and the lowercase versions of the name.
249         -When matching, chose which version to use depending on the element being matched.
250
251         There is one major difference in the way the names are stored.
252         Unlike attribute selectors, tag name selectors are common, and the uppercase
253         version is not that uncommon. I wanted to preserve the dense representation
254         so I specialized CSSSelector specifically for tag names.
255
256         To store the data, if the name is already lowercase, just use the m_data pointer
257         as usual.
258         If the name is not lowercase, allocate a new small structure in the union to store
259         both names.
260
261         Tests: fast/css/tagname-and-namespace-case-sensitivity-xml-in-html.html
262                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml-expected.xhtml
263                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml.xhtml
264                fast/css/tagname-case-sensitivity-svg-in-html.html
265                fast/css/tagname-case-sensitivity-svg-in-xhtml-expected.xhtml
266                fast/css/tagname-case-sensitivity-svg-in-xhtml.xhtml
267                fast/css/tagname-case-sensitivity-xml-in-html.html
268                fast/css/tagname-case-sensitivity-xml-in-xhtml-expected.xhtml
269                fast/css/tagname-case-sensitivity-xml-in-xhtml.xhtml
270                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-html.html
271                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-xhtml.xhtml
272                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-html.html
273                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-xhtml.xhtml
274                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-html.html
275                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-xhtml.xhtml
276                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-html.html
277                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-xhtml.xhtml
278                fast/selectors/tagname-adjacent-backtracking-case-sensitivity-html.html
279                fast/selectors/tagname-descendant-backtracking-case-sensitivity-html.html
280
281         * css/CSSGrammar.y.in:
282         The parser is unaware of anything case related. CSSSelector takes care of that.
283
284         * css/CSSSelector.cpp:
285         (WebCore::CSSSelector::CSSSelector):
286         (WebCore::CSSSelector::createRareData):
287         * css/CSSSelector.h:
288         (WebCore::CSSSelector::NameWithCase::NameWithCase):
289         (WebCore::CSSSelector::CSSSelector):
290         (WebCore::CSSSelector::~CSSSelector):
291         (WebCore::CSSSelector::tagQName):
292         (WebCore::CSSSelector::tagLowercaseLocalName):
293         The new representation stores both the original form and the lower case
294         form.
295
296         * css/RuleSet.cpp:
297         (WebCore::RuleSet::addRule):
298         (WebCore::RuleSet::shrinkToFit):
299         * css/RuleSet.h:
300         (WebCore::RuleSet::tagRules):
301         * css/ElementRuleCollector.cpp:
302         (WebCore::ElementRuleCollector::collectMatchingRules):
303         The tag name partition is now split in two: lowercase and original case.
304         If the matched element is HTML, the lowercase partition is used. 
305
306         * css/SelectorFilter.cpp:
307         (WebCore::collectElementIdentifierHashes):
308         (WebCore::collectDescendantSelectorIdentifierHashes):
309         This is the most annoying part of the patch performance wise:
310         the bloom filter knows the case of the real elements but it cannot know
311         how selectors will match them.
312
313         To make it work, all names are now converted to lowercase.
314         That implies that we can filter less on XML and we may have to pay for
315         converting the tag name to lowercase.
316
317         I expect the performance hit to be small because:
318         -Having two XML elements with the same name but different case is uncommon.
319         -Most elements use lowercase names.
320
321         Still sad...that's the price to pay for correctness.
322
323         * css/SelectorChecker.cpp:
324         (WebCore::tagMatches):
325         (WebCore::SelectorChecker::checkOne):
326         * css/SelectorChecker.h:
327         (WebCore::SelectorChecker::tagMatches): Deleted.
328         Update the legacy matcher, nothing special.
329
330         * cssjit/SelectorCompiler.cpp:
331         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
332         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
333         (WebCore::SelectorCompiler::constructFragmentsInternal):
334         (WebCore::SelectorCompiler::equalTagNames):
335         (WebCore::SelectorCompiler::equalTagNamePatterns):
336         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
337         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
338         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
339         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
340         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
341         Tag names are used to optimize backtracking; this is quite common for descendant
342         (e.g. div > ul > li).
343         We have to differenciate one new case there: if two tag names are equal
344         when compared case-insensitively but strictly different, they may still
345         be equal if they don't match the same kind of elements or both matches
346         and HTML element.
347
348         * dom/SelectorQuery.cpp:
349         (WebCore::localNameMatches):
350         (WebCore::elementsForLocalName):
351         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
352         Update the inline versions of SelectorQuery.
353
354 2015-01-26  Chris Dumez  <cdumez@apple.com>
355
356         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
357         https://bugs.webkit.org/show_bug.cgi?id=140891
358
359         Reviewed by Anders Carlsson.
360
361         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
362         to make sure the argument is not unexpectedly moved when it shouldn't (like I
363         experienced yesterday in Bug 140577):
364         <http://trac.webkit.org/changeset/179105>
365
366         * css/CSSPrimitiveValue.h:
367         (WebCore::CSSPrimitiveValue::create):
368         * css/CSSValuePool.h:
369         (WebCore::CSSValuePool::createValue):
370
371 2015-01-26  Beth Dakin  <bdakin@apple.com>
372
373         Blacklist iBooks for WebKit's default immediate actions
374         https://bugs.webkit.org/show_bug.cgi?id=140854
375         -and corresponding-
376         rdar://problem/19489518
377
378         Reviewed by Tim Horton.
379
380         Add a runtime check for iBooks.
381         * WebCore.exp.in:
382         * platform/RuntimeApplicationChecks.cpp:
383         (WebCore::applicationIsIBooks):
384         * platform/RuntimeApplicationChecks.h:
385
386 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
387
388         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
389         https://bugs.webkit.org/show_bug.cgi?id=140860
390
391         Reviewed by Darin Adler.
392
393         No new tests because this simply reverts broken code.
394
395         The fonts it makes are grotesque. (See what I did there? Typographic
396         humor is the best humor.)
397
398         * Configurations/FeatureDefines.xcconfig:
399
400 2015-01-26  Chris Dumez  <cdumez@apple.com>
401
402         Demote 'line-height' to a low priority property.
403         https://bugs.webkit.org/show_bug.cgi?id=140817
404
405         Reviewed by Andreas Kling.
406
407         Our special handling of the 'line-height' property is no longer
408         required, since the 'font' shorthand is now expanded in the parser
409         in all cases (also for system fonts).
410
411         This patch is based on the following Blink revision:
412         https://src.chromium.org/viewvc/blink?revision=184629&view=revision
413
414         No new tests, already covered by:
415         fast/css/font-shorthand-line-height.html
416         fast/css/line-height-font-order.html
417
418         * css/CSSPropertyNames.in:
419         * css/StyleResolver.cpp:
420         (WebCore::StyleResolver::styleForKeyframe):
421         (WebCore::StyleResolver::styleForPage):
422         (WebCore::StyleResolver::applyMatchedProperties):
423         (WebCore::StyleResolver::initializeFontStyle):
424         (WebCore::StyleResolver::CascadedProperties::Property::apply):
425         * css/StyleResolver.h:
426         (WebCore::StyleResolver::State::State):
427         (WebCore::StyleResolver::State::setLineHeightValue): Deleted.
428         (WebCore::StyleResolver::State::lineHeightValue): Deleted.
429
430 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
431
432         [GTK] gtkdoc does not appear in DevHelp
433         https://bugs.webkit.org/show_bug.cgi?id=139369
434
435         Reviewed by Philippe Normand.
436
437         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
438
439 2015-01-25  Chris Dumez  <cdumez@apple.com>
440
441         Remove 'font' shorthand property special casing
442         https://bugs.webkit.org/show_bug.cgi?id=140577
443
444         Reviewed by Darin Adler.
445
446         Mark CSSPrimitiveValue::m_value.fontFamily as const as it is not
447         supposed to change. This also makes sure that m_value.fontFamily
448         gets copied instead of moved when constructing a clone in
449         CSSPrimitiveValue::cloneForCSSOM(). This was causing several tests
450         to fail on the bots.
451
452         * css/CSSPrimitiveValue.h:
453
454 2015-01-25  Alexey Proskuryakov  <ap@apple.com>
455
456         Setting HTMLMarqueeElement.trueSpeed doesn't work
457         https://bugs.webkit.org/show_bug.cgi?id=140863
458
459         Reviewed by Darin Adler.
460
461         Test: fast/html/marquee-set-truespeed.html
462
463         * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::minimumDelay):
464         Check the boolean attribute properly - an empty value is true.
465
466 2015-01-25  Darin Adler  <darin@apple.com>
467
468         Streamline SVGUseElement shadow tree handling and make it use SVGElementInstance less
469         https://bugs.webkit.org/show_bug.cgi?id=140875
470
471         Reviewed by Anders Carlsson.
472
473         Refactoring of code that is pretty well covered by existing tests, so
474         not adding new tests.
475
476         Inspired by work Rob Buis did in Blink:
477
478             http://src.chromium.org/viewvc/blink?view=revision&revision=173273
479
480         Althgouh that is less than half of what ended up in this patch.
481
482         * dom/ContainerNode.h: Fixed NoEventDispatchAssertion so it can be
483         copied without causing an underflow of NoEventDispatchAssertion::s_count.
484         Made the copy constructor call the default constructor. Also changed it
485         to be based on ASSERT_DISABLED rather than NDEBUG and tweaked it a bit.
486
487         * dom/ElementIteratorAssertions.h: Removed an unnecessary include and
488         an unnecessary default constructor. Changed to use WTF::Optional instead
489         of WTF::OwnPtr to handle NoEventDispatchAssertion, which makes this class
490         copyable and assignable, which in turn makes the iterators based on this
491         copyable and assignable, which is what I needed in SVGUseElement code.
492         Also simplified code in a couple places.
493
494         * dom/TypedElementDescendantIterator.h:
495         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
496         Fixed an error where the arguments to Traversal::next were passed backwards.
497         This led to incomplete iteration in SVGUseElement code, and an immediate
498         assertion failure. Probably could use some unit test coverage, too.
499         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
500         Ditto.
501
502         * svg/SVGUseElement.cpp:
503         (WebCore::SVGUseElement::animatedInstanceRoot): Deleted.
504         (WebCore::SVGUseElement::transferSizeAttributesToShadowTreeTargetClone):
505         Removed the originalElement argument, since we can use the correspondingElement
506         to get back to it. Removed the useElement argument and changed this into a
507         member function.
508         (WebCore::SVGUseElement::svgAttributeChanged): Updated for above changes.
509         (WebCore::subtreeContainsDisallowedElement): Deleted this function, because
510         it was only used to optimize by not calling removeDisallowedElementsFromSubtree,
511         but that function is already similarly efficient when called to do nothing, so
512         the preflight was not useful.
513         (WebCore::SVGUseElement::clearResourceReferences): Call userAgentShadowRoot
514         instead of shadowRoot for clarity.
515         (WebCore::SVGUseElement::buildPendingResource): Pass a reference instead of
516         a pointer to buildShadowAndInstanceTree, since it's guaranteed to not be null.
517         (WebCore::SVGUseElement::shadowTreeTargetClone): Added. Returns the SVG element
518         inside the shadow tree that corresponds to the use element's target.
519         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Changed argument type
520         to a reference instead of a pointer. Removed comments explaining why we have
521         an instance tree, since soon we will not have one. Removed many comments that
522         simply state the names of the functions they are commenting on and perhaps a tiny
523         bit more. Changed to not use m_targetElementInstance as much, dealing with the
524         shadow tree directly instead of through the instance tree.
525         (WebCore::SVGUseElement::toClipPath): Use shadowTreeTargetClone instead of
526         getting at the element through m_targetElementInstance.
527         (WebCore::SVGUseElement::rendererClipChild): Ditto.
528         (WebCore::removeDisallowedElementsFromSubtree): Removed the inline keyword,
529         since there's no good reason to inline thif function's body. Improved local
530         variable names and used a modern for loop. Also moved the comment about why
531         this function is used here inside the function instead of repeating it at
532         each call site.
533         (WebCore::SVGUseElement::buildShadowTree): Changed to take a reference
534         instead of a pointer. Moved the check to see if the target is disallowed
535         out of this function and into buildShadowAndInstanceTree, which needs to
536         handle that failure explicitly. Tightened up the code a bit, using Ref instead
537         of RefPtr, putting the comment about removeDisallowedElementsFromSubtree into
538         that function itself, and removing the unneeded subtreeContainsDisallowedElement
539         check entirely.
540         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed the argument,
541         getting the shadow tree from the shadowTree function instead. Walk the tree
542         iteratively instead of recursively, using the descendantsOfType function.
543         Rearranged and streamlined the logic.
544         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
545         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
546         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Renamed
547         this to avoid the term "replaced element", which is not a reasonable way to
548         refer to the <g> element in the shadow tree that replaces the <use> element.
549         Changed the argument type to SVGGElement to make it harder to misuse this
550         function by accident, and made the use element be "this" instead of passing
551         it as an argument.
552         (WebCore::SVGUseElement::selfHasRelativeLengths): Call hasRelativeLengths
553         on the target inside the shadow tree rather than the original target, which
554         makes more sense anyway, and is straightforward now that we have the
555         shadowTreeTargetClone function. Removes use of m_targetElementInstance here.
556
557         * svg/SVGUseElement.h: Updated for above changes.
558
559         * svg/SVGUseElement.idl: Removed animatedInstanceRoot and tweaked formatting.
560
561 2015-01-25  Chris Dumez  <cdumez@apple.com>
562
563         Remove 'font' shorthand property special casing
564         https://bugs.webkit.org/show_bug.cgi?id=140577
565
566         Reviewed by Darin Adler.
567
568         Expand system font values during 'font' property parsing. The 'font'
569         CSS property was the only shorthand that wasn't always expanded in
570         the CSS parser, so it needed a lot of special handling that we can
571         now get rid of.
572
573         This patch is inspired from the following Blink revision:
574         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
575
576         Tests:
577         - fast/css/css2-system-fonts.html (existing)
578         - fast/css/CSSPrimitiveValue-font-family-primitiveType.html (new)
579         - fast/css/font-systemFontID-parsing.html (new)
580         - fast/css/font-shorthand-line-height.html (rebased)
581
582         * WebCore.xcodeproj/project.pbxproj:
583         * css/CSSCalculationValue.cpp:
584         (WebCore::hasDoubleValue):
585         Handle CSS_FONT_FAMILY similarly to CSS_STRING in the switch.
586
587         * css/CSSFontFamily.h: Added.
588         Introduce new CSSFontFamily class to store font families inside
589         CSSPrimitive, instead of using a simple String as previously. We need
590         an additional 'fromSystemFontID' flag in addition to the font family
591         name now that system font ID are expanded during parsing. This
592         information is needed later on by the StyleBuilder (see comment below).
593
594         * css/CSSFontSelector.cpp:
595         (WebCore::CSSFontSelector::addFontFaceRule):
596         Update code dealing with font family CSSPrimitiveValues now that they
597         hold a CSSFontFamily internally instead of a String.
598
599         * css/CSSParser.cpp:
600         (WebCore::CSSParser::parseValue):
601         (WebCore::CSSParser::parseSystemFont):
602         Expand system font values for the 'font' property by asking the
603         RenderTheme for the system font and using it to set the 'font'
604         longhand properties.
605
606         * css/CSSParserValues.cpp:
607         (WebCore::CSSParserValue::createCSSValue):
608         Handle CSS_FONT_FAMILY value in the switch.
609
610         * css/CSSPrimitiveValue.cpp:
611         (WebCore::CSSPrimitiveValue::primitiveType):
612         Make sure we still expose font family CSSPrimitiveValues to the Web as
613         CSS_STRING, even though we are using a slightly different representation
614         internally. This is so that we don't change web-exposed behavior and I
615         added a new layout test to cover this.
616
617         (WebCore::isValidCSSUnitTypeForDoubleConversion):
618         (WebCore::CSSPrimitiveValue::cleanup):
619         (WebCore::CSSPrimitiveValue::getStringValue):
620         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
621         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
622         (WebCore::CSSPrimitiveValue::equals):
623         Handle CSS_FONT_FAMILY type in switches.
624
625         * css/CSSPrimitiveValue.h:
626         (WebCore::CSSPrimitiveValue::isFontFamily):
627         Add method to test if a CSSPrimitiveValue holds a CSSFontFamily
628         internally.
629
630         (WebCore::CSSPrimitiveValue::fontFamily):
631         Add a getter to retrieve the internal CSSFontFamily object if the
632         primitive type is CSS_FONT_FAMILY.
633
634         * css/CSSPropertyNames.in:
635         Treat 'font' as a regular shorthand property. Specify its longhand
636         properties so that makeprop.pl can generate the shorthand code for
637         us. Also demote 'font' to being a low-priority property as it is
638         now always expanded during parsing.
639
640         * css/CSSValuePool.cpp:
641         (WebCore::CSSValuePool::createFontFamilyValue):
642         * css/CSSValuePool.h:
643         * css/StyleBuilderCustom.h:
644         (WebCore::StyleBuilderCustom::applyValueFontFamily):
645         - Update the 'font-family' value setter in the StyleBuilder to reflect
646         the changes in the CSS parser. The CSSPrimitiveValues in the list now
647         have CSS_FONT_FAMILY type instead of CSS_STRING.
648         - We also set the 'isGenericFamily' flag if the font-family was expanded
649           from a system font ID (e.g. caption). The 'isGenericFamily' flag is
650           used later on to property set the 'isSpecifiedFont' flag on the
651           FontDescription object. If we don't do this, system font values will
652           be treated as specified fonts, which means that we will no longer use
653           the 'use backslash as Yen sign' hack for those. This is covered by the
654           following layout tests:
655           - fast/text/backslash-to-yen-sign-euc.html
656           - editing/selection/find-yensign-and-backslash.html
657
658         (WebCore::StyleBuilderCustom::applyInitialFont): Deleted.
659         (WebCore::StyleBuilderCustom::applyInheritFont): Deleted.
660         (WebCore::StyleBuilderCustom::applyValueFont): Deleted.
661         Remove StyleBuilder code dealing with the 'font' property. Now that
662         the 'font' property is always expanded during parsing, this code can
663         never be reached.
664
665         * css/StylePropertyShorthand.cpp:
666         (WebCore::isExpandedShorthand):
667         Stop returning false for 'font' as it is now expanded during parsing
668         as well. We should probably consider renaming this method to something
669         else now that all shorthands are expanded, maybe isCSSShorthand() or
670         isShorthandProperty().
671
672         (WebCore::fontShorthand): Deleted.
673         * css/StylePropertyShorthand.h:
674         (WebCore::matchingCustomShorthandsForLonghand): Deleted.
675         Remove custom shorthand code for the 'font' property as it is now
676         generated by makeprop.pl, like other shorthands.
677
678         * css/StyleResolver.cpp:
679         (WebCore::StyleResolver::applyFont): Deleted.
680         This is unused now that the StyleBuilder code for 'font' has been
681         removed.
682
683         * css/makeprop.pl:
684         Remove custom shorthand code for 'font' as it no longer requires any
685         special handling.
686
687 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
688
689         Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
690         https://bugs.webkit.org/show_bug.cgi?id=140862
691         <rdar://problem/19566089>
692
693         Reviewed by Dan Bernstein.
694
695         * page/Frame.cpp:
696         (WebCore::Frame::rangeForPoint):
697         If there isn't a selectable text node at the given point, rangeForPoint
698         will eventually return null. However, we can make it fail much faster
699         by checking the initial position's text-ness and selectability.
700
701 2015-01-24  Darin Adler  <darin@apple.com>
702
703         Move height/width implementation for use element from RenderSVGViewportContainer to SVGUseElement
704         https://bugs.webkit.org/show_bug.cgi?id=140826
705
706         Reviewed by Anders Carlsson.
707
708         Tests: svg/animations/use-animate-width-and-height.html
709                svg/custom/use-attribute-invalidations.html
710                svg/custom/use-dynamic-attribute-setting.html
711
712         This is an adaptation of work Rob Buis did in Blink:
713
714             http://src.chromium.org/viewvc/blink?view=revision&revision=173258
715
716         The goal here is to reduce use of SVGElementInstance since we are going to
717         remove it. The tests Rob added to Blink (which I believe I improved a bit here)
718         meant we had to fix quite a few bugs in the implementation of the width/height
719         logic rather than just moving it. Even so, this could use even more test coverage
720         since there is separate logic for <symbol> and <svg>, three different code paths
721         (animation/attribute setting, initial creation, and one other), and also
722         distinct issues for attributes not set at all, attributes set to values that
723         can't be parsed, and attributes set with different units.
724
725         * rendering/svg/RenderSVGViewportContainer.cpp:
726         (WebCore::RenderSVGViewportContainer::calcViewport): Removed the old logic.
727
728         * svg/SVGSVGElement.cpp:
729         (WebCore::SVGSVGElement::SVGSVGElement): Use ASCIILiteral to more efficiently
730         create strings from ASCII literals here.
731         (WebCore::SVGSVGElement::parseAttribute): Default to 100%, not 0, when the
732         width or height property are either not set or not successfully parsed. Without
733         this change, one of the SVG tests starts failing.
734
735         * svg/SVGUseElement.cpp:
736         (WebCore::updateWidthAndHeight): Added. The tricky part here is that we have
737         to copy width and height attributes only if they were successfully parsed, and
738         also we need to copy the current animating values, not the original attribute
739         strings. Kind of messy, but I wanted to adapt Rob's solution for the time being,
740         rather than inventing something new.
741         (WebCore::SVGUseElement::svgAttributeChanged): Call updateWidthAndHeight.
742         This is used both when actual attribute changes occur and also when animation
743         changes the current value.
744         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateWidthAndHeight.
745         This is used when the shadow elements are first created.
746         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Call updateWidthAndHeight.
747         This was in Rob's patch, but I am not sure we have sufficient test coverage.
748
749 2015-01-24  Chris Dumez  <cdumez@apple.com>
750
751         Provide implementation for WTF::DefaultHash<bool>
752         https://bugs.webkit.org/show_bug.cgi?id=140848
753
754         Reviewed by Anders Carlsson.
755
756         Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
757         CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
758         It builds now that WTF::DefaultHash<bool> is defined in WTF.
759
760         * platform/graphics/Font.cpp:
761         (WebCore::Font::removeFromSystemFallbackCache):
762
763 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
764
765         [Win] Cursor assignment operator is skipping scale factor
766         https://bugs.webkit.org/show_bug.cgi?id=140852
767
768         Reviewed by Chris Dumez.
769
770         Found by fast/events/mouse-cursor-image-set.html
771
772         * platform/win/CursorWin.cpp:
773         (WebCore::Cursor::operator=): Make sure to also assign the
774         scale factor.
775
776 2015-01-23  David Kilzer  <ddkilzer@apple.com>
777
778         [iOS] Attempt to fix the build after AVValueTiming.h moved
779
780         * platform/spi/ios/AVKitSPI.h: The AVValueTiming.h header moved
781         to an unexpected location, so work around it by using local SPI
782         declarations.
783
784 2015-01-23  Alexey Proskuryakov  <ap@apple.com>
785
786         Try to fix the build after r179056.
787
788         * platform/Cursor.h: (WebCore::Cursor::Cursor): Initialize dadat members in correct order.
789
790 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
791
792         [Win] Cursor copy constructor does not initialize scale factor
793         https://bugs.webkit.org/show_bug.cgi?id=140849
794
795         Reviewed by Antti Koivisto.
796
797         Found by fast/events/mouse-cursor-image-set.html
798
799         Make sure the scale factor is captured during copy construction. Also make sure
800         it is properly initialized in the default constructor, since it it used in the
801         Windows port for some default cursors.
802
803         * platform/CursorWin.h:
804         * platform/win/CursorWin.cpp:
805         (WebCore::Cursor::Cursor): Make sure copy constructor captures
806         the scale factor.
807
808 2015-01-23  Benjamin Poulain  <bpoulain@apple.com>
809
810         Add pointer/hover media queries
811         https://bugs.webkit.org/show_bug.cgi?id=134822
812
813         Reviewed by Antti Koivisto.
814
815         Media Queries Level 4 introduces two types of Interaction Media Features:
816         "pointer" and "hover". Those media features are useful for adapting the design
817         to the type of input:
818             http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction
819
820         This implementation is trivial: just #ifdef the return value depending on
821         the support for touch events.
822         In the future we should move that to a client interface but let's start easy
823         for now.
824
825         Tests: fast/media/mq-any-hover-cssom.html
826                fast/media/mq-any-hover-invalid.html
827                fast/media/mq-any-hover-matchMedia.html
828                fast/media/mq-any-hover-styling.html
829                fast/media/mq-any-pointer-cssom.html
830                fast/media/mq-any-pointer-invalid.html
831                fast/media/mq-any-pointer-matchMedia.html
832                fast/media/mq-any-pointer-styling.html
833                fast/media/mq-hover-cssom.html
834                fast/media/mq-hover-invalid.html
835                fast/media/mq-hover-matchMedia.html
836                fast/media/mq-hover-styling.html
837                fast/media/mq-pointer-cssom.html
838                fast/media/mq-pointer-invalid.html
839                fast/media/mq-pointer-matchMedia.html
840                fast/media/mq-pointer-styling.html
841
842         * css/CSSValueKeywords.in:
843         * css/MediaFeatureNames.h:
844         * css/MediaQueryEvaluator.cpp:
845         (WebCore::hoverMediaFeatureEval):
846         (WebCore::any_hoverMediaFeatureEval):
847         (WebCore::pointerMediaFeatureEval):
848         (WebCore::any_pointerMediaFeatureEval):
849         (WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
850         * css/MediaQueryExp.cpp:
851         (WebCore::featureWithCSSValueID):
852         (WebCore::featureWithZeroOrOne):
853         (WebCore::featureWithoutValue):
854         * page/EventHandler.cpp:
855         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
856         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
857         * page/Settings.in:
858
859 2015-01-23  Commit Queue  <commit-queue@webkit.org>
860
861         Unreviewed, rolling out r179051.
862         https://bugs.webkit.org/show_bug.cgi?id=140850
863
864         broke the 32-bit build (Requested by thorton on #webkit).
865
866         Reverted changeset:
867
868         "[Mac][EME] Support ClearKey encryption with AES128-encrypted
869         HLS"
870         https://bugs.webkit.org/show_bug.cgi?id=140825
871         http://trac.webkit.org/changeset/179051
872
873 2015-01-23  Joseph Pecoraro  <pecoraro@apple.com>
874
875         Web Inspector: Rename InjectedScriptHost::type to subtype
876         https://bugs.webkit.org/show_bug.cgi?id=140841
877
878         Reviewed by Timothy Hatcher.
879
880         * inspector/WebInjectedScriptHost.cpp:
881         (WebCore::WebInjectedScriptHost::subtype):
882         (WebCore::WebInjectedScriptHost::type): Deleted.
883         * inspector/WebInjectedScriptHost.h:
884
885 2015-01-23  Jer Noble  <jer.noble@apple.com>
886
887         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
888         https://bugs.webkit.org/show_bug.cgi?id=140825
889
890         Reviewed by Eric Carlson.
891
892         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
893
894         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
895
896         * Modules/encryptedmedia/CDM.cpp:
897         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
898         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
899         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
900         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
901         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
902         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
903         * Modules/encryptedmedia/CDMPrivateClearKey.h:
904         (WebCore::CDMPrivateClearKey::create): Simple factory.
905         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
906         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
907         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
908         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
909         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
910         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
911         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
912             URI, and return same.
913         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
914         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
915         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
916         * Modules/encryptedmedia/CDMSessionClearKey.h:
917
918         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
919         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
920
921         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
922         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
923         (WebCore::keySystemIsSupported):
924         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
925         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
926         (WebCore::fulfillRequestWithKeyData): Added utility method.
927         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
928         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
929
930         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
931
932         * Modules/encryptedmedia/MediaKeySession.cpp:
933         (WebCore::MediaKeySession::cachedKeyForKeyId):
934         (WebCore::MediaKeySession::addKeyTimerFired):
935         * Modules/encryptedmedia/MediaKeySession.h:
936         * Modules/encryptedmedia/MediaKeys.cpp:
937         (WebCore::MediaKeys::keyAdded):
938         (WebCore::MediaKeys::cachedKeyForKeyId):
939         * Modules/encryptedmedia/MediaKeys.h:
940         * html/HTMLMediaElement.cpp:
941         (WebCore::HTMLMediaElement::keyAdded):
942         * html/HTMLMediaElement.h:
943         * platform/graphics/CDMSession.h:
944         (WebCore::CDMSession::cachedKeyForKeyID):
945         * platform/graphics/MediaPlayer.cpp:
946         (WebCore::MediaPlayer::keyAdded):
947         (WebCore::MediaPlayer::cachedKeyForKeyId):
948         * platform/graphics/MediaPlayer.h:
949         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
950         * platform/graphics/MediaPlayerPrivate.h:
951         (WebCore::MediaPlayerPrivateInterface::keyAdded):
952
953         Add new files to project:
954
955         * WebCore.xcodeproj/project.pbxproj:
956         * CMakeLists.txt:
957         * WebCore.vcxproj/WebCore.vcxproj:
958         * WebCore.vcxproj/WebCore.vcxproj.filters:
959
960 2015-01-23  Chris Dumez  <cdumez@apple.com>
961
962         Implement system fonts FontDescription caching at RenderTheme level
963         https://bugs.webkit.org/show_bug.cgi?id=140840
964
965         Reviewed by Andreas Kling.
966
967         Implement system fonts FontDescription caching at RenderTheme level
968         instead of duplicating the logic in its subclasses for each platform.
969         This reduces code / logic duplication and reduces the amount of
970         platform-specific code. This will also make the refactoring at
971         Bug 140577 a lot easier.
972
973         The caching logic remains in RenderThemeIOS class for iOS because:
974         - It supports different system font values than all other platforms
975         - It requires cache invalidation in some cases while other platforms
976           do not.
977
978         This patch is inspired by the following Blink revision:
979         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
980
981         Test: fast/css/css2-system-fonts.html
982
983 2015-01-23  Zalan Bujtas  <zalan@apple.com>
984
985         Simple line layout: Refactor line wrapping logic.
986         https://bugs.webkit.org/show_bug.cgi?id=140834
987
988         Reviewed by Antti Koivisto.
989
990         Use a more readable structure to deal with wrapping logic. 
991
992         No change in functionality.
993
994         * rendering/SimpleLineLayout.cpp:
995         (WebCore::SimpleLineLayout::createLineRuns):
996
997 2015-01-23  Zalan Bujtas  <zalan@apple.com>
998
999         Simple line layout: Use only FlowContents::nextTextFragment() to read fragments from the text flow.
1000         https://bugs.webkit.org/show_bug.cgi?id=140842
1001
1002         Reviewed by Antti Koivisto.
1003
1004         This is in preparation to make FlowContents a content iterator class.
1005
1006         No change in functionality.
1007
1008         * rendering/SimpleLineLayout.cpp:
1009         (WebCore::SimpleLineLayout::initializeNewLine):
1010         * rendering/SimpleLineLayoutFlowContents.h:
1011
1012 2015-01-23  Bartlomiej Gajda  <b.gajda@samsung.com>
1013
1014         [MSE] Implement Range Removal algorithm.
1015         https://bugs.webkit.org/show_bug.cgi?id=140622.
1016
1017         Reviewed by Jer Noble.
1018
1019         This extract Range Removal algorithm (Editor's Draft version, bug:26316) from remove(),
1020         to separate function to deal with old FIXME since bug in spec was resolved.
1021         This should both guarantee good order of events, and prevent from switching to 'open' state
1022         during end of stream.
1023
1024         Test: media/media-source/media-source-end-of-stream-readyState.html
1025
1026         * Modules/mediasource/MediaSource.cpp:
1027         (WebCore::MediaSource::setDurationInternal): update to use rangeRemoval(), not remove()
1028         (WebCore::MediaSource::streamEndedWithError): remove FIXME, brigning back correct order of events.
1029         * Modules/mediasource/SourceBuffer.cpp:
1030         (WebCore::SourceBuffer::remove): comments up to spec, extract rangeRemoval algorithm.
1031         (WebCore::SourceBuffer::rangeRemoval):
1032         (WebCore::SourceBuffer::removeTimerFired): comments up to spec.
1033         * Modules/mediasource/SourceBuffer.h:
1034
1035 2015-01-23  Enrica Casucci  <enrica@apple.com>
1036
1037         Hit test returns incorrect results when performed in paginated content over the page gaps.
1038         https://bugs.webkit.org/show_bug.cgi?id=140837
1039         rdar://problem/17494390
1040
1041         Reviewed by Dave Hyatt.
1042
1043         Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
1044                fast/multicol/pagination/RightToLeft-rl-hittest.html
1045
1046         When hittesting reaches the RenderView we need to check if we are
1047         in paginated content and use the correct class to compute hittest results.
1048
1049         * rendering/RenderView.cpp:
1050         (WebCore::RenderView::updateHitTestResult):
1051
1052 2015-01-23  Andreas Kling  <akling@apple.com>
1053
1054         Document should be a FontSelectorClient.
1055         <https://webkit.org/b/140833>
1056
1057         Reviewed by Antti Koivisto.
1058
1059         Make Document a FontSelectorClient so it can listen to the invalidation
1060         callbacks from FontSelector instead of having code in FontSelector that
1061         calls out to Document on invalidation.
1062
1063         * css/CSSFontSelector.cpp:
1064         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
1065         * dom/Document.cpp:
1066         (WebCore::Document::fontsNeedUpdate):
1067         (WebCore::Document::fontSelector):
1068         (WebCore::Document::clearStyleResolver):
1069         * dom/Document.h:
1070
1071 2015-01-23  Chris Dumez  <cdumez@apple.com>
1072
1073         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
1074         https://bugs.webkit.org/show_bug.cgi?id=140829
1075
1076         Reviewed by Andreas Kling.
1077
1078         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
1079         by calling CSSValuePool::createFontFamilyValue() to create the font
1080         family CSSPrimitiveValue instead of cssValuePool().createValue().
1081
1082         * css/CSSComputedStyleDeclaration.cpp:
1083         (WebCore::valueForFamily):
1084
1085 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
1086
1087         QLPreviewMenuItem popovers don't close when the page scrolls
1088         https://bugs.webkit.org/show_bug.cgi?id=140806
1089         <rdar://problem/19555618>
1090
1091         Reviewed by Beth Dakin.
1092
1093         * platform/spi/mac/QuickLookMacSPI.h:
1094         Add some SPI.
1095
1096 2015-01-23  Andreas Kling  <akling@apple.com>
1097
1098         Hang CSSFontSelector off Document instead of StyleResolver.
1099         <https://webkit.org/b/140820>
1100
1101         Reviewed by Antti Koivisto.
1102
1103         Move the CSSFontSelector from StyleResolver to Document. This is the first
1104         step towards making the CSSFontSelector be able to survive full style recalc.
1105
1106         Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
1107         though that is done in Document::clearStyleResolver() now.
1108
1109         * css/CSSFontSelector.cpp:
1110         (WebCore::CSSFontSelector::CSSFontSelector):
1111         * css/CSSFontSelector.h:
1112
1113             Modernize CSSFontSelector construction a bit by having create() return
1114             a Ref and the constructor take a Document& instead of a Document*.
1115             Also made the constructor explicit.
1116
1117         (WebCore::StyleResolver::~StyleResolver):
1118         * dom/Document.cpp:
1119         (WebCore::Document::clearStyleResolver):
1120
1121             Nuke the current CSSFontSelector in clearStyleResolver() instead of
1122             in ~StyleResolver. It's a minor change, but shows the way forward.
1123             Added a FIXME about how CSSFontSelector should eventually survive
1124             this operation.
1125
1126         (WebCore::Document::fontSelector):
1127         * css/FontLoader.cpp:
1128         (WebCore::FontLoader::loadFont):
1129         (WebCore::FontLoader::checkFont):
1130         (WebCore::FontLoader::resolveFontStyle):
1131         * css/RuleSet.cpp:
1132         (WebCore::RuleSet::addChildRules):
1133         * css/StyleResolver.h:
1134         (WebCore::StyleResolver::fontSelector): Deleted.
1135         * css/StyleResolver.cpp:
1136         (WebCore::StyleResolver::StyleResolver):
1137         (WebCore::StyleResolver::appendAuthorStyleSheets):
1138         (WebCore::StyleResolver::styleForElement):
1139         (WebCore::StyleResolver::defaultStyleForElement):
1140         (WebCore::StyleResolver::updateFont):
1141         * dom/Document.h:
1142         * html/canvas/CanvasRenderingContext2D.cpp:
1143         (WebCore::CanvasRenderingContext2D::setFont):
1144         * rendering/RenderListBox.cpp:
1145         (WebCore::RenderListBox::updateFromElement):
1146         (WebCore::RenderListBox::paintItemForeground):
1147         * rendering/RenderMenuList.cpp:
1148         (RenderMenuList::fontSelector):
1149         * rendering/RenderSearchField.cpp:
1150         (WebCore::RenderSearchField::fontSelector):
1151         * rendering/TextAutoSizing.cpp:
1152         (WebCore::TextAutoSizingValue::adjustNodeSizes):
1153         (WebCore::TextAutoSizingValue::reset):
1154         * rendering/svg/RenderSVGInlineText.cpp:
1155         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1156         * style/StyleResolveForDocument.cpp:
1157         (WebCore::Style::resolveForDocument):
1158         * style/StyleResolveTree.cpp:
1159         (WebCore::Style::resolveTree):
1160
1161             Move CSSFontSelector ownership from StyleResolver to Document.
1162
1163 2015-01-23  Jer Noble  <jer.noble@apple.com>
1164
1165         Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
1166         https://bugs.webkit.org/show_bug.cgi?id=140827
1167
1168         Reviewed by Eric Carlson.
1169
1170         Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.
1171
1172         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1173         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1174
1175 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1176
1177         [GTK] Add initial database process support
1178         https://bugs.webkit.org/show_bug.cgi?id=139491
1179
1180         Reviewed by Sergio Villar Senin.
1181
1182         * platform/sql/SQLiteFileSystem.cpp:
1183         (WebCore::SQLiteFileSystem::openDatabase): Use
1184         WebCore::fileSystemRepresentation() for the database filename,
1185         otherwise sqlite3_open() fails when the filename contains "%2E".
1186
1187 2015-01-23  Byeongha Cho  <byeongha.cho@samsung.com>
1188
1189         Initialization for some member variable of FontPlatformData
1190         https://bugs.webkit.org/show_bug.cgi?id=136327
1191
1192         Reviewed by Myles C. Maxfield.
1193
1194         No new tests. There's no functional change.
1195
1196         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1197         (WebCore::FontPlatformData::FontPlatformData):
1198         (WebCore::FontPlatformData::operator=):
1199         (WebCore::FontPlatformData::~FontPlatformData):
1200
1201 2015-01-23  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1202
1203         Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
1204         https://bugs.webkit.org/show_bug.cgi?id=140766
1205
1206         Reviewed by Andreas Kling.
1207
1208         ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
1209         a node as removal point.
1210         It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.
1211
1212         No new tests. No behavior change.
1213
1214         * dom/ContainerNodeAlgorithms.h:
1215         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
1216         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
1217         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
1218
1219 2015-01-23  Hunseop Jeong  <hs85.jeong@samsung.com>
1220
1221         [GTK] Fix debug build after r178940
1222         https://bugs.webkit.org/show_bug.cgi?id=140814
1223
1224         Reviewed by Carlos Garcia Campos.
1225
1226         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1227         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
1228
1229 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1230
1231         Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
1232         https://bugs.webkit.org/show_bug.cgi?id=140757
1233
1234         Reviewed by Antti Koivisto.
1235
1236         Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
1237         Move it to initializeNewLine(). 
1238
1239         No change in functionality.
1240
1241         * rendering/SimpleLineLayout.cpp:
1242         (WebCore::SimpleLineLayout::preWrap):
1243         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1244         (WebCore::SimpleLineLayout::initializeNewLine):
1245         * rendering/SimpleLineLayoutFlowContents.h:
1246         (WebCore::SimpleLineLayout::FlowContents::isLineBreak):
1247
1248 2015-01-22  Jer Noble  <jer.noble@apple.com>
1249
1250         [iOS] Media controls disappear when loading a HLS live stream
1251         https://bugs.webkit.org/show_bug.cgi?id=140792
1252         rdar://problem/19491658
1253
1254         Reviewed by Dean Jackson.
1255
1256         Overload reconnectControls to reconnect the "start playback" button
1257         if the control type has been set to "StartPlaybackButton".
1258
1259         * Modules/mediacontrols/mediaControlsiOS.js:
1260         (ControllerIOS.prototype.reconnectControls):
1261
1262 2015-01-22  peavo@outlook.com  <peavo@outlook.com>
1263
1264         [Win] No plugin content on some sites.
1265         https://bugs.webkit.org/show_bug.cgi?id=140780
1266
1267         Reviewed by Anders Carlsson.
1268
1269         Return script instance from ScriptController::createScriptInstanceForWidget(),
1270         instead of always returning null.
1271
1272         * bindings/js/ScriptController.cpp:
1273         (WebCore::ScriptController::createScriptInstanceForWidget):
1274         * plugins/PluginViewBase.h:
1275         (WebCore::PluginViewBase::bindingInstance):
1276
1277 2015-01-22  Jer Noble  <jer.noble@apple.com>
1278
1279         [Mac][EME] Adopt changes to AVStreamSession class methods
1280         https://bugs.webkit.org/show_bug.cgi?id=140778
1281         rdar://problem/19458200
1282
1283         Reviewed by Eric Carlson.
1284
1285         AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
1286         read and modify records stored at non-default storage locations.
1287
1288         * Modules/encryptedmedia/MediaKeySession.cpp:
1289         (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
1290         * Modules/encryptedmedia/MediaKeySession.h:
1291         * platform/graphics/CDMSession.h:
1292         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1293         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1294         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
1295         (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
1296         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
1297         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
1298
1299 2015-01-22  Michael Saboff  <msaboff@apple.com>
1300
1301         REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
1302         https://bugs.webkit.org/show_bug.cgi?id=140794
1303
1304         Reviewed by Anders Carlsson.
1305
1306         If a document.open has been set, return it instead of always returning a new,
1307         non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
1308
1309         Test: js/dom/document-overwrite-open.html
1310
1311         * bindings/js/JSHTMLDocumentCustom.cpp:
1312         (WebCore::JSHTMLDocument::getOwnPropertySlot):
1313
1314 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1315
1316         Simple line layout: Reset LineState when starting a new line.
1317         https://bugs.webkit.org/show_bug.cgi?id=140789
1318
1319         Reviewed by Antti Koivisto.
1320
1321         Reset LineState when starting a new line to ensure we always
1322         start with a clean state.
1323
1324         No change in functionality.
1325
1326         * rendering/SimpleLineLayout.cpp:
1327         (WebCore::SimpleLineLayout::updateLineConstrains):
1328         (WebCore::SimpleLineLayout::initializeNewLine):
1329         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
1330         (WebCore::SimpleLineLayout::createTextRuns):
1331
1332 2015-01-22  Roger Fong  <roger_fong@apple.com>
1333
1334         [WebGL2] Create empty interface files for new WebGL2 objects.
1335         https://bugs.webkit.org/show_bug.cgi?id=140779.
1336         <rdar://problem/15002288>
1337
1338         Reviewed by Dean Jackson.
1339
1340         * CMakeLists.txt:
1341         * DerivedSources.cpp:
1342         * DerivedSources.make:
1343         * WebCore.vcxproj/WebCore.vcxproj:
1344         * WebCore.vcxproj/WebCore.vcxproj.filters:
1345         * WebCore.xcodeproj/project.pbxproj:
1346         * html/canvas/WebGLQuery.cpp: Added.
1347         (WebCore::WebGLQuery::create):
1348         (WebCore::WebGLQuery::~WebGLQuery):
1349         (WebCore::WebGLQuery::WebGLQuery):
1350         (WebCore::WebGLQuery::deleteObjectImpl):
1351         * html/canvas/WebGLQuery.h: Added.
1352         * html/canvas/WebGLQuery.idl: Added.
1353         * html/canvas/WebGLSampler.cpp: Added.
1354         (WebCore::WebGLSampler::create):
1355         (WebCore::WebGLSampler::~WebGLSampler):
1356         (WebCore::WebGLSampler::WebGLSampler):
1357         (WebCore::WebGLSampler::deleteObjectImpl):
1358         * html/canvas/WebGLSampler.h: Added.
1359         * html/canvas/WebGLSampler.idl: Added.
1360         * html/canvas/WebGLSharedObject.h:
1361         (WebCore::WebGLSharedObject::isQuery):
1362         (WebCore::WebGLSharedObject::isSampler):
1363         (WebCore::WebGLSharedObject::isSync):
1364         (WebCore::WebGLSharedObject::isTransformFeedback):
1365         (WebCore::WebGLSharedObject::isVertexArrayObject):
1366         * html/canvas/WebGLSync.cpp: Added.
1367         (WebCore::WebGLSync::create):
1368         (WebCore::WebGLSync::~WebGLSync):
1369         (WebCore::WebGLSync::WebGLSync):
1370         (WebCore::WebGLSync::deleteObjectImpl):
1371         * html/canvas/WebGLSync.h: Added.
1372         * html/canvas/WebGLSync.idl: Added.
1373         * html/canvas/WebGLTransformFeedback.cpp: Added.
1374         (WebCore::WebGLTransformFeedback::create):
1375         (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
1376         (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
1377         (WebCore::WebGLTransformFeedback::deleteObjectImpl):
1378         * html/canvas/WebGLTransformFeedback.h: Added.
1379         * html/canvas/WebGLTransformFeedback.idl: Added.
1380         * html/canvas/WebGLVertexArrayObject.cpp: Added.
1381         (WebCore::WebGLVertexArrayObject::create):
1382         (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
1383         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
1384         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
1385         * html/canvas/WebGLVertexArrayObject.h: Added.
1386         * html/canvas/WebGLVertexArrayObject.idl: Added.
1387
1388 2015-01-22  Chris Dumez  <cdumez@apple.com>
1389
1390         Fix remaining multiple targets per rule issues in DerivedSources.make
1391         https://bugs.webkit.org/show_bug.cgi?id=140790
1392
1393         Reviewed by David Kilzer.
1394
1395         Fix remaining multiple target per rule issues in DerivedSources.make,
1396         similarly to Bug 140784 and Bug 140756.
1397
1398         This was causing us to run scripts several times to generate the same
1399         files and may lead to malformed files in case of concurrency.
1400
1401         * DerivedSources.make:
1402
1403 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
1404
1405         Add a build flag for ES6 class syntax
1406         https://bugs.webkit.org/show_bug.cgi?id=140760
1407
1408         Reviewed by Michael Saboff.
1409
1410         * Configurations/FeatureDefines.xcconfig:
1411
1412 2015-01-22  Chris Dumez  <cdumez@apple.com>
1413
1414         SVGNames.cpp and HTMLNames.cpp are sometimes malformed
1415         https://bugs.webkit.org/show_bug.cgi?id=140784
1416         <rdar://problem/17701233>
1417
1418         Reviewed by David Kilzer.
1419
1420         Due to bad rules in DerivedSources.make, make_names.pl was called
1421         several times with the same arguments during build. This is because
1422         SVG/HTML/MathML each had several targets associated to the same
1423         command. This would cause the command (make_names.pl) to be called
1424         once per target. However, make_names.pl only needs to be executed
1425         once to generate all of the files currently marked as target.
1426
1427         Calling make_names.pl several times for the same files is not only
1428         wasteful, but it can also lead to malformed generated files if the
1429         scripts instances are executed in parallel as they will read / write
1430         from / to the same files.
1431
1432         This patch uses INTERMEDIATE targets instead so that we can still
1433         indicate which files are generated by make_names.pl but only run
1434         the script once.
1435
1436         This is a similar fix as for Bug 140756. There may several other
1437         similar issues in DerivedSources.make but this patch focuses on
1438         make_names.pl. I will take care of other in follow-ups if needed.
1439
1440         * DerivedSources.make:
1441
1442 2015-01-22  Chris Dumez  <cdumez@apple.com>
1443
1444         Have Counter::create() return a Ref<Counter>
1445         https://bugs.webkit.org/show_bug.cgi?id=140777
1446
1447         Reviewed by Andreas Kling.
1448
1449         Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
1450
1451         The CSSPrimitiveValue class needed some updates as well to support
1452         constructing a CSSPrimitiveValue object from a Ref<>.
1453
1454         * css/CSSPrimitiveValue.cpp:
1455         (WebCore::CSSPrimitiveValue::init):
1456         * css/CSSPrimitiveValue.h:
1457         (WebCore::CSSPrimitiveValue::create):
1458         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1459         * css/Counter.h:
1460         (WebCore::Counter::create):
1461         (WebCore::Counter::cloneForCSSOM):
1462
1463 2015-01-22  Chris Dumez  <cdumez@apple.com>
1464
1465         Drop the legacy FeatureCounter class
1466         https://bugs.webkit.org/show_bug.cgi?id=140749
1467
1468         Reviewed by Andreas Kling.
1469
1470         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
1471         instead.
1472
1473         * CMakeLists.txt:
1474         * Configurations/WebCore.xcconfig:
1475         * WebCore.exp.in:
1476         * WebCore.vcxproj/WebCore.vcxproj:
1477         * WebCore.vcxproj/WebCore.vcxproj.filters:
1478         * WebCore.xcodeproj/project.pbxproj:
1479         * html/HTMLMediaElement.cpp:
1480         (WebCore::HTMLMediaElement::parseAttribute):
1481         * loader/SubresourceLoader.cpp:
1482         (WebCore::SubresourceLoader::willSendRequest):
1483         (WebCore::SubresourceLoader::didReceiveResponse):
1484         * loader/cache/CachedResource.cpp:
1485         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1486         * loader/cache/CachedResourceLoader.cpp:
1487         (WebCore::logMemoryCacheResourceRequest):
1488         (WebCore::CachedResourceLoader::requestResource):
1489         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1490         * page/DiagnosticLoggingKeys.cpp:
1491         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
1492         (WebCore::DiagnosticLoggingKeys::playedKey):
1493         (WebCore::DiagnosticLoggingKeys::noCacheKey):
1494         (WebCore::DiagnosticLoggingKeys::noStoreKey):
1495         (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
1496         (WebCore::DiagnosticLoggingKeys::mediaKey):
1497         (WebCore::DiagnosticLoggingKeys::isExpiredKey):
1498         (WebCore::DiagnosticLoggingKeys::loadingKey):
1499         (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
1500         (WebCore::DiagnosticLoggingKeys::reasonKey):
1501         (WebCore::DiagnosticLoggingKeys::audioKey):
1502         (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
1503         (WebCore::DiagnosticLoggingKeys::resourceRequestKey):
1504         (WebCore::DiagnosticLoggingKeys::revalidatingKey):
1505         (WebCore::DiagnosticLoggingKeys::unusedKey):
1506         (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
1507         (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
1508         (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
1509         (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
1510         (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
1511         (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
1512         (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
1513         (WebCore::DiagnosticLoggingKeys::usedKey):
1514         (WebCore::DiagnosticLoggingKeys::userKey):
1515         (WebCore::DiagnosticLoggingKeys::videoKey):
1516         (WebCore::DiagnosticLoggingKeys::webViewKey):
1517         (WebCore::DiagnosticLoggingKeys::zoomedKey):
1518         * page/DiagnosticLoggingKeys.h:
1519         * page/Settings.in:
1520         * platform/FeatureCounter.cpp: Removed.
1521         * platform/FeatureCounter.h: Removed.
1522         * platform/FeatureCounterKeys.h: Removed.
1523         * platform/ios/FeatureCounter.mm: Removed.
1524
1525 2015-01-22  Benjamin Poulain  <benjamin@webkit.org>
1526
1527         When extending the fallback transitions with their closure, we are modifying the Set while iterating it
1528         https://bugs.webkit.org/show_bug.cgi?id=140785
1529
1530         Reviewed by Andreas Kling.
1531
1532         * contentextensions/NFAToDFA.cpp:
1533         (WebCore::ContentExtensions::populateTransitions):
1534         Make that in two steps: accumulate the fallback transitions then add the closure
1535         of every element.
1536
1537 2015-01-21  Antti Koivisto  <antti@apple.com>
1538
1539         Rename SimpleFontData to Font
1540         https://bugs.webkit.org/show_bug.cgi?id=140496
1541
1542         Reviewed by Zalan Bujtas.
1543
1544         The fallback supporting Font type was renamed FontCascade.
1545         We can now rename SimpleFontData to Font matching the usual definition.
1546
1547 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1548
1549         Simple line layout: Make trailing whitespace handling more explicit.
1550         https://bugs.webkit.org/show_bug.cgi?id=140776
1551
1552         Reviewed by Antti Koivisto.
1553
1554         Differentiate between committed and uncommitted trailing whitespace.
1555         This enables further cleanup in removeTrailingWhitespace().
1556
1557         No change in functionality.
1558
1559         * rendering/SimpleLineLayout.cpp:
1560         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
1561         (WebCore::SimpleLineLayout::LineState::addUncommitted):
1562         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
1563         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
1564         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1565         (WebCore::SimpleLineLayout::LineState::LineState): Deleted.
1566         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
1567         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
1568
1569 2015-01-22  Alexey Proskuryakov  <ap@apple.com>
1570
1571         Crash in URL::protocol() after appcache load fails
1572         https://bugs.webkit.org/show_bug.cgi?id=140755
1573         rdar://problem/7881290
1574
1575         Reviewed by Dan Bates.
1576
1577         Test: http/tests/appcache/404-resource-with-slow-main-resource.php
1578
1579         Not every cache that isn't being updated is complete. It could also be in a zombie
1580         state after failing to load. We get rid of the cache once the main resource finishes
1581         loading, but while it's being loaded, the zombie still looks like a regular
1582         candidate application cache.
1583
1584         * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
1585         * loader/appcache/ApplicationCache.h:
1586         Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
1587         Constness doesn't make a lot of sense for these objects anyway.
1588
1589         * loader/appcache/ApplicationCacheGroup.cpp:
1590         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
1591         We can fail a main resource load when the document has a zombie appcache, too.
1592
1593         * loader/appcache/ApplicationCacheGroup.h:
1594         (WebCore::ApplicationCacheGroup::cacheIsComplete):
1595         (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
1596         These functions are only used in ApplicationCache::isComplete().
1597
1598 2015-01-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1599
1600         Avoid defining always empty Vector<TextCheckingResult>
1601         https://bugs.webkit.org/show_bug.cgi?id=140765
1602
1603         Reviewed by Alexey Proskuryakov.
1604
1605         Pass an empty vector direclty instead.
1606
1607         No new tests. No behavior change.
1608
1609         * editing/SpellChecker.cpp:
1610         (WebCore::SpellChecker::didCheckCancel):
1611
1612 2015-01-22  Chris Dumez  <cdumez@apple.com>
1613
1614         makeprop.pl script is called too many times during build
1615         https://bugs.webkit.org/show_bug.cgi?id=140756
1616         <rdar://problem/19467942>
1617
1618         Reviewed by David Kilzer.
1619
1620         The makeprop.pl script was called 4 times (instead of once) during
1621         build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
1622         had 4 associated targets and thus was called 4 times (with the same
1623         parameter). Calling it once is sufficient to generate all 4 files
1624         that were marked as target. This patch uses an INTERMEDIATE target
1625         instead so that we can indicate that several files are generated
1626         by the same command.
1627
1628         I believe this may be the reason for the sporatic build failures
1629         that look like:
1630         """
1631         CSSPropertyNames.gperf: No keywords in input file!
1632         calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
1633         """
1634         The makeprop.pl script is generating gperf's input file and calling the
1635         gperf executable on this file. If the script is executed several times
1636         in parallel, it would explain the build failures as several instances
1637         of makeprop.pl may be writing / reading from the same
1638         CSSPropertyNames.gperf file.
1639
1640         * DerivedSources.make:
1641
1642 2015-01-22  Commit Queue  <commit-queue@webkit.org>
1643
1644         Unreviewed, rolling out r178894.
1645         https://bugs.webkit.org/show_bug.cgi?id=140775
1646
1647         Broke JSC and bindings tests (Requested by ap_ on #webkit).
1648
1649         Reverted changeset:
1650
1651         "put_by_val_direct need to check the property is index or not
1652         for using putDirect / putDirectIndex"
1653         https://bugs.webkit.org/show_bug.cgi?id=140426
1654         http://trac.webkit.org/changeset/178894
1655
1656 2015-01-22  David Kilzer  <ddkilzer@apple.com>
1657
1658         [iOS] Fix iphoneos SDK builds for ios-ews queue
1659         <http://webkit.org/b/140748>
1660
1661         Reviewed by Daniel Bates.
1662
1663         * WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
1664         * platform/graphics/cg/ImageBufferCG.cpp: Switch to using
1665         "IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
1666         * platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
1667         * platform/graphics/cocoa/IOSurface.mm: Ditto.  Move definitions
1668         in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
1669         * platform/spi/cg/CoreGraphicsSPI.h: Switch to
1670         WTF_EXTERN_C_{BEGIN,END}.  Add
1671         CGContextGetFontAntialiasingStyle() and
1672         CGContextSetFontAntialiasingStyle().
1673         * platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
1674         * platform/spi/cocoa/IOReturnSPI.h: Add.
1675         * platform/spi/cocoa/IOSurfaceSPI.h: Add.
1676         * platform/spi/cocoa/IOTypesSPI.h: Add.
1677
1678 2015-01-21  Sergio Villar Senin  <svillar@igalia.com>
1679
1680         [CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
1681         https://bugs.webkit.org/show_bug.cgi?id=140720
1682
1683         Reviewed by David Hyatt.
1684
1685         Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
1686         us to ignore items spanning tracks with flex sizing functions when
1687         resolving the content-based track sizing functions. Items with
1688         span < 2 are not affected by this rule (as they will belong to a
1689         single track). This way the algorithm ensures that min-content and
1690         max-content restrictions are fulfilled before distributing the
1691         extra space.
1692
1693         Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
1694
1695         * rendering/RenderGrid.cpp:
1696         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
1697         (WebCore::integerSpanForDirection):
1698         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1699         * rendering/RenderGrid.h:
1700
1701 2015-01-22  Yusuke Suzuki  <utatane.tea@gmail.com>
1702
1703         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
1704         https://bugs.webkit.org/show_bug.cgi?id=140426
1705
1706         Reviewed by Geoffrey Garen.
1707
1708         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
1709
1710         * bindings/js/JSDOMWindowCustom.cpp:
1711         (WebCore::JSDOMWindow::getOwnPropertySlot):
1712         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1713         (WebCore::callHTMLAllCollection):
1714         (WebCore::JSHTMLAllCollection::item):
1715         * bindings/scripts/CodeGeneratorJS.pm:
1716         (GenerateGetOwnPropertySlotBody):
1717         (GenerateImplementation):
1718         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1719         (WebCore::JSFloat64Array::getOwnPropertySlot):
1720         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
1721         (WebCore::JSFloat64Array::put):
1722         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1723         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1724         * bridge/runtime_array.cpp:
1725         (JSC::RuntimeArray::getOwnPropertySlot):
1726         (JSC::RuntimeArray::put):
1727
1728 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1729
1730         [CSS Grid Layout] Size tracks using a list of all items sorted by span
1731         https://bugs.webkit.org/show_bug.cgi?id=140615
1732
1733         Reviewed by Andreas Kling.
1734
1735         In r173620 we fixed
1736         RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
1737         now collects all items spanning content-sized tracks and process
1738         them one by one after sorting them by ascending span.
1739
1740         The problem is that it was incorrectly implemented, it has two
1741         important bugs. First one is that the hash table that collects
1742         items is regenerated after processing each track, so it's actually
1743         doing nothing. Secondly we're only sorting the items on each
1744         track, instead of all the items in the grid.
1745
1746         * rendering/RenderGrid.cpp:
1747         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1748
1749 2015-01-21  Daniel Bates  <dabates@apple.com>
1750
1751         Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
1752         (https://bugs.webkit.org/show_bug.cgi?id=140742)
1753
1754         Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
1755
1756         * rendering/RenderLayerBacking.cpp:
1757         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
1758
1759 2015-01-21  Daniel Bates  <dabates@apple.com>
1760
1761         [iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
1762         https://bugs.webkit.org/show_bug.cgi?id=140742
1763
1764         Reviewed by Simon Fraser.
1765
1766         Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
1767         report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
1768         avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
1769         platform-independent compositing test results.
1770
1771         The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
1772         not make use of a tiled cache layer and defers to UIKit to handle the final compositing
1773         of the web view, including applying the page scale factor.
1774
1775         * platform/RuntimeApplicationChecksIOS.mm:
1776         (WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
1777         the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
1778         * platform/graphics/GraphicsLayer.cpp:
1779         (WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
1780         GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
1781         * platform/graphics/GraphicsLayerClient.h:
1782         (WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
1783         default implementation (returns false).
1784         * rendering/RenderLayerBacking.cpp:
1785         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
1786         returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
1787         RenderView layer.
1788         * rendering/RenderLayerBacking.h:
1789
1790 2015-01-21  Roger Fong  <roger_fong@apple.com>
1791
1792         WebGL2 (spec section 3.1): Add new types to WebGL2 API.
1793         https://bugs.webkit.org/show_bug.cgi?id=140741.
1794         <rdar://problem/19552962>
1795
1796         Reviewed by Dean Jackson.
1797
1798         * html/canvas/WebGL2RenderingContext.idl:
1799
1800 2015-01-21  Zalan Bujtas  <zalan@apple.com>
1801
1802         Simple line layout: Move nextTextFragment() to FlowContents class.
1803         https://bugs.webkit.org/show_bug.cgi?id=140738
1804
1805         Reviewed by Antti Koivisto.
1806
1807         This is in preparation to make FlowContents an iterator class.
1808         
1809         No change in functionality.
1810
1811         * rendering/SimpleLineLayout.cpp:
1812         (WebCore::SimpleLineLayout::LineState::addUncommitted):
1813         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
1814         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1815         (WebCore::SimpleLineLayout::initializeNewLine):
1816         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
1817         (WebCore::SimpleLineLayout::createLineRuns):
1818         (WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
1819         (WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
1820         (WebCore::SimpleLineLayout::nextFragment): Deleted.
1821         * rendering/SimpleLineLayoutFlowContents.cpp:
1822         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
1823         * rendering/SimpleLineLayoutFlowContents.h:
1824         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
1825         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
1826
1827 2015-01-21  Andreas Kling  <akling@apple.com>
1828
1829         DocumentLoader::timing() should return a reference.
1830         <https://webkit.org/b/128272>
1831
1832         Reviewed by Antti Koivisto.
1833
1834         There is always a DocumentLoadTiming object, so return it by
1835         reference since it can never be null.
1836
1837         * Modules/gamepad/NavigatorGamepad.cpp:
1838         (WebCore::NavigatorGamepad::from):
1839         * dom/ScriptedAnimationController.cpp:
1840         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
1841         * html/HTMLMediaElement.cpp:
1842         (WebCore::HTMLMediaElement::parseAttribute):
1843         * inspector/InspectorResourceAgent.cpp:
1844         (WebCore::buildObjectForTiming):
1845         * loader/DocumentLoader.cpp:
1846         (WebCore::DocumentLoader::finishedLoading):
1847         (WebCore::DocumentLoader::willSendRequest):
1848         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
1849         (WebCore::DocumentLoader::startLoadingMainResource):
1850         * loader/DocumentLoader.h:
1851         (WebCore::DocumentLoader::timing):
1852         * loader/FrameLoader.cpp:
1853         (WebCore::FrameLoader::stopLoading):
1854         (WebCore::FrameLoader::commitProvisionalLoad):
1855         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1856         * page/DOMWindow.cpp:
1857         (WebCore::DOMWindow::dispatchLoadEvent):
1858         * page/Performance.cpp:
1859         (WebCore::Performance::now):
1860         * page/PerformanceNavigation.cpp:
1861         (WebCore::PerformanceNavigation::redirectCount):
1862         * page/PerformanceResourceTiming.cpp:
1863         (WebCore::monotonicTimeToDocumentMilliseconds):
1864         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
1865         * page/PerformanceTiming.cpp:
1866         (WebCore::PerformanceTiming::documentLoadTiming):
1867
1868 2015-01-21  Benjamin Poulain  <benjamin@webkit.org>
1869
1870         Handle the transition on any character as a separate type of transition
1871         https://bugs.webkit.org/show_bug.cgi?id=140711
1872
1873         Reviewed by Andreas Kling.
1874
1875         Instead of considering the universal transition as 127 transitions, it is now
1876         handled as a separate type of transition.
1877
1878         The goal is to reduce the number of exit edge to consider for each node. Instead
1879         of having 127 for any partition containing one universal transition, we have
1880         as few exit edges as necessary + one universal transition.
1881
1882         In the NFA, the universal transition is stored directly on NFANode in a new
1883         HashSet (transitionsOnAnyCharacter).
1884         The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
1885         by construction. That is not strictly needed but it simplify debugging at the moment.
1886
1887         When converting a NFA to a DFA, we first find all the node that transition on any character.
1888         Then, when we iterate over "real" transition, we also augment that set with the set on
1889         any character.
1890
1891         When creating the DFA node, we first consider each "real" transition, then we have a single
1892         "fallback" transition for any character that has not been handled yet.
1893
1894         When matching, we first search for any real transition. If there is none but a fallback exists,
1895         we take the fallback.
1896
1897         * contentextensions/DFA.cpp:
1898         (WebCore::ContentExtensions::DFA::nextState):
1899         (WebCore::ContentExtensions::printTransitions):
1900         (WebCore::ContentExtensions::DFA::debugPrintDot):
1901         (WebCore::ContentExtensions::printTransition): Deleted.
1902         * contentextensions/DFANode.h:
1903         * contentextensions/NFA.cpp:
1904         (WebCore::ContentExtensions::NFA::addTransition):
1905         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
1906         (WebCore::ContentExtensions::printTransitions):
1907         (WebCore::ContentExtensions::NFA::debugPrintDot):
1908         (WebCore::ContentExtensions::printTransition): Deleted.
1909         * contentextensions/NFA.h:
1910         * contentextensions/NFANode.h:
1911         * contentextensions/NFAToDFA.cpp:
1912         (WebCore::ContentExtensions::populateTransitions):
1913         (WebCore::ContentExtensions::getOrCreateDFANode):
1914         (WebCore::ContentExtensions::NFAToDFA::convert):
1915         * contentextensions/URLFilterParser.cpp:
1916         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
1917
1918 2015-01-20  Antti Koivisto  <antti@apple.com>
1919
1920         REGRESSION(r178180): Membuster regressed ~4%
1921         https://bugs.webkit.org/show_bug.cgi?id=140495
1922
1923         Reviewed by Andreas Kling.
1924
1925         After r178180 we keep system fallback fonts that are used on glyph pages alive.
1926         Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
1927
1928         * platform/graphics/FontCache.cpp:
1929         (WebCore::FontCache::purgeInactiveFontData):
1930         * platform/graphics/FontCascade.cpp:
1931         (WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
1932         (WebCore::pruneSystemFallbackFonts):
1933         * platform/graphics/FontCascade.h:
1934         * platform/graphics/FontGlyphs.cpp:
1935         (WebCore::FontGlyphs::pruneSystemFallbacks):
1936
1937             When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
1938             and release the fallbacks.
1939
1940         * platform/graphics/FontGlyphs.h:
1941
1942 2015-01-21  Manuel Rego Casasnovas  <rego@igalia.com>
1943
1944         first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
1945         https://bugs.webkit.org/show_bug.cgi?id=138424
1946
1947         Reviewed by Benjamin Poulain.
1948
1949         Source/WebCore:
1950
1951         According to the grid and flexbox specs:
1952         "::first-letter pseudo-element do not apply to grid/flex containers".
1953         http://dev.w3.org/csswg/css-grid/#grid-containers
1954         http://dev.w3.org/csswg/css-flexbox/#flex-containers
1955
1956         Check also the CSS WG mailing list discussion:
1957         http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
1958
1959         This was almost working right, except in the case that an ancestor was
1960         setting the ::first-letter pseudo-element.
1961
1962         Added a few more cases to the current tests in order to check this
1963         behavior.
1964         Also created some new tests to increase coverage
1965
1966         Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
1967                fast/css/first-letter-ignores-display-property.html
1968
1969         * rendering/RenderBlock.cpp:
1970         (WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
1971         looking for the first text child if you reach a grid or flexbox.
1972
1973 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
1974
1975         Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
1976         https://bugs.webkit.org/show_bug.cgi?id=140670
1977
1978         Reviewed by Darin Adler.
1979
1980         * platform/efl/EflScreenUtilities.cpp:
1981         (WebCore::createCustomCursor):
1982
1983 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
1984
1985         Remove ENABLE(INSPECTOR) ifdef guards
1986         https://bugs.webkit.org/show_bug.cgi?id=140668
1987
1988         Reviewed by Darin Adler.
1989
1990         * Configurations/FeatureDefines.xcconfig:
1991         * WebCore.exp.in:
1992         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1993         * bindings/js/JSDOMWindowBase.cpp:
1994         (WebCore::JSDOMWindowBase::supportsProfiling):
1995         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
1996         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1997         * bindings/js/ScriptController.cpp:
1998         (WebCore::ScriptController::collectIsolatedContexts):
1999         * bindings/js/ScriptController.h:
2000         * bindings/js/ScriptGlobalObject.cpp:
2001         (WebCore::ScriptGlobalObject::set):
2002         * bindings/js/ScriptGlobalObject.h:
2003         * bindings/js/WorkerScriptDebugServer.cpp:
2004         * bindings/js/WorkerScriptDebugServer.h:
2005         * dom/Node.cpp:
2006         (WebCore::Node::inspect):
2007         * inspector/CommandLineAPIHost.cpp:
2008         * inspector/CommandLineAPIHost.idl:
2009         * inspector/CommandLineAPIModule.cpp:
2010         * inspector/CommandLineAPIModule.h:
2011         * inspector/DOMEditor.cpp:
2012         * inspector/DOMEditor.h:
2013         * inspector/DOMPatchSupport.cpp:
2014         * inspector/DOMPatchSupport.h:
2015         * inspector/InspectorApplicationCacheAgent.cpp:
2016         * inspector/InspectorApplicationCacheAgent.h:
2017         * inspector/InspectorCSSAgent.cpp:
2018         * inspector/InspectorCSSAgent.h:
2019         * inspector/InspectorClient.cpp:
2020         * inspector/InspectorConsoleInstrumentation.h:
2021         (WebCore::InspectorInstrumentation::addMessageToConsole):
2022         (WebCore::InspectorInstrumentation::consoleCount):
2023         (WebCore::InspectorInstrumentation::startConsoleTiming):
2024         (WebCore::InspectorInstrumentation::stopConsoleTiming):
2025         (WebCore::InspectorInstrumentation::consoleTimeStamp):
2026         (WebCore::InspectorInstrumentation::startProfiling):
2027         (WebCore::InspectorInstrumentation::stopProfiling):
2028         * inspector/InspectorController.cpp:
2029         * inspector/InspectorController.h:
2030         * inspector/InspectorDOMAgent.cpp:
2031         * inspector/InspectorDOMAgent.h:
2032         * inspector/InspectorDOMDebuggerAgent.cpp:
2033         * inspector/InspectorDOMDebuggerAgent.h:
2034         * inspector/InspectorDOMStorageAgent.cpp:
2035         * inspector/InspectorDatabaseAgent.cpp:
2036         * inspector/InspectorDatabaseAgent.h:
2037         * inspector/InspectorDatabaseInstrumentation.h:
2038         (WebCore::InspectorInstrumentation::didOpenDatabase):
2039         * inspector/InspectorDatabaseResource.cpp:
2040         * inspector/InspectorDatabaseResource.h:
2041         * inspector/InspectorFrontendClientLocal.cpp:
2042         * inspector/InspectorFrontendHost.cpp:
2043         * inspector/InspectorFrontendHost.idl:
2044         * inspector/InspectorHistory.cpp:
2045         * inspector/InspectorHistory.h:
2046         * inspector/InspectorIndexedDBAgent.cpp:
2047         * inspector/InspectorIndexedDBAgent.h:
2048         * inspector/InspectorInstrumentation.cpp:
2049         * inspector/InspectorInstrumentation.h:
2050         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
2051         (WebCore::InspectorInstrumentation::isDebuggerPaused):
2052         (WebCore::InspectorInstrumentation::willInsertDOMNode):
2053         (WebCore::InspectorInstrumentation::didInsertDOMNode):
2054         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
2055         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
2056         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
2057         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
2058         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
2059         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
2060         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
2061         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
2062         (WebCore::InspectorInstrumentation::didPushShadowRoot):
2063         (WebCore::InspectorInstrumentation::willPopShadowRoot):
2064         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
2065         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
2066         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
2067         (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
2068         (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
2069         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
2070         (WebCore::InspectorInstrumentation::handleTouchEvent):
2071         (WebCore::InspectorInstrumentation::handleMousePress):
2072         (WebCore::InspectorInstrumentation::forcePseudoState):
2073         (WebCore::InspectorInstrumentation::characterDataModified):
2074         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
2075         (WebCore::InspectorInstrumentation::didInstallTimer):
2076         (WebCore::InspectorInstrumentation::didRemoveTimer):
2077         (WebCore::InspectorInstrumentation::willCallFunction):
2078         (WebCore::InspectorInstrumentation::didCallFunction):
2079         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
2080         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
2081         (WebCore::InspectorInstrumentation::willDispatchEvent):
2082         (WebCore::InspectorInstrumentation::didDispatchEvent):
2083         (WebCore::InspectorInstrumentation::willHandleEvent):
2084         (WebCore::InspectorInstrumentation::didHandleEvent):
2085         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
2086         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
2087         (WebCore::InspectorInstrumentation::willEvaluateScript):
2088         (WebCore::InspectorInstrumentation::didEvaluateScript):
2089         (WebCore::InspectorInstrumentation::scriptsEnabled):
2090         (WebCore::InspectorInstrumentation::willFireTimer):
2091         (WebCore::InspectorInstrumentation::didFireTimer):
2092         (WebCore::InspectorInstrumentation::didInvalidateLayout):
2093         (WebCore::InspectorInstrumentation::willLayout):
2094         (WebCore::InspectorInstrumentation::didLayout):
2095         (WebCore::InspectorInstrumentation::didScroll):
2096         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
2097         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
2098         (WebCore::InspectorInstrumentation::willPaint):
2099         (WebCore::InspectorInstrumentation::didPaint):
2100         (WebCore::InspectorInstrumentation::willScrollLayer):
2101         (WebCore::InspectorInstrumentation::didScrollLayer):
2102         (WebCore::InspectorInstrumentation::willRecalculateStyle):
2103         (WebCore::InspectorInstrumentation::didRecalculateStyle):
2104         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
2105         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
2106         (WebCore::InspectorInstrumentation::willSendRequest):
2107         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
2108         (WebCore::InspectorInstrumentation::markResourceAsCached):
2109         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
2110         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
2111         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
2112         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
2113         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
2114         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
2115         (WebCore::InspectorInstrumentation::didReceiveData):
2116         (WebCore::InspectorInstrumentation::didFinishLoading):
2117         (WebCore::InspectorInstrumentation::didFailLoading):
2118         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
2119         (WebCore::InspectorInstrumentation::willLoadXHR):
2120         (WebCore::InspectorInstrumentation::didFailXHRLoading):
2121         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2122         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
2123         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
2124         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
2125         (WebCore::InspectorInstrumentation::scriptImported):
2126         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
2127         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
2128         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
2129         (WebCore::InspectorInstrumentation::loadEventFired):
2130         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
2131         (WebCore::InspectorInstrumentation::didCommitLoad):
2132         (WebCore::InspectorInstrumentation::frameDocumentUpdated):
2133         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
2134         (WebCore::InspectorInstrumentation::frameStartedLoading):
2135         (WebCore::InspectorInstrumentation::frameStoppedLoading):
2136         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
2137         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
2138         (WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
2139         (WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
2140         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
2141         (WebCore::InspectorInstrumentation::willWriteHTML):
2142         (WebCore::InspectorInstrumentation::didWriteHTML):
2143         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
2144         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
2145         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
2146         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
2147         (WebCore::InspectorInstrumentation::didCreateWebSocket):
2148         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
2149         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
2150         (WebCore::InspectorInstrumentation::didCloseWebSocket):
2151         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
2152         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
2153         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
2154         (WebCore::InspectorInstrumentation::sessionCreated):
2155         (WebCore::InspectorInstrumentation::sessionLoaded):
2156         (WebCore::InspectorInstrumentation::sessionModified):
2157         (WebCore::InspectorInstrumentation::segmentCreated):
2158         (WebCore::InspectorInstrumentation::segmentCompleted):
2159         (WebCore::InspectorInstrumentation::segmentLoaded):
2160         (WebCore::InspectorInstrumentation::segmentUnloaded):
2161         (WebCore::InspectorInstrumentation::captureStarted):
2162         (WebCore::InspectorInstrumentation::captureStopped):
2163         (WebCore::InspectorInstrumentation::playbackStarted):
2164         (WebCore::InspectorInstrumentation::playbackPaused):
2165         (WebCore::InspectorInstrumentation::playbackFinished):
2166         (WebCore::InspectorInstrumentation::playbackHitPosition):
2167         (WebCore::InspectorInstrumentation::networkStateChanged):
2168         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
2169         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
2170         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
2171         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
2172         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
2173         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2174         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2175         (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
2176         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
2177         (WebCore::InspectorInstrumentation::hasFrontends): Deleted.
2178         (WebCore::InspectorInstrumentation::consoleAgentEnabled): Deleted.
2179         (WebCore::InspectorInstrumentation::runtimeAgentEnabled): Deleted.
2180         (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
2181         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
2182         * inspector/InspectorLayerTreeAgent.cpp:
2183         * inspector/InspectorLayerTreeAgent.h:
2184         * inspector/InspectorOverlay.cpp:
2185         * inspector/InspectorPageAgent.cpp:
2186         * inspector/InspectorPageAgent.h:
2187         * inspector/InspectorReplayAgent.cpp:
2188         * inspector/InspectorReplayAgent.h:
2189         * inspector/InspectorResourceAgent.cpp:
2190         * inspector/InspectorResourceAgent.h:
2191         * inspector/InspectorStyleSheet.cpp:
2192         * inspector/InspectorStyleSheet.h:
2193         * inspector/InspectorStyleTextEditor.cpp:
2194         * inspector/InspectorStyleTextEditor.h:
2195         * inspector/InspectorTimelineAgent.cpp:
2196         * inspector/InspectorTimelineAgent.h:
2197         * inspector/InspectorWorkerAgent.cpp:
2198         * inspector/InspectorWorkerResource.h:
2199         * inspector/InstrumentingAgents.cpp:
2200         * inspector/NetworkResourcesData.cpp:
2201         * inspector/NetworkResourcesData.h:
2202         * inspector/PageConsoleAgent.cpp:
2203         * inspector/PageConsoleAgent.h:
2204         * inspector/PageDebuggerAgent.cpp:
2205         * inspector/PageDebuggerAgent.h:
2206         * inspector/PageRuntimeAgent.cpp:
2207         * inspector/PageRuntimeAgent.h:
2208         * inspector/PageScriptDebugServer.cpp:
2209         * inspector/PageScriptDebugServer.h:
2210         * inspector/TimelineRecordFactory.cpp:
2211         * inspector/WebConsoleAgent.cpp:
2212         * inspector/WebConsoleAgent.h:
2213         * inspector/WebDebuggerAgent.cpp:
2214         * inspector/WebDebuggerAgent.h:
2215         * inspector/WebInjectedScriptHost.cpp:
2216         * inspector/WebInjectedScriptHost.h:
2217         * inspector/WebInjectedScriptManager.cpp:
2218         * inspector/WebInjectedScriptManager.h:
2219         * inspector/WorkerConsoleAgent.cpp:
2220         * inspector/WorkerConsoleAgent.h:
2221         * inspector/WorkerDebuggerAgent.cpp:
2222         * inspector/WorkerDebuggerAgent.h:
2223         * inspector/WorkerInspectorController.cpp:
2224         * inspector/WorkerInspectorController.h:
2225         * inspector/WorkerRuntimeAgent.cpp:
2226         * inspector/WorkerRuntimeAgent.h:
2227         * loader/DocumentThreadableLoader.cpp:
2228         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2229         (WebCore::DocumentThreadableLoader::loadRequest):
2230         * loader/FrameLoader.cpp:
2231         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2232         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
2233         * loader/appcache/ApplicationCacheGroup.cpp:
2234         (WebCore::ApplicationCacheGroup::createResourceHandle):
2235         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2236         * loader/appcache/ApplicationCacheHost.cpp:
2237         (WebCore::ApplicationCacheHost::applicationCacheInfo):
2238         * loader/appcache/ApplicationCacheHost.h:
2239         * loader/cache/CachedResourceLoader.cpp:
2240         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
2241         * page/ContextMenuController.cpp:
2242         (WebCore::ContextMenuController::showContextMenu):
2243         (WebCore::ContextMenuController::contextMenuItemSelected):
2244         (WebCore::ContextMenuController::populate):
2245         (WebCore::ContextMenuController::addInspectElementItem):
2246         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2247         * page/FrameView.cpp:
2248         (WebCore::FrameView::sendResizeEventIfNeeded):
2249         * page/Page.cpp:
2250         (WebCore::Page::Page):
2251         (WebCore::Page::~Page):
2252         * page/Page.h:
2253         * platform/ContextMenuItem.h:
2254         * platform/efl/EflInspectorUtilities.cpp:
2255         * platform/efl/EflInspectorUtilities.h:
2256         * platform/network/ResourceRequestBase.h:
2257         (WebCore::ResourceRequestBase::ResourceRequestBase):
2258         * platform/network/cf/ResourceRequestCFNet.cpp:
2259         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2260         * platform/network/cocoa/ResourceRequestCocoa.mm:
2261         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2262         * testing/Internals.cpp:
2263         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
2264         (WebCore::Internals::resetToConsistentState):
2265         (WebCore::Internals::inspectorHighlightRects):
2266         (WebCore::Internals::inspectorHighlightObject):
2267         (WebCore::Internals::setInspectorIsUnderTest):
2268         * testing/Internals.h:
2269         * testing/Internals.idl:
2270         * workers/WorkerGlobalScope.cpp:
2271         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2272         * workers/WorkerGlobalScope.h:
2273         * workers/WorkerGlobalScopeProxy.h:
2274         * workers/WorkerMessagingProxy.cpp:
2275         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
2276         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2277         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2278         * workers/WorkerMessagingProxy.h:
2279         * workers/WorkerReportingProxy.h:
2280         * workers/WorkerThread.cpp:
2281         (WebCore::WorkerThread::workerThread):
2282
2283 2015-01-20  Chris Dumez  <cdumez@apple.com>
2284
2285         Simplify DiagnosticLoggingClient call sites
2286         https://bugs.webkit.org/show_bug.cgi?id=140701
2287
2288         Reviewed by Andreas Kling.
2289
2290         Simplify DiagnosticLoggingClient call sites by:
2291         - Moving the Settings::diagnosticLoggingEnabled() check inside the
2292           MainFrame::diagnosticLoggingClient() getter.
2293         - Having MainFrame::diagnosticLoggingClient() return a reference
2294           instead of a pointer (returning a dummy client if necessary).
2295
2296         Otherwise, each call site needs to both check the setting and do a
2297         null-check on the client which is a bit annoying.
2298
2299         * history/PageCache.cpp:
2300         (WebCore::logPageCacheFailureDiagnosticMessage):
2301         (WebCore::logCanCacheFrameDecision):
2302         (WebCore::logCanCachePageDecision):
2303         * html/HTMLMediaElement.cpp:
2304         (WebCore::HTMLMediaElement::parseAttribute):
2305         * loader/EmptyClients.h:
2306         * loader/FrameLoader.cpp:
2307         (WebCore::logNavigation):
2308         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2309         * loader/SubframeLoader.cpp:
2310         (WebCore::logPluginRequest):
2311         * loader/SubresourceLoader.cpp:
2312         (WebCore::logResourceLoaded):
2313         * page/DiagnosticLoggingClient.h:
2314         (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Deleted.
2315         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Deleted.
2316         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Deleted.
2317         * page/MainFrame.cpp:
2318         (WebCore::MainFrame::diagnosticLoggingClient):
2319         * page/MainFrame.h:
2320
2321 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
2322
2323         Web Inspector: Should show dynamic specificity values
2324         https://bugs.webkit.org/show_bug.cgi?id=140647
2325
2326         Reviewed by Benjamin Poulain.
2327
2328         Test: inspector/css/selector-dynamic-specificity.html
2329
2330         * inspector/InspectorCSSAgent.h:
2331         * inspector/InspectorCSSAgent.cpp:
2332         (WebCore::InspectorCSSAgent::setRuleSelector):
2333         (WebCore::InspectorCSSAgent::addRule):
2334         (WebCore::InspectorCSSAgent::buildObjectForRule):
2335         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2336         When building a response for a particular element, pass the element along.
2337
2338         * inspector/InspectorStyleSheet.h:
2339         * inspector/InspectorStyleSheet.cpp:
2340         (WebCore::hasDynamicSpecificity):
2341         (WebCore::buildObjectForSelectorHelper):
2342         (WebCore::selectorsFromSource):
2343         (WebCore::InspectorStyleSheet::buildObjectForSelector):
2344         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2345         (WebCore::InspectorStyleSheet::buildObjectForRule):
2346         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2347         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2348         When building a response for a Selector, include the specificity if we know
2349         the element in context.
2350
2351 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
2352
2353         [Win] Build fix after r178760.
2354
2355         Windows will not accept a variable as the size declaration for an array.
2356
2357         * svg/SVGToOTFFontConversion.cpp:
2358         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Make size argument a const.
2359
2360 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
2361
2362         [Win] Unreviewed Windows project file gardening.
2363
2364         * WebCore.vcxproj/WebCore.vcxproj: Add missing SVG files and put things in their proper
2365         folders.
2366         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2367
2368 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2369
2370         URLFilterParser dismisses the last atom when parsing a builtin character class
2371         https://bugs.webkit.org/show_bug.cgi?id=140695
2372
2373         Reviewed by Andreas Kling.
2374
2375         The pending atom was not sunk before creating the new atom.
2376
2377         * contentextensions/URLFilterParser.cpp:
2378         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2379
2380 2015-01-20  Andreas Kling  <akling@apple.com>
2381
2382         Fast path for casting JSValue to JSDocument*.
2383         <https://webkit.org/b/134655>
2384
2385         Add a custom JSType bit for JSDocument so we can quickly cast to it
2386         from JSValue in the DocumentPrototype functions. This removes a bunch
2387         of grunt work and branches from common functions like getElementById.
2388
2389         Also removed GetCastingHelperForBaseObject and replace it with
2390         simple jsCasts since we don't need dynamic type checks for the base.
2391
2392         Reviewed by Darin Adler.
2393
2394         * WebCore.xcodeproj/project.pbxproj:
2395         * bindings/js/JSDOMWrapper.h:
2396         * bindings/js/JSDocumentCustom.h:
2397         * bindings/scripts/CodeGeneratorJS.pm:
2398         (GenerateHeader):
2399         (GetCastingHelperForThisObject):
2400         (GenerateImplementation):
2401         (GetCastingHelperForBaseObject): Deleted.
2402         * dom/Document.idl:
2403
2404 2015-01-20  Commit Queue  <commit-queue@webkit.org>
2405
2406         Unreviewed, rolling out r178751.
2407         https://bugs.webkit.org/show_bug.cgi?id=140694
2408
2409         Caused 32-bit JSC test failures (Requested by JoePeck on
2410         #webkit).
2411
2412         Reverted changeset:
2413
2414         "put_by_val_direct need to check the property is index or not
2415         for using putDirect / putDirectIndex"
2416         https://bugs.webkit.org/show_bug.cgi?id=140426
2417         http://trac.webkit.org/changeset/178751
2418
2419 2015-01-20  Zalan Bujtas  <zalan@apple.com>
2420
2421         Simple line layout: Use FlowContents::Segment::text instead of renderer when possible.
2422         https://bugs.webkit.org/show_bug.cgi?id=140692
2423
2424         Reviewed by Myles C. Maxfield.
2425
2426         No change in functionality.
2427
2428         * rendering/SimpleLineLayoutResolver.cpp:
2429         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2430
2431 2015-01-20  David Kilzer  <ddkilzer@apple.com>
2432
2433         Switch to comparing PLATFORM_NAME in terms of macosx
2434         <http://webkit.org/b/139516>
2435
2436         Reviewed by Timothy Hatcher.
2437
2438         * bindings/scripts/preprocessor.pm:
2439         (applyPreprocessor):
2440         * generate-export-file:
2441         (preprocessorMacros):
2442
2443 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2444
2445         Attempt to fix 32bits builds after r178743
2446
2447         * contentextensions/ContentExtensionsBackend.cpp:
2448         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2449
2450 2015-01-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2451
2452         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
2453         https://bugs.webkit.org/show_bug.cgi?id=140426
2454
2455         Reviewed by Geoffrey Garen.
2456
2457         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
2458
2459         * bindings/js/JSDOMWindowCustom.cpp:
2460         (WebCore::JSDOMWindow::getOwnPropertySlot):
2461         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2462         (WebCore::callHTMLAllCollection):
2463         (WebCore::JSHTMLAllCollection::item):
2464         * bindings/scripts/CodeGeneratorJS.pm:
2465         (GenerateGetOwnPropertySlotBody):
2466         (GenerateImplementation):
2467         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2468         (WebCore::JSFloat64Array::getOwnPropertySlot):
2469         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
2470         (WebCore::JSFloat64Array::put):
2471         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2472         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2473         * bridge/runtime_array.cpp:
2474         (JSC::RuntimeArray::getOwnPropertySlot):
2475         (JSC::RuntimeArray::put):
2476
2477 2015-01-20  Chris Dumez  <cdumez@apple.com>
2478
2479         Drop width / height shorthands code from StylePropertyShorthand.*
2480         https://bugs.webkit.org/show_bug.cgi?id=140686
2481
2482         Reviewed by Andreas Kling.
2483
2484         Drop width / height shorthands code from StylePropertyShorthand.*.
2485         width / height are not shorthands for min-width/max-width and
2486         min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
2487         treats these as shorthands. For e.g, the reverse method
2488         (indexOfShorthandForLonghand()) does not.
2489
2490         * css/StylePropertyShorthand.cpp:
2491         (WebCore::widthShorthand): Deleted.
2492         (WebCore::heightShorthand): Deleted.
2493         * css/StylePropertyShorthand.h:
2494         (WebCore::matchingCustomShorthandsForLonghand):
2495
2496 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2497
2498         Add a mechanism to ignore previous content extension rules
2499         https://bugs.webkit.org/show_bug.cgi?id=140663
2500
2501         Reviewed by Andreas Kling.
2502
2503         * contentextensions/ContentExtensionRule.h:
2504         * contentextensions/ContentExtensionsBackend.cpp:
2505         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2506         * contentextensions/ContentExtensionsManager.cpp:
2507         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2508
2509 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2510
2511         Resolve the epsilon transitions for each state upfront instead of dynamically
2512         https://bugs.webkit.org/show_bug.cgi?id=140654
2513
2514         Reviewed by Andreas Kling.
2515
2516         Instead of recomputing the epsilon-closure for each set, we compute the closure
2517         of every element at the beginning of the transformation.
2518
2519         We then remove the epsilon transitions from the NFA to simplify populateTransitions().
2520         The epsilon transitions are still there, but they are now in a separate graph we use
2521         in parallel.
2522
2523         * contentextensions/NFAToDFA.cpp:
2524         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
2525         (WebCore::ContentExtensions::resolveEpsilonClosures):
2526         (WebCore::ContentExtensions::extendSetWithClosure):
2527         (WebCore::ContentExtensions::populateTransitions):
2528         (WebCore::ContentExtensions::NFAToDFA::convert):
2529         (WebCore::ContentExtensions::epsilonClosure): Deleted.
2530         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon): Deleted.
2531         * contentextensions/NFAToDFA.h:
2532
2533 2015-01-20  Chris Dumez  <cdumez@apple.com>
2534
2535         Log types of resources being loaded using DiagnosticLoggingClient
2536         https://bugs.webkit.org/show_bug.cgi?id=140682
2537
2538         Reviewed by Andreas Kling.
2539
2540         Log types of resources being loaded using DiagnosticLoggingClient
2541         instead of the legacy FeatureCounter.
2542
2543         * loader/SubresourceLoader.cpp:
2544         (WebCore::logResourceLoaded):
2545         (WebCore::SubresourceLoader::didFinishLoading):
2546         (WebCore::logResourceLoadedUsingFeatureCounter): Deleted.
2547         * page/DiagnosticLoggingKeys.cpp:
2548         (WebCore::DiagnosticLoggingKeys::otherKey):
2549         (WebCore::DiagnosticLoggingKeys::mainResourceKey):
2550         (WebCore::DiagnosticLoggingKeys::loadedKey):
2551         (WebCore::DiagnosticLoggingKeys::imageKey):
2552         (WebCore::DiagnosticLoggingKeys::rawKey):
2553         (WebCore::DiagnosticLoggingKeys::resourceKey):
2554         (WebCore::DiagnosticLoggingKeys::scriptKey):
2555         (WebCore::DiagnosticLoggingKeys::styleSheetKey):
2556         (WebCore::DiagnosticLoggingKeys::svgDocumentKey):
2557         (WebCore::DiagnosticLoggingKeys::fontKey):
2558         * page/DiagnosticLoggingKeys.h:
2559         * platform/FeatureCounterKeys.h:
2560
2561 2015-01-20  Zalan Bujtas  <zalan@apple.com>
2562
2563         Simple line layout: Remove redundant style.preserveNewline check when collapsing trailing whitespace.
2564         https://bugs.webkit.org/show_bug.cgi?id=140684
2565
2566         Reviewed by Antti Koivisto.
2567
2568         FlowContents::isLineBreak() checks whether we are at a hard newline.
2569
2570         No change in functionality.
2571
2572         * rendering/SimpleLineLayout.cpp:
2573         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2574
2575 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
2576
2577         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
2578         https://bugs.webkit.org/show_bug.cgi?id=140474
2579
2580         Reviewed by Tim Horton.
2581
2582         Add accessors for standard names for container CALayer for each of the tile grids,
2583         and when tile grids are swapped, update those names as appropriate.
2584         
2585         * WebCore.exp.in:
2586         * platform/graphics/ca/TileController.cpp:
2587         (WebCore::TileController::tileGridContainerLayerName):
2588         (WebCore::TileController::zoomedOutTileGridContainerLayerName):
2589         (WebCore::TileController::setContentsScale):
2590         * platform/graphics/ca/TileController.h:
2591         * platform/graphics/ca/TileGrid.cpp:
2592         (WebCore::TileGrid::TileGrid):
2593         (WebCore::TileGrid::setIsZoomedOutTileGrid):
2594         * platform/graphics/ca/TileGrid.h:
2595
2596 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2597
2598         Fix unused-private-field warning in IconEfl.cpp
2599         https://bugs.webkit.org/show_bug.cgi?id=140676
2600
2601         Reviewed by Darin Adler.
2602
2603         * platform/graphics/Icon.h:
2604         * platform/graphics/efl/IconEfl.cpp:
2605         (WebCore::Icon::Icon): Deleted.
2606
2607 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2608
2609         Fix unused-private-field warning in FontCustomPlatformDataFreeType.cpp
2610         https://bugs.webkit.org/show_bug.cgi?id=140677
2611
2612         Reviewed by Martin Robinson.
2613
2614         * platform/graphics/cairo/FontCustomPlatformData.h:
2615         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2616         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
2617         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2618
2619 2015-01-20  peavo@outlook.com  <peavo@outlook.com>
2620
2621         Plugin content not loaded.
2622         https://bugs.webkit.org/show_bug.cgi?id=140672
2623
2624         Reviewed by Brent Fulgham.
2625
2626         It seems this is caused by a std::unique_ptr in CClass::methodNamed being moved,
2627         resetting its raw pointer. The raw pointer, which now is null, is then returned
2628         from the method.
2629
2630         * bridge/c/c_class.cpp:
2631         (JSC::Bindings::CClass::methodNamed):
2632         (JSC::Bindings::CClass::fieldNamed):
2633
2634 2015-01-20  Darin Adler  <darin@apple.com>
2635
2636         Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
2637         https://bugs.webkit.org/show_bug.cgi?id=140679
2638
2639         Reviewed by Anders Carlsson.
2640
2641         First step in removing the SVG instance tree.
2642         All based on redoing the same excellent work Rob Buis did to remove this in Blink in crbug.com/313438.
2643
2644         * CMakeLists.txt: Removed the source files.
2645         * DerivedSources.cpp: Ditto.
2646         * DerivedSources.make: Ditto.
2647         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2648         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2649         * WebCore.xcodeproj/project.pbxproj: Ditto.
2650
2651         * page/EventHandler.cpp:
2652         (WebCore::EventHandler::clear): Removed code to set unused m_instanceUnderMouse.
2653         (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
2654         * page/EventHandler.h: Removed m_instanceUnderMouse.
2655
2656         * svg/SVGAllInOne.cpp: Removed the source files.
2657         * svg/SVGElementInstance.cpp:
2658         (WebCore::SVGElementInstance::childNodes): Deleted.
2659         * svg/SVGElementInstance.h: Removed childNodes.
2660         * svg/SVGElementInstance.idl: Ditto.
2661         * svg/SVGElementInstanceList.cpp: Removed.
2662         * svg/SVGElementInstanceList.h: Removed.
2663         * svg/SVGElementInstanceList.idl: Removed.
2664         * svg/SVGUseElement.cpp:
2665         (WebCore::dumpInstanceTree): Deleted.
2666         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Removed DUMP_INSTANCE_TREE and
2667         DUMP_SHADOW_TREE code.
2668
2669 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
2670
2671         Web Replay: code generator should take supplemental specifications and allow cross-framework references
2672         https://bugs.webkit.org/show_bug.cgi?id=136312
2673
2674         Reviewed by Joseph Pecoraro.
2675
2676         Changes covered by existing input generator tests.
2677
2678         * DerivedSources.make: Add JSInputs.json as supplemental specification.
2679         * replay/WebInputs.json: Moved common types to JSInputs.json.
2680
2681 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2682
2683         Fix unused-const-variable warning in RenderLayerCompositor.cpp
2684         https://bugs.webkit.org/show_bug.cgi?id=140678
2685
2686         Reviewed by Simon Fraser.
2687
2688         * rendering/RenderLayerCompositor.cpp:
2689
2690 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2691
2692         [gstreamer] Fix expression result unused warning in GRefPtrGStreamer.cpp
2693         https://bugs.webkit.org/show_bug.cgi?id=140671
2694
2695         Reviewed by Philippe Normand.
2696
2697         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2698         (WTF::refGPtr<GstToc>):
2699
2700 2015-01-19  Dean Jackson  <dino@apple.com>
2701
2702         Support "plus-darker" in mix-blend mode
2703         https://bugs.webkit.org/show_bug.cgi?id=140646
2704         <rdar://problem/19523370>
2705
2706         Reviewed by Simon Fraser.
2707
2708         Support the "plus-darker" blending mode to CSS.
2709         See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
2710
2711         Test: css3/blending/svg-blend-plus-darker.html
2712
2713         * css/CSSParser.cpp:
2714         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
2715         the new keyword.
2716         * css/CSSPrimitiveValueMappings.h: Add the mappings.
2717         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2718         (WebCore::CSSPrimitiveValue::operator BlendMode):
2719         * platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
2720         * platform/graphics/GraphicsTypes.h:
2721         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
2722         (PlatformCAFilters::setBlendingFiltersOnLayer):
2723         * platform/graphics/cg/GraphicsContextCG.cpp:
2724         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.
2725
2726 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2727
2728         Fix 'register' storage class specifier is deprecated warning
2729         https://bugs.webkit.org/show_bug.cgi?id=140669
2730
2731         Reviewed by Carlos Garcia Campos.
2732
2733         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2734         (webKitWebAudioSrcLoop):
2735
2736 2015-01-20  Chris Dumez  <cdumez@apple.com>
2737
2738         Use DiagnosticLoggingClient to log page cache failures
2739         https://bugs.webkit.org/show_bug.cgi?id=140650
2740
2741         Reviewed by Andreas Kling.
2742
2743         Use DiagnosticLoggingClient to log page cache failures instead of the
2744         legacy FeatureCounter.
2745
2746         * history/PageCache.cpp:
2747         (WebCore::logPageCacheFailureDiagnosticMessage):
2748         (WebCore::logCanCacheFrameDecision):
2749         (WebCore::logCanCachePageDecision):
2750         (WebCore::PageCache::canCache):
2751         (WebCore::pruningReasonToDiagnosticLoggingKey):
2752         (WebCore::PageCache::take):
2753         (WebCore::PageCache::get):
2754         (WebCore::pruningReasonToFeatureCounterKey): Deleted.
2755         * page/DiagnosticLoggingKeys.cpp:
2756         (WebCore::DiagnosticLoggingKeys::successKey):
2757         (WebCore::DiagnosticLoggingKeys::failureKey):
2758         (WebCore::DiagnosticLoggingKeys::pageLoadedKey):
2759         (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
2760         (WebCore::DiagnosticLoggingKeys::navigationKey):
2761         (WebCore::DiagnosticLoggingKeys::pageCacheKey):
2762         (WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey):
2763         (WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey):
2764         (WebCore::DiagnosticLoggingKeys::isErrorPageKey):
2765         (WebCore::DiagnosticLoggingKeys::hasPluginsKey):
2766         (WebCore::DiagnosticLoggingKeys::httpsNoStoreKey):
2767         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey):
2768         (WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey):
2769         (WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey):
2770         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey):
2771         (WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey):
2772         (WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey):
2773         (WebCore::DiagnosticLoggingKeys::applicationCacheKey):
2774         (WebCore::DiagnosticLoggingKeys::deniedByClientKey):
2775         (WebCore::DiagnosticLoggingKeys::deviceMotionKey):
2776         (WebCore::DiagnosticLoggingKeys::deviceOrientationKey):
2777         (WebCore::DiagnosticLoggingKeys::deviceProximityKey):
2778         (WebCore::DiagnosticLoggingKeys::reloadKey):
2779         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey):
2780         (WebCore::DiagnosticLoggingKeys::sameLoadKey):
2781         (WebCore::DiagnosticLoggingKeys::expiredKey):
2782         (WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey):
2783         (WebCore::DiagnosticLoggingKeys::prunedDueToCapacityReached):
2784         (WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended):
2785         (WebCore::DiagnosticLoggingKeys::passKey): Deleted.
2786         (WebCore::DiagnosticLoggingKeys::failKey): Deleted.
2787         (WebCore::DiagnosticLoggingKeys::noopKey): Deleted.
2788         * page/DiagnosticLoggingKeys.h:
2789         * platform/FeatureCounterKeys.h:
2790
2791 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
2792
2793         [CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
2794         https://bugs.webkit.org/show_bug.cgi?id=139058
2795
2796         Reviewed by Andreas Kling.
2797
2798         The method RenderGrid::computeNormalizedFractionBreadth() is
2799         supposed to get as fourth argument either the grid element's
2800         content box size or the max-size of a particular grid item. For
2801         the former we were incorrectly passing the free space after
2802         distributing the available space to tracks.
2803
2804         Apart from that, that method has a bug in its implementation. As
2805         we were using the free space instead of the grid element's content
2806         box size, we didn't have to subtract the usedBreadth of grid
2807         tracks from the passed in value. That did not work for the case of
2808         the caller passing the max-size of a particular item.
2809
2810         * rendering/RenderGrid.cpp:
2811         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2812         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
2813
2814 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
2815
2816         [SVG -> OTF Converter] Flip the switch on
2817         https://bugs.webkit.org/show_bug.cgi?id=140592
2818
2819         Reviewed by Antti Koivisto.
2820
2821         * Configurations/FeatureDefines.xcconfig:
2822
2823 2015-01-19  Commit Queue  <commit-queue@webkit.org>
2824
2825         Unreviewed, rolling out r178683.
2826         https://bugs.webkit.org/show_bug.cgi?id=140657
2827
2828         Lots of asserts in tests. (Requested by JoePeck on #webkit).
2829
2830         Reverted changeset:
2831
2832         "LayoutState and subtree layout code should use
2833         RenderElement."
2834         https://bugs.webkit.org/show_bug.cgi?id=126878
2835         http://trac.webkit.org/changeset/178683
2836
2837 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
2838
2839         [Win] Unreviewed gardening.
2840
2841         Avoid compiling files twice when they are included in an 'AllInOne.cpp' file.
2842
2843         * WebCore.vcxproj/WebCore.vcxproj: Mark several files as 'not to be built', since
2844         they are also build as part of an 'AllInOne.cpp' file.
2845
2846 2015-01-19  Chris Dumez  <cdumez@apple.com>
2847
2848         Stop using FeatureCounter to log navigation types
2849         https://bugs.webkit.org/show_bug.cgi?id=140642
2850
2851         Reviewed by Andreas Kling.
2852
2853         Stop using FeatureCounter to log navigation types now that
2854         DiagnosticLoggingClient is working on iOS.
2855
2856         * loader/FrameLoader.cpp:
2857         (WebCore::logNavigation):
2858         * platform/FeatureCounterKeys.h:
2859
2860 2015-01-19  Andreas Kling  <akling@apple.com>
2861
2862         LayoutState and subtree layout code should use RenderElement.
2863         <https://webkit.org/b/126878>
2864
2865         Subtree layout will never begin at a RenderText, so tighten up
2866         the code to operate on RenderElements instead of RenderObjects.
2867
2868         Reviewed by Antti Koivisto.
2869
2870         * inspector/InspectorTimelineAgent.cpp:
2871         (WebCore::InspectorTimelineAgent::willLayout):
2872         * page/FrameView.cpp:
2873         (WebCore::FrameView::layoutRoot):
2874         (WebCore::FrameView::layout):
2875         * page/FrameView.h:
2876
2877             Make FrameView::layoutRoot() return RenderElement*.
2878
2879         * rendering/RenderElement.cpp:
2880         (WebCore::RenderElement::willBeDestroyed):
2881         * rendering/RenderObject.cpp:
2882         (WebCore::RenderObject::willBeDestroyed):
2883         * rendering/RenderObject.h:
2884
2885             Move subtree layout root clearing logic in willBeDestroyed()
2886             from RenderObject to RenderElement.
2887
2888         * rendering/LayoutState.cpp:
2889         (WebCore::LayoutState::LayoutState):
2890         * rendering/LayoutState.h:
2891         * rendering/RenderView.h:
2892         * rendering/RenderView.cpp:
2893         (WebCore::RenderView::pushLayoutState):
2894         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
2895
2896             Make all of these functions take RenderElement instead of
2897             RenderObject since layout never starts from a RenderText.
2898
2899         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
2900
2901             Tweak loop since it's never null on first iteration.
2902
2903 2015-01-19  Beth Dakin  <bdakin@apple.com>
2904
2905         Speculative build fix.
2906
2907         * platform/spi/mac/NSViewSPI.h:
2908
2909 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
2910
2911         Adjust naming of action menu SPI
2912         https://bugs.webkit.org/show_bug.cgi?id=140644
2913         <rdar://problem/19448129>
2914
2915         Reviewed by Brian Weinstein.
2916
2917         * platform/spi/mac/NSViewSPI.h:
2918         Add an underscore.
2919
2920 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
2921
2922         Canonicalization of :lang() should preserve the :lang()'s arguments representations
2923         https://bugs.webkit.org/show_bug.cgi?id=139928
2924
2925         Reviewed by Benjamin Poulain.
2926
2927         Preserve the representation of IDENT and STRING when serializing the
2928         :lang(). For example, :lang(foo,"bar", baz) should be serialize as
2929         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
2930     
2931         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
2932         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
2933         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
2934         respectively, since those methods are being exclusively used in respect
2935         with :lang().
2936
2937         Update the test of serializing :lang() with IDENT and STRING arguments.
2938
2939         * css/CSSGrammar.y.in:
2940         * css/CSSParserValues.cpp:
2941         (WebCore::CSSParserSelector::setLangArgumentList):
2942         (WebCore::CSSParserSelector::setArgumentList): Deleted.
2943         * css/CSSParserValues.h:
2944         (WebCore::CSSParserString::tokenType):
2945         (WebCore::CSSParserString::setTokenType):
2946         * css/CSSSelector.cpp:
2947         (WebCore::appendLangArgumentList):
2948         (WebCore::CSSSelector::selectorText):
2949         (WebCore::CSSSelector::setLangArgumentList):
2950         (WebCore::appendArgumentList): Deleted.
2951         (WebCore::CSSSelector::setArgumentList): Deleted.
2952         * css/CSSSelector.h:
2953         (WebCore::CSSSelector::langArgumentList):
2954         (WebCore::CSSSelector::argumentList): Deleted.
2955         * css/SelectorChecker.cpp:
2956         (WebCore::SelectorChecker::checkOne):
2957         * css/SelectorCheckerTestFunctions.h:
2958         (WebCore::matchesLangPseudoClass):
2959
2960 2015-01-16  Roger Fong  <roger_fong@apple.com>
2961
2962         WebGL2: Support webgl2 context creation.
2963         https://bugs.webkit.org/show_bug.cgi?id=126408
2964         <rdar://problem/15002170>
2965
2966         Reviewed by Dean Jackson.
2967
2968         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
2969
2970         Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
2971         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
2972         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
2973
2974         * CMakeLists.txt:
2975         * DerivedSources.cpp:
2976         * DerivedSources.make:
2977         * WebCore.vcxproj/WebCore.vcxproj:
2978         * WebCore.vcxproj/WebCore.vcxproj.filters:
2979         * WebCore.xcodeproj/project.pbxproj:
2980         * bindings/js/JSBindingsAllInOne.cpp:
2981         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2982         (WebCore::toJS):
2983         * bindings/js/JSDocumentCustom.cpp:
2984         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2985         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
2986         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
2987         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
2988         * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
2989         * bindings/scripts/CodeGeneratorJS.pm:
2990         (GenerateImplementation):
2991         * html/HTMLCanvasElement.cpp:
2992         (WebCore::HTMLCanvasElement::getContext):
2993         (WebCore::HTMLCanvasElement::reset):
2994         (WebCore::HTMLCanvasElement::paint):
2995         (WebCore::HTMLCanvasElement::getImageData):
2996         * html/canvas/ANGLEInstancedArrays.cpp:
2997         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2998         (WebCore::ANGLEInstancedArrays::supported):
2999         * html/canvas/ANGLEInstancedArrays.h:
3000         * html/canvas/CanvasRenderingContext.h:
3001         (WebCore::CanvasRenderingContext::isWebGL1):
3002         (WebCore::CanvasRenderingContext::isWebGL2):
3003         (WebCore::CanvasRenderingContext::is3d):
3004         * html/canvas/EXTBlendMinMax.cpp:
3005         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
3006         * html/canvas/EXTBlendMinMax.h:
3007         * html/canvas/EXTFragDepth.cpp:
3008         (WebCore::EXTFragDepth::EXTFragDepth):
3009         * html/canvas/EXTFragDepth.h:
3010         * html/canvas/EXTShaderTextureLOD.cpp:
3011         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
3012         * html/canvas/EXTShaderTextureLOD.h:
3013         * html/canvas/EXTTextureFilterAnisotropic.cpp:
3014         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
3015         * html/canvas/EXTTextureFilterAnisotropic.h:
3016         * html/canvas/EXTsRGB.cpp:
3017         (WebCore::EXTsRGB::EXTsRGB):
3018         * html/canvas/EXTsRGB.h:
3019         * html/canvas/OESElementIndexUint.cpp:
3020         (WebCore::OESElementIndexUint::OESElementIndexUint):
3021         * html/canvas/OESElementIndexUint.h:
3022         * html/canvas/OESStandardDerivatives.cpp:
3023         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
3024         * html/canvas/OESStandardDerivatives.h:
3025         * html/canvas/OESTextureFloat.cpp:
3026         (WebCore::OESTextureFloat::OESTextureFloat):
3027         * html/canvas/OESTextureFloat.h:
3028         * html/canvas/OESTextureFloatLinear.cpp:
3029         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
3030         * html/canvas/OESTextureFloatLinear.h:
3031         * html/canvas/OESTextureHalfFloat.cpp:
3032         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
3033         * html/canvas/OESTextureHalfFloat.h:
3034         * html/canvas/OESTextureHalfFloatLinear.cpp:
3035         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
3036         * html/canvas/OESTextureHalfFloatLinear.h:
3037         * html/canvas/OESVertexArrayObject.cpp:
3038         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
3039         * html/canvas/OESVertexArrayObject.h:
3040         * html/canvas/WebGL2RenderingContext.cpp: Added.
3041         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
3042         * html/canvas/WebGL2RenderingContext.h: Added.
3043         * html/canvas/WebGL2RenderingContext.idl: Added.
3044         * html/canvas/WebGLBuffer.cpp:
3045         (WebCore::WebGLBuffer::create):
3046         (WebCore::WebGLBuffer::WebGLBuffer):
3047         * html/canvas/WebGLBuffer.h:
3048         * html/canvas/WebGLCompressedTextureATC.cpp:
3049         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
3050         (WebCore::WebGLCompressedTextureATC::supported):
3051         * html/canvas/WebGLCompressedTextureATC.h:
3052         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
3053         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
3054         (WebCore::WebGLCompressedTexturePVRTC::supported):
3055         * html/canvas/WebGLCompressedTexturePVRTC.h:
3056         * html/canvas/WebGLCompressedTextureS3TC.cpp:
3057         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
3058         (WebCore::WebGLCompressedTextureS3TC::supported):
3059         * html/canvas/WebGLCompressedTextureS3TC.h:
3060         * html/canvas/WebGLContextGroup.cpp:
3061         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
3062         (WebCore::WebGLContextGroup::addContext):
3063         (WebCore::WebGLContextGroup::removeContext):
3064         (WebCore::WebGLContextGroup::loseContextGroup):
3065         * html/canvas/WebGLContextGroup.h:
3066         * html/canvas/WebGLContextObject.cpp:
3067         (WebCore::WebGLContextObject::WebGLContextObject):
3068         * html/canvas/WebGLContextObject.h:
3069         (WebCore::WebGLContextObject::context):
3070         * html/canvas/WebGLDebugRendererInfo.cpp:
3071         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
3072         * html/canvas/WebGLDebugRendererInfo.h:
3073         * html/canvas/WebGLDebugShaders.cpp:
3074         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
3075         * html/canvas/WebGLDebugShaders.h:
3076         * html/canvas/WebGLDepthTexture.cpp:
3077         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
3078         * html/canvas/WebGLDepthTexture.h:
3079         * html/canvas/WebGLDrawBuffers.cpp:
3080         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
3081         (WebCore::WebGLDrawBuffers::supported):
3082         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
3083         * html/canvas/WebGLDrawBuffers.h:
3084         * html/canvas/WebGLExtension.cpp:
3085         (WebCore::WebGLExtension::WebGLExtension):
3086         * html/canvas/WebGLExtension.h:
3087         (WebCore::WebGLExtension::context):
3088         * html/canvas/WebGLFramebuffer.cpp:
3089         (WebCore::WebGLFramebuffer::create):
3090         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
3091         * html/canvas/WebGLFramebuffer.h:
3092         * html/canvas/WebGLLoseContext.cpp:
3093         (WebCore::WebGLLoseContext::WebGLLoseContext):
3094         (WebCore::WebGLLoseContext::loseContext):
3095         * html/canvas/WebGLLoseContext.h:
3096         * html/canvas/WebGLObject.cpp:
3097         (WebCore::WebGLObject::WebGLObject):
3098         * html/canvas/WebGLObject.h:
3099         * html/canvas/WebGLProgram.cpp:
3100         (WebCore::WebGLProgram::create):
3101         (WebCore::WebGLProgram::WebGLProgram):
3102         * html/canvas/WebGLProgram.h:
3103         * html/canvas/WebGLRenderbuffer.cpp:
3104         (WebCore::WebGLRenderbuffer::create):
3105         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
3106         * html/canvas/WebGLRenderbuffer.h:
3107         * html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
3108         * html/canvas/WebGLRenderingContext.h:  Move implementation to WebGLRenderingContextBase.h.
3109         * html/canvas/WebGLRenderingContext.idl:  Move implementation to WebGLRenderingContextBase.idl.
3110         * html/canvas/WebGLRenderingContextBase.cpp: Added.
3111         * html/canvas/WebGLRenderingContextBase.h: Added.
3112         * html/canvas/WebGLRenderingContextBase.idl: Added.
3113         * html/canvas/WebGLShader.cpp:
3114         (WebCore::WebGLShader::create):
3115         (WebCore::WebGLShader::WebGLShader):
3116         * html/canvas/WebGLShader.h:
3117         * html/canvas/WebGLSharedObject.cpp:
3118         (WebCore::WebGLSharedObject::WebGLSharedObject):
3119         * html/canvas/WebGLSharedObject.h:
3120         * html/canvas/WebGLTexture.cpp:
3121         (WebCore::WebGLTexture::create):
3122         (WebCore::WebGLTexture::WebGLTexture):
3123         * html/canvas/WebGLTexture.h:
3124         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3125         (WebCore::WebGLVertexArrayObjectOES::create):
3126         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
3127         * html/canvas/WebGLVertexArrayObjectOES.h:
3128
3129 2015-01-19  Antti Koivisto  <antti@apple.com>
3130
3131         REGRESSION(r178250): ~2% PLT regression
3132         https://bugs.webkit.org/show_bug.cgi?id=140640
3133
3134         Reviewed by Andreas Kling.
3135
3136         * platform/graphics/FontCache.cpp:
3137
3138         The patch accidentally contained a change to reduce the size of the cache (to verify that purgin works).
3139         Restore it back to the original value.
3140
3141 2015-01-19  peavo@outlook.com  <peavo@outlook.com>
3142
3143         [WinCairo][Video] Windows Media Foundation implementation is not completed.
3144         https://bugs.webkit.org/show_bug.cgi?id=140337
3145
3146         Reviewed by Alex Christensen.
3147
3148         This patch aims to complete some of the methods which are not implemented.
3149         Currently, only MP4 is supported.
3150         Video is rendered in a child window of the main window.
3151         We should eventually render the video directly in the main window,
3152         by reading and painting individual video frames from the stream.
3153
3154         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3155         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
3156         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
3157         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
3158         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
3159         (WebCore::MediaPlayerPrivateMediaFoundation::load):
3160         (WebCore::MediaPlayerPrivateMediaFoundation::play):
3161         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
3162         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
3163         (WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
3164         (WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
3165         (WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
3166         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
3167         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
3168         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
3169         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
3170         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
3171         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
3172         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
3173         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
3174         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
3175         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
3176         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
3177         (WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
3178         (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
3179         (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
3180         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
3181         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
3182         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
3183         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
3184         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
3185         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
3186         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
3187         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
3188         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
3189         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
3190         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
3191         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
3192         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
3193         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3194
3195 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
3196
3197         Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
3198         https://bugs.webkit.org/show_bug.cgi?id=140512
3199
3200         Reviewed by Chris Dumez.
3201
3202         No new tests, no behavior changed.
3203
3204         * replay/EventLoopInput.h: Make overridden methods public.
3205         * replay/MemoizedDOMResult.h: Add type trait specialization here. It is
3206         special-cased because the input type parameter doesn't work with macros.
3207         * replay/SerializationMethods.cpp:
3208         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
3209         Use is() and downcast() when dispatching to encoders based on type.
3210
3211 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
3212
3213         Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
3214         https://bugs.webkit.org/show_bug.cgi?id=140614
3215
3216         Reviewed by Carlos Garcia Campos.
3217
3218         Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
3219         implementation for Linux.
3220
3221         * platform/linux/MemoryPressureHandlerLinux.cpp:
3222         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
3223
3224 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
3225
3226         Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
3227         https://bugs.webkit.org/show_bug.cgi?id=140612
3228
3229         Reviewed by Philippe Normand.
3230
3231         Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
3232
3233         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3234         (WebCore::MockMediaPlayerMediaSource::play):
3235         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
3236         (WebCore::MockMediaPlayerMediaSource::seekCompleted):
3237
3238 2015-01-19  Commit Queue  <commit-queue@webkit.org>
3239
3240         Unreviewed, rolling out r178653.
3241         https://bugs.webkit.org/show_bug.cgi?id=140634
3242
3243         Broke multiple SVG tests on Mountain Lion (Requested by ap on
3244         #webkit).
3245
3246         Reverted changeset:
3247
3248         "[SVG -> OTF Converter] Flip the switch on"
3249         https://bugs.webkit.org/show_bug.cgi?id=140592
3250         http://trac.webkit.org/changeset/178653
3251
3252 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
3253
3254         Layers need to be already updated before we call adjustViewSize
3255         https://bugs.webkit.org/show_bug.cgi?id=135514
3256
3257         Reviewed by Simon Fraser.
3258
3259         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
3260
3261         Defer painting operations until we have finished layout. This
3262         has a couple of benefits:
3263         (1) We do not attempt to modify render layers during layout.
3264         (2) In WK1 we do not attempt to paint during layout.
3265
3266         Add a new virtual predicate to ScrollView indicating when we are in
3267         layout so that calls to setContentsSize do not attempt
3268         to adjust scrollbars.
3269
3270         Modify FrameView to set its ScrollView state to block paint
3271         operations during layout. Also add a post-layout handler to
3272         complete the scrollbar updates after layout is finished.
3273
3274         * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
3275         * page/FrameView.cpp:
3276         (WebCore::FrameView::layout):
3277         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
3278         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
3279         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
3280         (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
3281         * page/FrameView.h:
3282         * platform/ScrollView.cpp:
3283         (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
3284         painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
3285         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
3286         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
3287         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
3288         the scroll delta and apply it after the layout is complete.
3289         (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
3290         so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
3291         * platform/ScrollView.h:
3292         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
3293
3294 2015-01-16  Ada Chan  <adachan@apple.com>
3295
3296         HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
3297         https://bugs.webkit.org/show_bug.cgi?id=140524
3298
3299         Reviewed by Andreas Kling.
3300
3301         Test: media/muted-video-is-playing-audio.html
3302
3303         * html/HTMLMediaElement.cpp:
3304         (WebCore::HTMLMediaElement::setMuted):
3305         Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
3306         (WebCore::HTMLMediaElement::isPlayingAudio):
3307         HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
3308
3309 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
3310
3311         [SVG -> OTF Converter] Flip the switch on
3312         https://bugs.webkit.org/show_bug.cgi?id=140592
3313
3314         Reviewed by Antti Koivisto.
3315
3316         * Configurations/FeatureDefines.xcconfig:
3317
3318 2015-01-16  Alexey Proskuryakov  <ap@apple.com>
3319
3320         Console log sometimes prefixed with line number
3321         https://bugs.webkit.org/show_bug.cgi?id=105280
3322
3323         Reviewed by Darin Adler.
3324
3325         Improve the logic for determining whether a console message should be associated
3326         with a source code location.
3327
3328         * dom/ScriptableDocumentParser.h:
3329         * html/parser/HTMLDocumentParser.cpp:
3330         (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
3331         * html/parser/HTMLDocumentParser.h:
3332         * page/PageConsoleClient.cpp:
3333         (WebCore::getParserLocationForConsoleMessage):
3334         (WebCore::PageConsoleClient::addMessage):
3335         * xml/parser/XMLDocumentParser.cpp:
3336         (WebCore::XMLDocumentParser::pauseParsing):
3337         * xml/parser/XMLDocumentParser.h:
3338         * xml/parser/XMLDocumentParserLibxml2.cpp:
3339         (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
3340
3341 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
3342
3343         [SVG -> OTF Converter] Glyphs get clipped weirdly
3344         https://bugs.webkit.org/show_bug.cgi?id=137095
3345
3346         Reviewed by Antti Koivisto.
3347
3348         The Adobe CFF spec doesn't actually tell you how to serialize a
3349         "FontBBox." After trial and error, it seems to be (x, y, width,
3350         height).
3351
3352         Test: svg/text/kerning.svg
3353               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
3354
3355         * svg/SVGToOTFFontConversion.cpp:
3356         (WebCore::SVGToOTFFontConverter::appendHEADTable):
3357         (WebCore::SVGToOTFFontConverter::appendCFFTable):
3358         (WebCore::SVGToOTFFontConverter::appendVHEATable):
3359         (WebCore::CFFBuilder::CFFBuilder):
3360         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
3361         (WebCore::SVGToOTFFontConverter::processGlyphElement):
3362
3363 2015-01-19  Csaba Osztrogonác  <ossy@webkit.org>
3364
3365         REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
3366         https://bugs.webkit.org/show_bug.cgi?id=140611
3367
3368         Reviewed by Eric Carlson.
3369
3370         * testing/Internals.cpp:
3371         (WebCore::Internals::elementIsBlockingDisplaySleep):
3372         * testing/Internals.h:
3373
3374 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
3375
3376         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
3377         https://bugs.webkit.org/show_bug.cgi?id=139059
3378
3379         Reviewed by David Hyatt.
3380
3381         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
3382
3383         * rendering/RenderGrid.cpp:
3384         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3385
3386 2015-01-18  Alexey Proskuryakov  <ap@apple.com>
3387
3388         Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
3389
3390         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3391         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
3392         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3393         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
3394         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
3395         * bindings/scripts/test/JS/JSTestObj.cpp:
3396         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3397         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3398
3399 2015-01-18  Chris Dumez  <cdumez@apple.com>
3400
3401         Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
3402         https://bugs.webkit.org/show_bug.cgi?id=140599
3403
3404         Reviewed by Antti Koivisto.
3405
3406         Generate matchingShorthandsForLonghand() implementation from
3407         CSSPropertyNames.in. We already have all the information we need in
3408         CSSPropertyNames.in to generate the big switch() in
3409         matchingShorthandsForLonghand().
3410
3411         A few shorthands still aren't generated. I will look into getting rid
3412         of the custom code in a follow-up patch.
3413
3414         * css/StylePropertyShorthand.cpp:
3415         (WebCore::makeVector): Deleted.
3416         (WebCore::matchingShorthandsForLonghand): Deleted.
3417         * css/StylePropertyShorthand.h:
3418         (WebCore::matchingCustomShorthandsForLonghand):
3419         * css/makeprop.pl:
3420         (constructShorthandsVector):
3421
3422 2015-01-18  Dean Jackson  <dino@apple.com>
3423
3424         Out of bounds write in canvas.toDataURL
3425         https://bugs.webkit.org/show_bug.cgi?id=140594
3426         <rdar://problem/19449135>
3427
3428         Reviewed by Alexey Proskuryakov.
3429
3430         In the case where we have a canvas object that does
3431         not have premultiplied alpha (an option you can select
3432         when using WebGL) we have to multiply out the alpha when
3433         converting to JPEG via toDataURL.
3434
3435         For this we created a buffer, but were not accurately
3436         resizing it before flattening the alpha.
3437
3438         Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
3439
3440         * platform/graphics/cg/ImageBufferCG.cpp:
3441         (WebCore::ImageDataToDataURL): Call resize once we've
3442         determined we have enough space.
3443
3444 2015-01-17  Sam Weinig  <sam@webkit.org>
3445
3446         Add initial experimental user content filtering API
3447         https://bugs.webkit.org/show_bug.cgi?id=140584
3448
3449         Reviewed by Benjamin Poulain.
3450
3451         Change content extensions to be managed through the UserContentController.
3452
3453         * WebCore.exp.in:
3454         Update exports.
3455
3456         * WebCore.xcodeproj/project.pbxproj:
3457         Update for removed files.
3458
3459         * contentextensions/ContentExtensionsBackend.cpp:
3460         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
3461         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
3462         * contentextensions/ContentExtensionsBackend.h:
3463         Remove concept of a shared instance and add a removeAllRuleLists() function.
3464         
3465         * contentextensions/ContentExtensionsInterface.cpp: Removed.
3466         * contentextensions/ContentExtensionsInterface.h: Removed.
3467         Since there is no shared instance anymore, checking if a URL should be blocked
3468         now has to go directly to the backend.
3469         
3470         * contentextensions/ContentExtensionsManager.cpp:
3471         (WebCore::ContentExtensions::ExtensionsManager::createRuleList):
3472         (WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
3473         * contentextensions/ContentExtensionsManager.h:
3474         Update interface to accommodate the lack of a shared instance. Now, all this
3475         file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
3476
3477         * loader/cache/CachedResourceLoader.cpp:
3478         (WebCore::CachedResourceLoader::requestResource):
3479         Check with the UserContentController to see if the URL should be blocked.
3480
3481         * page/UserContentController.cpp:
3482         (WebCore::UserContentController::addUserContentFilter):
3483         (WebCore::UserContentController::removeAllUserContentFilters):
3484         (WebCore::UserContentController::contentFilterBlocksURL):
3485         * page/UserContentController.h:
3486         Add single point of interaction for both the WebKit level to add and remove
3487         content filters and WebCore to check to see if URLs should be blocked.
3488
3489 2015-01-18  Darin Adler  <darin@apple.com>
3490
3491         REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
3492         https://bugs.webkit.org/show_bug.cgi?id=132148
3493
3494         Reviewed by Anders Carlsson.
3495
3496         Test: svg/custom/use-instanceRoot-event-listeners.xhtml
3497
3498         * bindings/js/JSDOMWindowCustom.cpp:
3499         (WebCore::JSDOMWindow::addEventListener): Updated for the new return type
3500         of JSListener::create. For the event type, use JSString::toAtomicString instead of
3501         calling JSString::value and then converting to an AtomicString.
3502         (WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
3503
3504         * bindings/js/JSEventListener.cpp:
3505         (WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
3506         for SVGElementInstance. In the future, for better encapsulation, we could use virtual
3507         functions, but for now hard coding this single class seems fine.
3508         (WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
3509         returns true, to find out where event listeners will be forwarded.
3510         (WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
3511         createJSAttributeEventListener, for SVGElementInstance attributes only.
3512         (WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
3513         generated code in the addElementListener bindings other than the DOMWindow one.
3514
3515         * bindings/js/JSEventListener.h:
3516         (WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
3517         (WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
3518         changed to return a RefPtr instead of a PassRefPtr and to take references rather than
3519         pointers for non-null things.
3520         (WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
3521         createJSEventListenerForAdd since they are currently identical.
3522
3523         * bindings/scripts/CodeGeneratorJS.pm:
3524         (GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
3525         and updated to call the new createJSEventListenerForAttribute. The special case for
3526         SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
3527         keep the generated code simpler if possible.
3528         (GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
3529         has been dead code since the explicit definition of add/removeEventListener was removed
3530         from SVGElementInstance.idl, and was also a problem if someone were to use the
3531         addEventListener function from EventTarget on an SVGElementInstance object. The function
3532         needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
3533         Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
3534         Those new functions properly handle SVGElementInstance.
3535         (GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
3536         or GenerateEventListenerCall any more.
3537         (GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
3538         JSString::value and then converting to AtomicString.
3539
3540 2015-01-17  Brian J. Burg  <burg@cs.washington.edu>
3541
3542         Web Inspector: highlight data for overlay should use protocol type builders
3543         https://bugs.webkit.org/show_bug.cgi?id=129441
3544
3545         Reviewed by Timothy Hatcher.
3546
3547         As a first step towards cleaning up the inspector overlay, convert highlight
3548         data construction to use protocol type builders. It's now really obvious what
3549         data is being sent to the inspector overlay page.
3550
3551         This change paves the way towards using inspector protocol commands and events
3552         if we want to support more interactive functionality in the inspector overlay.
3553
3554         This patch makes a few style cleanups, such as standardizing variable names,
3555         using default member initializers, passing by reference, and fixing casts.
3556
3557         No new tests, no behavior changed.
3558
3559         * WebCore.exp.in:
3560         * inspector/InspectorController.cpp:
3561         (WebCore::InspectorController::getHighlight):
3562         (WebCore::InspectorController::buildObjectForHighlightedNode):
3563         (WebCore::InspectorController::inspect): Deleted.
3564         * inspector/InspectorController.h:
3565         * inspector/InspectorOverlay.cpp:
3566         (WebCore::buildRendererHighlight):
3567         (WebCore::buildNodeHighlight):
3568         (WebCore::buildQuadHighlight):
3569         (WebCore::InspectorOverlay::InspectorOverlay):
3570         (WebCore::InspectorOverlay::getHighlight):
3571         (WebCore::buildObjectForPoint):
3572         (WebCore::buildObjectForRect):
3573         (WebCore::buildArrayForQuad):
3574         (WebCore::buildObjectForHighlight):
3575         (WebCore::buildObjectForRegion):
3576         (WebCore::buildObjectForFlowRegions):
3577         (WebCore::buildObjectForSize):
3578         (WebCore::buildQuadObjectForCSSRegionContentClip):
3579         Simplify how the clipping area is encoded. It's now 'regionClippingArea'
3580         stored on a FragmentHighlightData instance.
3581
3582         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
3583         (WebCore::InspectorOverlay::drawPaintRects):
3584         (WebCore::buildArrayForRendererFragments):
3585         (WebCore::appendPathCommandAndPoints):
3586         (WebCore::appendPathSegment):
3587         (WebCore::buildObjectForShapeOutside):
3588         (WebCore::buildObjectForElementData):
3589         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
3590         (WebCore::InspectorOverlay::drawNodeHighlight):
3591         (WebCore::InspectorOverlay::drawQuadHighlight):
3592         (WebCore::InspectorOverlay::reset):
3593         (WebCore::buildObjectForRegionHighlight): Deleted.
3594         (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
3595         (WebCore::buildObjectForCSSRegionContentClip): Deleted.
3596         (WebCore::buildObjectForRendererFragments): Deleted.
3597         (WebCore::buildObjectForElementInfo): Deleted.
3598         * inspector/InspectorOverlay.h:
3599         (WebCore::Highlight::Highlight):
3600         * inspector/InspectorOverlayPage.js:
3601         (_createElementTitle):
3602         (_drawElementTitle):
3603         (_drawFragmentHighlight):
3604         (drawNodeHighlight):
3605         * testing/Internals.cpp:
3606         (WebCore::Internals::inspectorHighlightRects):
3607         (WebCore::Internals::inspectorHighlightObject):
3608
3609 2015-01-17  Myles C. Maxfield  <mmaxfield@apple.com>
3610
3611         [SVG -> OTF Converter] Crashes when SVG font is invalid
3612         https://bugs.webkit.org/show_bug.cgi?id=140378
3613
3614         Reviewed by Antti Koivisto.
3615
3616         Because CachedSVGFonts are cached, they have to be able to be used
3617         in subsequent documents regardless how the first document left it.
3618
3619         Tests: fast/css/font-face-svg-decoding-error.html
3620                svg/custom/svg-fonts-in-html.html
3621                svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
3622
3623         * loader/cache/CachedFont.cpp:
3624         (WebCore::CachedFont::ensureCustomFontData):
3625         * loader/cache/CachedFont.h:
3626         * loader/cache/CachedSVGFont.cpp:
3627         (WebCore::CachedSVGFont::getFontData):
3628         (WebCore::CachedSVGFont::ensureCustomFontData):
3629         (WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
3630         * loader/cache/CachedSVGFont.h:
3631
3632 2015-01-17  Chris Dumez  <cdumez@apple.com>
3633
3634         Converting time, angle and frequency units in CSS calc() function
3635         https://bugs.webkit.org/show_bug.cgi?id=138356
3636
3637         Reviewed by Darin Adler.
3638
3639         Update CSSPrimitiveValue::primitiveType() to actually query the
3640         primitiveType of the CSSCalcValue instead of assuming a given
3641         type based on its category (e.g. If category is CalcTime, then
3642         assume type is CSS_MS, even though it would be CSS_S as well).
3643
3644         This would like to calculation errors such as:
3645         calc(4s + 1s) -> 5ms
3646
3647         Because we would assume the unit is CSS_MS without actually
3648         checking.
3649
3650         This patch is inspired by the following Blink revision
3651         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
3652         patch from <tmeszaros.u-szeged@partner.samsung.com>:
3653         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
3654
3655         Test: fast/css/calc-with-angle-time-frequency.html
3656
3657         * css/CSSCalculationValue.h:
3658         (WebCore::CSSCalcValue::primitiveType):
3659         * css/CSSPrimitiveValue.cpp:
3660         (WebCore::CSSPrimitiveValue::primitiveType):
3661
3662 2015-01-17  Chris Dumez  <cdumez@apple.com>
3663
3664         Generate shorthandForProperty() implementation from CSSPropertyNames.in
3665         https://bugs.webkit.org/show_bug.cgi?id=140556
3666
3667         Reviewed by Darin Adler.
3668
3669         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
3670         This is just a big switch() statement calling the right
3671         StylePropertyShorthand factory function for a given CSSPropertyID.
3672
3673         * css/StylePropertyShorthand.cpp:
3674         (WebCore::shorthandForProperty): Deleted.
3675         * css/StylePropertyShorthand.h:
3676         * css/makeprop.pl:
3677
3678 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
3679
3680         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
3681         https://bugs.webkit.org/show_bug.cgi?id=140564
3682         <rdar://problem/19386426.
3683
3684         Reviewed by Dean Jackson.
3685
3686         * page/mac/EventHandlerMac.mm:
3687         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
3688         back into the loop!
3689
3690 2015-01-16  Zalan Bujtas  <zalan@apple.com>
3691
3692         When border-radius is present, inset/outset/groove/ridge border color changes.
3693         https://bugs.webkit.org/show_bug.cgi?id=140551
3694
3695         Reviewed by Simon Fraser.
3696
3697         This patch applies the same color lighten/darken adjustment on the radius borders
3698         that we use for non-radius border.
3699
3700         Test: fast/borders/wrong-border-color-when-radius-is-present.html
3701
3702         * rendering/RenderBoxModelObject.cpp:
3703         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
3704         * rendering/RenderObject.cpp:
3705         (WebCore::RenderObject::calculateBorderStyleColor):
3706         * rendering/RenderObject.h:
3707
3708 2015-01-16  Pratik Solanki  <psolanki@apple.com>
3709
3710         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
3711         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
3712         https://bugs.webkit.org/show_bug.cgi?id=140470
3713
3714         Reviewed by Alexey Proskuryakov.
3715
3716         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
3717         because NSURLConnection callbacks were always being scheduled on the main thread.
3718
3719         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
3720         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
3721         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
3722         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
3723         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
3724         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
3725         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
3726
3727         * platform/network/mac/ResourceHandleMac.mm:
3728         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
3729         of this code for iOS WebKit2 with the NetworkProcess.
3730         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
3731         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
3732         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
3733         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
3734         the NetworkProcess, respectively.
3735
3736 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
3737
3738         Web Replay: purge remaining PassRefPtr uses and minor cleanup
3739         https://bugs.webkit.org/show_bug.cgi?id=140456
3740
3741         Reviewed by Andreas Kling.
3742
3743         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
3744         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
3745
3746         Remove mistaken uses of AtomicString that were not removed as part of r174113.
3747
3748         No new tests, no behavior changed.
3749
3750         * inspector/InspectorReplayAgent.cpp:
3751         (WebCore::SerializeInputToJSONFunctor::operator()):
3752         (WebCore::SerializeInputToJSONFunctor::returnValue):
3753         (WebCore::InspectorReplayAgent::sessionCreated):
3754         (WebCore::InspectorReplayAgent::sessionModified):
3755         (WebCore::InspectorReplayAgent::sessionLoaded):
3756         (WebCore::InspectorReplayAgent::segmentCreated):
3757         (WebCore::InspectorReplayAgent::segmentCompleted):
3758         (WebCore::InspectorReplayAgent::segmentLoaded):
3759         (WebCore::InspectorReplayAgent::switchSession):
3760         (WebCore::InspectorReplayAgent::insertSessionSegment):
3761         (WebCore::InspectorReplayAgent::removeSessionSegment):
3762         (WebCore::InspectorReplayAgent::findSession):
3763         (WebCore::InspectorReplayAgent::findSegment):
3764         * inspector/InspectorReplayAgent.h:
3765         * replay/CapturingInputCursor.cpp:
3766         (WebCore::CapturingInputCursor::CapturingInputCursor):
3767         (WebCore::CapturingInputCursor::create):
3768         (WebCore::CapturingInputCursor::loadInput):
3769         * replay/CapturingInputCursor.h:
3770         * replay/EventLoopInputDispatcher.cpp:
3771         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
3772         * replay/EventLoopInputDispatcher.h:
3773         * replay/FunctorInputCursor.h:
3774         (WebCore::FunctorInputCursor::FunctorInputCursor):
3775         (WebCore::FunctorInputCursor::loadInput):
3776         * replay/ReplayController.cpp:
3777         (WebCore::ReplayController::ReplayController):
3778         (WebCore::ReplayController::setForceDeterministicSettings):
3779         (WebCore::ReplayController::setSessionState):
3780         (WebCore::ReplayController::setSegmentState):
3781         (WebCore::ReplayController::switchSession):
3782         (WebCore::ReplayController::createSegment):
3783         (WebCore::ReplayController::completeSegment):
3784         (WebCore::ReplayController::loadSegmentAtIndex):
3785         (WebCore::ReplayController::unloadSegment):
3786         (WebCore::ReplayController::frameNavigated):
3787         (WebCore::ReplayController::loadedSession):
3788         (WebCore::ReplayController::loadedSegment):
3789         (WebCore::ReplayController::activeInputCursor):
3790         (WebCore::ReplayController::dispatcher):
3791         * replay/ReplayController.h:
3792         * replay/ReplaySession.cpp:
3793         (WebCore::ReplaySession::create):
3794         (WebCore::ReplaySession::at):
3795         (WebCore::ReplaySession::appendSegment):
3796         (WebCore::ReplaySession::insertSegment):
3797         (WebCore::ReplaySession::removeSegment):
3798         * replay/ReplaySession.h:
3799         * replay/ReplaySessionSegment.cpp:
3800         (WebCore::ReplaySessionSegment::create):
3801         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
3802         * replay/ReplaySessionSegment.h:
3803         * replay/ReplayingInputCursor.cpp:
3804         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
3805         (WebCore::ReplayingInputCursor::create):
3806         (WebCore::ReplayingInputCursor::loadInput):
3807         * replay/ReplayingInputCursor.h:
3808         * replay/SegmentedInputStorage.cpp:
3809         (WebCore::SegmentedInputStorage::store):
3810         (WebCore::SegmentedInputStorage::queue):
3811         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
3812         * replay/SegmentedInputStorage.h:
3813
3814 2015-01-16  Andreas Kling  <akling@apple.com>
3815
3816         Remove assertion that Page::m_editorClient is non-null.
3817
3818         Unreviewed debug build fix. (It's a reference, it won't be null.)
3819
3820         * page/Page.cpp:
3821         (WebCore::Page::Page):
3822
3823 2015-01-16  Andreas Kling  <akling@apple.com>
3824
3825         Page::editorClient() should return a reference.
3826         <https://webkit.org/b/140552>
3827
3828         Reviewed by Chris Dumez.
3829
3830         Page always has an EditorClient, so make editorClient() return a reference.
3831
3832         * editing/AlternativeTextController.cpp:
3833         (WebCore::AlternativeTextController::editorClient):
3834         (WebCore::AlternativeTextController::textChecker):
3835         * editing/Editor.cpp:
3836         (WebCore::Editor::client):
3837         * editing/SpellChecker.cpp:
3838         (WebCore::SpellChecker::client):
3839         * page/FocusController.cpp:
3840         (WebCore::FocusController::setFocusedElement):
3841         * page/Page.cpp:
3842         (WebCore::Page::Page):
3843         (WebCore::Page::~Page):
3844         (WebCore::Page::clearUndoRedoOperations):
3845         * page/Page.h:
3846         (WebCore::Page::editorClient):
3847         * page/scrolling/AsyncScrollingCoordinator.cpp:
3848         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
3849
3850 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
3851
3852         Make URL filters case-insensitive by default
3853         https://bugs.webkit.org/show_bug.cgi?id=140531
3854
3855         Reviewed by Andreas Kling.
3856
3857         Safari's filters were case-insensitive. Adopt that convention in the engine,
3858         and add a flag in case someone ever need a case-sensitive filter.
3859
3860         * contentextensions/ContentExtensionRule.h:
3861         * contentextensions/ContentExtensionsBackend.cpp:
3862         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
3863         * contentextensions/ContentExtensionsManager.cpp:
3864         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
3865         * contentextensions/URLFilterParser.cpp:
3866         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
3867         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
3868         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
3869         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
3870         (WebCore::ContentExtensions::URLFilterParser::addPattern):
3871         * contentextensions/URLFilterParser.h:
3872
3873 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
3874
3875         Add the alternative syntax for CSS Selector's descendant combinator (">>")
3876         https://bugs.webkit.org/show_bug.cgi?id=140525
3877
3878         Reviewed by Antti Koivisto.
3879
3880         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
3881         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
3882
3883         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
3884         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
3885
3886         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
3887                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
3888                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
3889                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
3890                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
3891
3892         * css/CSSGrammar.y.in:
3893         * css/CSSParserValues.cpp:
3894         (WebCore::CSSParserSelector::appendTagHistory):
3895         * css/CSSParserValues.h:
3896         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
3897         * css/CSSSelector.cpp:
3898         (WebCore::CSSSelector::selectorText):
3899         * css/CSSSelector.h:
3900         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
3901         (WebCore::CSSSelector::CSSSelector):
3902
3903 2015-01-16  Chris Dumez  <cdumez@apple.com>
3904
3905         Generate StylePropertyShorthand.* from CSSPropertyNames.in
3906         https://bugs.webkit.org/show_bug.cgi?id=140501
3907
3908         Reviewed by Darin Adler.
3909
3910         Add initial support for having makeprop.pl generate most of
3911         StylePropertyShorthand.* from CSSPropertyNames.in.
3912
3913         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
3914         more descriptive [Longhands=property1|property2|...] parameter. With
3915         this information, makeprop.pl is now able to generate the
3916         StylePropertyShorthand factories for all CSS shorthand properties
3917         in a new StylePropertyShorthandFunctions.h header.
3918
3919         The switches in StylePropertyShorthand.cpp could also be generated
3920         but this will be taken care of in follow-up patches to reduce patch
3921         size.
3922
3923         * CMakeLists.txt:
3924         * DerivedSources.make:
3925         * WebCore.vcxproj/WebCore.vcxproj:
3926         * WebCore.vcxproj/WebCore.vcxproj.filters:
3927         * WebCore.xcodeproj/project.pbxproj:
3928         * css/CSSComputedStyleDeclaration.cpp:
3929         (WebCore::ComputedStyleExtractor::propertyValue):
3930         * css/CSSParser.cpp:
3931         (WebCore::CSSParser::parseValue):
3932         * css/CSSPropertyNames.in:
3933         * css/StyleProperties.cpp:
3934         (WebCore::StyleProperties::getPropertyValue):
3935         * css/StylePropertyShorthand.cpp:
3936         (WebCore::shorthandForProperty):
3937         (WebCore::matchingShorthandsForLonghand):
3938         (WebCore::backgroundShorthand): Deleted.
3939         (WebCore::backgroundPositionShorthand): Deleted.
3940         (WebCore::backgroundRepeatShorthand): Deleted.
3941         (WebCore::borderShorthand): Deleted.
3942         (WebCore::borderBottomShorthand): Deleted.
3943         (WebCore::borderColorShorthand): Deleted.
3944         (WebCore::borderImageShorthand): Deleted.
3945         (WebCore::borderLeftShorthand): Deleted.
3946         (WebCore::borderRadiusShorthand): Deleted.
3947         (WebCore::webkitBorderRadiusShorthand): Deleted.
3948         (WebCore::borderRightShorthand): Deleted.
3949         (WebCore::borderSpacingShorthand): Deleted.
3950         (WebCore::borderStyleShorthand): Deleted.
3951         (WebCore::borderTopShorthand): Deleted.
3952         (WebCore::borderWidthShorthand): Deleted.
3953         (WebCore::listStyleShorthand): Deleted.
3954         (WebCore::marginShorthand): Deleted.
3955         (WebCore::markerShorthand): Deleted.
3956         (WebCore::outlineShorthand): Deleted.
3957         (WebCore::overflowShorthand): Deleted.
3958         (WebCore::paddingShorthand): Deleted.
3959         (WebCore::transitionShorthand): Deleted.
3960         (WebCore::animationShorthand): Deleted.
3961         (WebCore::webkitAnimationShorthand): Deleted.
3962         (WebCore::webkitBorderAfterShorthand): Deleted.
3963         (WebCore::webkitBorderBeforeShorthand): Deleted.
3964         (WebCore::webkitBorderEndShorthand): Deleted.
3965         (WebCore::webkitBorderStartShorthand): Deleted.
3966         (WebCore::webkitColumnsShorthand): Deleted.
3967         (WebCore::webkitColumnRuleShorthand): Deleted.
3968         (WebCore::flexFlowShorthand): Deleted.
3969         (WebCore::flexShorthand): Deleted.
3970         (WebCore::webkitMarginCollapseShorthand): Deleted.
3971         (WebCore::webkitGridShorthand): Deleted.
3972         (WebCore::webkitGridTemplateShorthand): Deleted.
3973         (WebCore::webkitGridAreaShorthand): Deleted.
3974         (WebCore::webkitGridColumnShorthand): Deleted.
3975         (WebCore::webkitGridRowShorthand): Deleted.
3976         (WebCore::webkitMarqueeShorthand): Deleted.
3977         (WebCore::webkitMaskShorthand): Deleted.
3978         (WebCore::webkitMaskPositionShorthand): Deleted.
3979         (WebCore::webkitMaskRepeatShorthand): Deleted.
3980         (WebCore::webkitTextDecorationShorthand): Deleted.
3981         (WebCore::webkitTextEmphasisShorthand): Deleted.
3982         (WebCore::webkitTextStrokeShorthand): Deleted.
3983         (WebCore::webkitTransitionShorthand): Deleted.
3984         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
3985         (WebCore::webkitTransformOriginShorthand): Deleted.
3986         * css/StylePropertyShorthand.h:
3987         * css/makeprop.pl:
3988
3989 2015-01-16  Commit Queue  <commit-queue@webkit.org>
3990
3991         Unreviewed, rolling out r178532.
3992         https://bugs.webkit.org/show_bug.cgi?id=140548
3993
3994         Broke fast/css/parsing-css-lang.html on some bots (Requested
3995         by ap on #webkit).
3996
3997         Reverted changeset:
3998
3999         "Canonicalization of :lang() should preserve the :lang()'s
4000         arguments representations"
4001         https://bugs.webkit.org/show_bug.cgi?id=139928
4002         http://trac.webkit.org/changeset/178532
4003
4004 2015-01-16  Commit Queue  <commit-queue@webkit.org>
4005
4006         Unreviewed, rolling out r178577.
4007         https://bugs.webkit.org/show_bug.cgi?id=140546
4008
4009         Broke fast/css-grid-layout/grid-content-sized-columns-
4010         resolution.html (Requested by ap on #webkit).
4011
4012         Reverted changeset:
4013
4014         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
4015         remaining space"
4016         https://bugs.webkit.org/show_bug.cgi?id=139059
4017         http://trac.webkit.org/changeset/178577
4018
4019 2015-01-16  Andreas Kling  <akling@apple.com>
4020
4021         Some improvements to RuleSet shrinking.
4022         <https://webkit.org/b/140534>
4023
4024         Reviewed by Antti Koivisto.
4025
4026         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
4027         The vast majority of Vectors have only a single entry, and this
4028         avoids having to allocate a separate Vector backing store for them.
4029
4030         Also make sure to shrink some Vectors that we weren't already,
4031         like those in RuleFeatureSet.