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