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