Try to fix the iOS build.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-29  Sam Weinig  <sam@webkit.org>
2
3         Try to fix the iOS build.
4
5         * WebCore.exp.in:
6
7 2015-01-29  Brent Fulgham  <bfulgham@apple.com>
8
9         [Win] Build fix after r179368.
10
11         * platform/graphics/win/UniscribeController.cpp:
12         (WebCore::UniscribeController::shapeAndPlaceItem): Don't use the no longer
13         valid isPrinterFont method.
14
15 2015-01-29  Tim Horton  <timothy_horton@apple.com>
16
17         Fix the build after r179368
18
19         * platform/graphics/FontDescription.h:
20         (WebCore::FontDescription::equalForTextAutoSizing):
21
22 2015-01-29  Simon Fraser  <simon.fraser@apple.com>
23
24         Border-radius clipping on a stacking context causes descendants to not render
25         https://bugs.webkit.org/show_bug.cgi?id=140536
26
27         Reviewed by Zalan Bujtas.
28         
29         Fix one of the issues introduced in r178029. The changes in GraphicsLayerCA
30         failed to adhere to the "set a bit and flush later" pattern that this class uses,
31         instead poking the platform layers directly. This caused an issue where the bounds
32         of the clipping layer would later be set to 0x0, causing content to disappear.
33         
34         Fix by changing the "applyClippingBorder" function to "setMasksToBoundsRect"
35         and have it update via a new MasksToBoundsRectChanged dirty bit.
36
37         In order to avoid clobbering the mask layer used to clip contents, we need another
38         shape mask layer, so rename m_shapeMaskLayer to m_contentsShapeMaskLayer, then
39         introduce a new m_shapeMaskLayer which is used for masks-to-bounds clipping. Update
40         the reflection cloning code to correctly clone this layer.
41
42         Test: compositing/clipping/border-radius-stacking-context-clip.html
43
44         * WebCore.exp.in:
45         * platform/graphics/GraphicsLayer.h:
46         (WebCore::GraphicsLayer::maskToBoundsRect):
47         (WebCore::GraphicsLayer::setMasksToBoundsRect):
48         (WebCore::GraphicsLayer::applyClippingBorder): Deleted.
49         (WebCore::GraphicsLayer::clearClippingBorder): Deleted.
50         * platform/graphics/ca/GraphicsLayerCA.cpp:
51         (WebCore::GraphicsLayerCA::willBeDestroyed):
52         (WebCore::GraphicsLayerCA::setMasksToBoundsRect):
53         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
54         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
55         (WebCore::GraphicsLayerCA::updateContentsImage):
56         (WebCore::GraphicsLayerCA::updateContentsRects):
57         (WebCore::GraphicsLayerCA::updateMasksToBoundsRect):
58         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
59         (WebCore::GraphicsLayerCA::applyClippingBorder): Deleted.
60         (WebCore::GraphicsLayerCA::clearClippingBorder): Deleted.
61         * platform/graphics/ca/GraphicsLayerCA.h:
62         * rendering/RenderLayerBacking.cpp:
63         (WebCore::RenderLayerBacking::updateChildClippingStrategy): Add a FIXME since
64         this code is trying to access geometry and we may not have done layout yet.
65         Also, to clear the rounded rect, just set a non-rounded rect the size of the layer.
66
67 2015-01-29  Sam Weinig  <sam@webkit.org>
68
69         Remove support for screen font substitution
70         https://bugs.webkit.org/show_bug.cgi?id=141038
71
72         Reviewed by Tim Horton.
73
74         - Removes the screen font substitution setting (which was only on in Mountain Lion)
75         - Remove the concept of a printer font, from the family of Font related classes.
76
77         * WebCore.exp.in:
78         * css/StyleResolver.cpp:
79         (WebCore::StyleResolver::initializeFontStyle):
80         * page/Settings.cpp:
81         (WebCore::Settings::Settings):
82         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
83         (WebCore::Settings::setScreenFontSubstitutionEnabled): Deleted.
84         * page/Settings.h:
85         (WebCore::Settings::screenFontSubstitutionEnabled): Deleted.
86         * page/mac/SettingsMac.mm:
87         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
88         * platform/graphics/FontCache.h:
89         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
90         * platform/graphics/FontCascade.cpp:
91         (WebCore::FontCascade::FontCascade):
92         * platform/graphics/FontCascade.h:
93         (WebCore::FontCascade::isPrinterFont): Deleted.
94         * platform/graphics/FontDescription.h:
95         (WebCore::FontDescription::FontDescription):
96         (WebCore::FontDescription::setWeight):
97         (WebCore::FontDescription::equalForTextAutoSizing):
98         (WebCore::FontDescription::operator==):
99         (WebCore::FontDescription::usePrinterFont): Deleted.
100         (WebCore::FontDescription::setUsePrinterFont): Deleted.
101         * platform/graphics/FontPlatformData.h:
102         (WebCore::FontPlatformData::isCompositeFontReference):
103         (WebCore::FontPlatformData::hash):
104         (WebCore::FontPlatformData::operator==):
105         (WebCore::FontPlatformData::isPrinterFont): Deleted.
106         * platform/graphics/WidthIterator.h:
107         (WebCore::WidthIterator::supportsTypesettingFeatures):
108         * platform/graphics/cocoa/FontCascadeCocoa.mm:
109         (WebCore::FontCascade::drawGlyphs):
110         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
111         (WebCore::FontPlatformData::FontPlatformData):
112         (WebCore::FontPlatformData::platformDataInit):
113         (WebCore::FontPlatformData::platformDataAssign):
114         * platform/graphics/ios/FontCacheIOS.mm:
115         (WebCore::FontCache::getSystemFontFallbackForCharacters):
116         (WebCore::FontCache::createFontPlatformData):
117         * platform/graphics/ios/SimpleFontDataIOS.mm:
118         (WebCore::Font::platformCreateScaledFont):
119         * platform/graphics/mac/ComplexTextController.cpp:
120         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
121         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
122         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
123         * platform/graphics/mac/FontCacheMac.mm:
124         (WebCore::FontCache::systemFallbackForCharacters):
125         (WebCore::FontCache::createFontPlatformData):
126         * platform/graphics/mac/SimpleFontDataMac.mm:
127         (WebCore::Font::compositeFontReferenceFont):
128         (WebCore::Font::platformCreateScaledFont):
129         * platform/mac/DragImageMac.mm:
130         (WebCore::fontFromNSFont):
131         (WebCore::widthWithFont):
132         (WebCore::drawAtPoint):
133         * style/StyleResolveForDocument.cpp:
134         (WebCore::Style::resolveForDocument):
135
136 2015-01-20  David Hyatt  <hyatt@apple.com>
137
138         Japanese line breaking rules need to be respected before and after Ruby.
139         https://bugs.webkit.org/show_bug.cgi?id=91588
140         <rdar://problem/17306535>
141
142         Reviewed by Dean Jackson.
143
144         Added fast/ruby/ruby-punctuation-avoid-breaking.html.
145
146         This patch has to add support for following line breaking rules at both
147         sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
148         just hard-code the rules (and apply this hard-coding only to Ruby and not
149         to other inline replaced elements).
150
151         For breaking after a Ruby we do better. The Ruby run caches its prior characters
152         and line layout is able to obtain them and use them when deciding whether or not
153         to break. This means for the "after" side of a Ruby, we're able to behave the same
154         as if no Ruby was used.
155
156         * rendering/RenderBlockFlow.h:
157         (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):
158         * rendering/RenderBlockLineLayout.cpp:
159         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
160         * rendering/RenderRubyBase.cpp:
161         (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):
162         * rendering/RenderRubyBase.h:
163         * rendering/RenderRubyRun.cpp:
164         (WebCore::RenderRubyRun::RenderRubyRun):
165         (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
166         (WebCore::RenderRubyRun::canBreakBefore):
167         * rendering/RenderRubyRun.h:
168         * rendering/RenderRubyText.cpp:
169         (WebCore::RenderRubyText::canBreakBefore):
170         * rendering/RenderRubyText.h:
171         * rendering/line/BreakingContextInlineHeaders.h:
172         (WebCore::BreakingContext::handleReplaced):
173         (WebCore::BreakingContext::canBreakAtThisPosition):
174         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
175
176 2015-01-28  Beth Dakin  <bdakin@apple.com>
177
178         Remove more Mountain Lion code from WebCore
179         https://bugs.webkit.org/show_bug.cgi?id=141014
180
181         Reviewed by Anders Carlsson.
182
183         * WebCore.exp.in:
184         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
185         (AXAttributeStringSetSpelling):
186         (AXAttributedStringAppendText):
187         * crypto/CommonCryptoUtilities.h:
188         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
189         (WebCore::transformAES_CBC):
190         * editing/cocoa/HTMLConverter.mm:
191         (_dateForString):
192         * html/canvas/ANGLEInstancedArrays.cpp:
193         (WebCore::ANGLEInstancedArrays::supported):
194         * loader/cocoa/DiskCacheMonitorCocoa.mm:
195         * page/mac/SettingsMac.mm:
196         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
197         (WebCore::Settings::initializeDefaultFontFamilies):
198         * platform/audio/mac/MediaSessionManagerMac.cpp:
199         (MediaSessionManager::updateSessionState):
200         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
201         (WebCore::MemoryPressureHandler::install):
202         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
203         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted.
204         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
205         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
206         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
207         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
208         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
209         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
210         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
211         * platform/graphics/cocoa/IOSurface.mm:
212         (IOSurface::state):
213         (IOSurface::isVolatile):
214         (IOSurface::setIsVolatile):
215         * platform/graphics/mac/SimpleFontDataMac.mm:
216         (WebCore::Font::platformInit):
217         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
218         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
219         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
220         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
221         * platform/mac/WebCoreSystemInterface.h:
222         * platform/mac/WebCoreSystemInterface.mm:
223         * platform/network/cf/ResourceHandleCFNet.cpp:
224         (WebCore::ResourceHandle::createCFURLConnection):
225         * platform/network/cocoa/ProtectionSpaceCocoa.h:
226         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
227         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
228         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
229         * platform/network/mac/ResourceHandleMac.mm:
230         (WebCore::ResourceHandle::createNSURLConnection):
231         * platform/network/mac/WebCoreURLResponse.mm:
232         (WebCore::synthesizeRedirectResponseIfNecessary):
233         * platform/spi/cf/CFNetworkSPI.h:
234         * platform/text/mac/LocaleMac.mm:
235         (WebCore::LocaleMac::LocaleMac):
236
237 2015-01-29  Benjamin Poulain  <bpoulain@apple.com>
238
239         Remove an extraneous check from the parser of :not()
240         https://bugs.webkit.org/show_bug.cgi?id=141021
241
242         Reviewed by Darin Adler.
243
244         * css/CSSGrammar.y.in:
245         :not() takes a selector list, it can be null if there selector list is invalid,
246         but there cannot be a invalid pointer.
247
248 2015-01-29  Tim Horton  <timothy_horton@apple.com>
249
250         Fix the iOS build after r179347
251
252         * loader/FrameLoader.cpp:
253         (WebCore::FrameLoader::commitProvisionalLoad):
254
255 2015-01-29  Andreas Kling  <akling@apple.com>
256
257         JavaScript bindings constructors should take Ref<ImplType>&&.
258         <https://webkit.org/b/140952>
259
260         Reviewed by Darin Adler.
261
262         When constructing a JS wrapper object, there is always going to be a
263         corresponding DOM object.
264
265         Tweak the JavaScript DOM bindings generator to spit out constructors
266         that take the DOM object by Ref&& rather than PassRefPtr.
267
268         This avoids generating unnecessary null checks around every instance
269         of wrapper construction.
270
271         * bindings/js/JSDOMBinding.h:
272         (WebCore::createWrapper):
273         * bindings/js/JSDOMWindowShell.cpp:
274         (WebCore::JSDOMWindowShell::setWindow):
275         * bindings/js/JSDocumentCustom.cpp:
276         (WebCore::JSDocument::location):
277         * bindings/scripts/CodeGeneratorJS.pm:
278         (GenerateHeader):
279         (GenerateImplementation):
280
281 2015-01-29  Chris Dumez  <cdumez@apple.com>
282
283         Clean up / modernize PageCache class
284         https://bugs.webkit.org/show_bug.cgi?id=141009
285
286         Reviewed by Darin Adler.
287
288         Clean up / modernize PageCache class:
289         - Use more references instead of pointers
290         - Use a ListHashSet<Ref<HistoryItem>> internally instead of a linked
291           list of HistoryItem*. This avoids having the ref/unref HistoryItems
292           manually and maintaining the list size separately. It also simplifies
293           the code dealing with the container and makes looking up HistoryItems
294           faster as a bonus. Similarly to the previous implementation, we are
295           adding elements to one end and removing from the opposite end when
296           pruning to drop old history items first. Note that even though the
297           previous implementation was called LRUList, it did not move items to
298           the front when accessed. The new implementation doesn't either.
299          - Rename "capacity" to "maxSize" to avoid confusing with containers'
300            capacity (which doesn't limit the size of the container).
301          - Use unsigned instead of int for all values that are supposed to be
302            positive.
303          - Do not explicitely define the default constructor and let the
304            compiler generate it for us (and use in-class initialization for
305            members)
306          - Fix indentation in the header.
307
308 2015-01-29  Julien Isorce  <j.isorce@samsung.com>
309
310         HTMLImageLoader: fix build failure on assert condition after r179340
311         https://bugs.webkit.org/show_bug.cgi?id=140722
312
313         Reviewed by Csaba Osztrogonác.
314
315         * html/HTMLImageLoader.cpp:
316         (WebCore::HTMLImageLoader::imageChanged): image() directly
317         returns a CachedImage*.
318
319 2015-01-29  Julien Isorce  <j.isorce@samsung.com>
320
321         CachedImage: ensure clients overrides imageChanged instead of notifyFinished
322         https://bugs.webkit.org/show_bug.cgi?id=140722
323
324         Reviewed by Tim Horton.
325
326         imageChanged is called whenever a frame of an image changes
327         because we got more data from the network.
328
329         notifyFinished was called when the image was entirely loaded.
330
331         The problem was that some clients were implementing only
332         imageChanged (ex: RenderBox), some only notifyFinished and
333         some both (ex: RenderImage) which made the situation difficult
334         to understand and to maintain.
335
336         For example when the image finished loading, both imageChanged
337         and notifyFinished were called with the difference that for the
338         first one isLoaded() returned false.
339         It could result in functions being called twice in a row,
340         ex: contentChanged(ImageChanged).
341
342         So this patch tries to simplify the situation by marking
343         CachedImageClient::notifyFinished final in order to prevent
344         clients from implementing it.
345         Indeed this patch ensure that CachedImage clients implement
346         and only implement imageChanged function.
347
348         Also Clients can now differentiate intermediate and end
349         calls by checking isLoaded() in imageChanged.
350
351         * html/HTMLImageLoader.cpp:
352         (WebCore::HTMLImageLoader::imageChanged): Added instead
353         of notifyFinished.
354         (WebCore::HTMLImageLoader::notifyFinished): Deleted.
355         * html/HTMLImageLoader.h:
356
357         * loader/ImageLoader.cpp:
358         (WebCore::ImageLoader::imageChanged): Added instead
359         of notifyFinished.
360         (WebCore::ImageLoader::notifyFinished): Deleted.
361         * loader/ImageLoader.h:
362
363         * loader/cache/CachedImage.cpp:
364         (WebCore::CachedImage::finishLoading): Explicilty mark image as
365         loaded and before notifying observers. So that it avoids to call
366         notifyFinished (from CachedResource::finishLoading).
367
368         * loader/cache/CachedImageClient.h:
369         Make CachedImageClient::notifyFinished final to make sure
370         sub classes implement imageChanged instead.
371
372         * rendering/RenderImage.cpp:
373         (WebCore::RenderImage::notifyFinished): Deleted.
374         ImageChanged already exists and is more clever than notifyFinished.
375         Indeed invalidateBackgroundObscurationStatus() will be called by
376         RenderReplaced::layout() upon call to setNeedsLayout() in
377         RenderImage::imageDimensionsChanged.
378         Also contentChanged(ImageChanged) is now called only when necessary.
379         * rendering/RenderImage.h:
380
381         * svg/SVGFEImageElement.cpp:
382         (WebCore::SVGFEImageElement::imageChanged): Added instead
383         of notifyFinished.
384         (WebCore::SVGFEImageElement::notifyFinished): Deleted.
385         * svg/SVGFEImageElement.h:
386
387 2015-01-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
388
389         Poor performance on IE's Chalkboard benchmark.
390         https://bugs.webkit.org/show_bug.cgi?id=140753.
391
392         Reviewed by Zalan Bujtas.
393
394         Test: PerformanceTests/SVG/UnderTheSeeBenchmark.html
395               PerformanceTests/SVG/WorldcupBenchmark.html
396               
397         The SVG rendering code was not skipping the SVG elements which are outside the
398         clipping rectangle. We were drawing all the SVG elements even if some of them
399         are completely outside the clipping rectangle. The fix is to pass the correct
400         dirty rectangle to the ScrollView which then gets propagated to the SVG renderers.
401
402         * svg/graphics/SVGImage.cpp:
403         (WebCore::SVGImage::draw):
404         SVGImage::draw() needs to pass the intersection of 'srcRect' and context->clipBounds(),
405         to ScrollView::paint(). This will ensure RenderSVGShape::paint() gets the correct
406         clipping rectangle. If there is no intersection between the boundingBox of the
407         RenderSVGShape and the clipping rectangle, the RenderSVGShape will not be drawn.
408
409 2015-01-28  Brent Fulgham  <bfulgham@apple.com>
410
411         Scroll snap points do not work in the vertical direction
412         https://bugs.webkit.org/show_bug.cgi?id=141001
413         <rdar://problem/19632089>
414
415         Reviewed by Beth Dakin.
416
417         New scroll snap tests are being prepared separately. A manual test case is attached to the issue.
418
419         * page/EventHandler.cpp:
420         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): We want to consider momentum end phase
421         when dealing with Scroll Snap Points.
422         * platform/mac/AxisScrollSnapAnimator.mm:
423         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): We do NOT want to bail out early here. In fact, it's strange
424         that this code was like this at all, since it meant a large number of cases were not being used. We also want to
425         trigger the scroll snap animation (when applicable) upon an inertia scroll end.
426         * platform/mac/ScrollAnimatorMac.mm:
427         (WebCore::gestureShouldBeginSnap): Added.
428         (WebCore::ScrollAnimatorMac::allowsVerticalStretching): If we have automatic elasticity, and we have active scroll
429         snap points, we want to let the scroll snap animator deal with the gesture.
430         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching): Ditto.
431
432 2015-01-28  Benjamin Poulain  <bpoulain@apple.com>
433
434         Start fixing the handling of Element's attributes when they contain non-ASCII characters
435         https://bugs.webkit.org/show_bug.cgi?id=141016
436
437         Reviewed by Ryosuke Niwa.
438
439         Attribute handling does not work properly when the attribute name contains non-ASCII character.
440
441         The HTML parser tokenize those names as ASCII lowercase. Some of the code is CSS and Element use
442         unicode lowercase for the names. This breaks all the APIs as soon as a name contains a character
443         that is non-ASCII and uppercase since some APIs change it, other don't.
444
445         This patch is a first step toward fixing this mess, it only address the simple cases.
446         The HTML spec says the names should be compared ASCII case-insensitive, to I spread that behavior
447         to places that were using unicode.
448
449         Tests: fast/css/attribute-ascii-case-insensitive-html.html
450                fast/css/attribute-ascii-case-insensitive-xhtml-expected.xhtml
451                fast/css/attribute-ascii-case-insensitive-xhtml.xhtml
452                fast/css/attribute-ascii-case-insensitive-xml-in-html.html
453                fast/dom/Element/attribute-ascii-case-insensitive-1.html
454                fast/dom/Element/attribute-ascii-case-insensitive-2.html
455                fast/selectors/attribute-ascii-case-insensitive-style-update.html
456                fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html
457                fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html
458
459         * css/CSSSelector.cpp:
460         (WebCore::CSSSelector::setAttribute):
461         * dom/Element.cpp:
462         (WebCore::Element::synchronizeAttribute):
463         (WebCore::Element::setAttribute):
464         (WebCore::Element::removeAttribute):
465         (WebCore::Element::hasAttribute):
466         * dom/ElementData.cpp:
467         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
468         * dom/ElementData.h:
469         (WebCore::ElementData::findAttributeIndexByName):
470
471 2015-01-28  Zalan Bujtas  <zalan@apple.com>
472
473         Simple line layout: Drop uncommitted/committed terms from LineState.
474         https://bugs.webkit.org/show_bug.cgi?id=141005
475
476         Reviewed by Antti Koivisto.
477
478         Fragments form segments and segments turn into runs on the lines.
479         We add fragments only when they fit so they should not be in 'uncommitted' state at all.
480
481         No change in functionality.
482
483         * rendering/SimpleLineLayout.cpp:
484         (WebCore::SimpleLineLayout::LineState::createRun):
485         (WebCore::SimpleLineLayout::LineState::addFragment):
486         (WebCore::SimpleLineLayout::LineState::addWhitespace):
487         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
488         (WebCore::SimpleLineLayout::LineState::width):
489         (WebCore::SimpleLineLayout::LineState::firstCharacterFits):
490         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
491         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
492         (WebCore::SimpleLineLayout::firstFragment):
493         (WebCore::SimpleLineLayout::createLineRuns):
494         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
495         (WebCore::SimpleLineLayout::createTextRuns): Unnecessary assert.
496         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Deleted.
497         (WebCore::SimpleLineLayout::LineState::addUncommitted): Deleted.
498         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted.
499
500 2015-01-28  Chris Dumez  <cdumez@apple.com>
501
502         Regression(r177494): Bad cast to WebKitCSSResourceValue in StyleBuilderConverter::convertMaskImageOperations()
503         https://bugs.webkit.org/show_bug.cgi?id=140991
504         <rdar://problem/19625305>
505
506         Reviewed by Antti Koivisto.
507
508         convertMaskImageOperations() was assuming that the CSSValueList's values
509         were always WebKitCSSResourceValue values. However, they can be
510         CSSInitialValues as well so we should check before casting.
511
512         Test: css3/masking/mask-image-initial-value-crash.html
513
514         * css/StyleBuilderConverter.h:
515         (WebCore::maskImageValueFromIterator):
516         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
517
518 2015-01-28  Chris Dumez  <cdumez@apple.com>
519
520         Remove dead code from MemoryCache
521         https://bugs.webkit.org/show_bug.cgi?id=140964
522
523         Reviewed by Andreas Kling.
524
525         Remove dead code from MemoryCache, make more things private and
526         clean up a little bit.
527
528         * WebCore.exp.in:
529         * inspector/InspectorResourceAgent.cpp:
530         * loader/cache/MemoryCache.cpp:
531         (WebCore::MemoryCache::MemoryCache):
532         (WebCore::MemoryCache::revalidationSucceeded):
533         (WebCore::MemoryCache::removeImageFromCache):
534         (WebCore::MemoryCache::pruneLiveResources):
535         (WebCore::MemoryCache::pruneDeadResources):
536         (WebCore::MemoryCache::pruneDeadResourcesToSize):
537         (WebCore::MemoryCache::remove):
538         (WebCore::MemoryCache::removeRequestFromSessionCaches):
539         (WebCore::MemoryCache::setDisabled):
540         (WebCore::MemoryCache::resourceForURL): Deleted.
541         (WebCore::MemoryCache::pruneLiveResourcesToPercentage): Deleted.
542         (WebCore::MemoryCache::pruneDeadResourcesToPercentage): Deleted.
543         (WebCore::MemoryCache::evict): Deleted.
544         (WebCore::MemoryCache::removeUrlFromCache): Deleted.
545         (WebCore::MemoryCache::removeRequestFromCache): Deleted.
546         (WebCore::MemoryCache::pruneToPercentage): Deleted.
547         * loader/cache/MemoryCache.h:
548         (WebCore::MemoryCache::LRUList::LRUList): Deleted.
549         (WebCore::MemoryCache::remove): Deleted.
550         (WebCore::MemoryCache::setPruneEnabled): Deleted.
551         (WebCore::MemoryCache::minDeadCapacity): Deleted.
552         (WebCore::MemoryCache::maxDeadCapacity): Deleted.
553         (WebCore::MemoryCache::capacity): Deleted.
554         (WebCore::MemoryCache::liveSize): Deleted.
555         (WebCore::MemoryCache::deadSize): Deleted.
556         * platform/MemoryPressureHandler.cpp:
557         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
558
559 2015-01-28  Brian J. Burg  <burg@cs.washington.edu>
560
561         Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
562         https://bugs.webkit.org/show_bug.cgi?id=140961
563
564         Reviewed by Timothy Hatcher.
565
566         No new tests, no behavior changed.
567
568         * CMakeLists.txt:
569         * WebCore.vcxproj/WebCore.vcxproj:
570         * WebCore.vcxproj/WebCore.vcxproj.filters:
571         * WebCore.xcodeproj/project.pbxproj:
572         * inspector/InspectorAllInOne.cpp:
573         * inspector/InspectorCSSAgent.cpp:
574         (WebCore::InspectorCSSAgent::setPropertyText): Deleted.
575         (WebCore::InspectorCSSAgent::toggleProperty): Deleted.
576         * inspector/InspectorCSSAgent.h:
577         * inspector/InspectorStyleSheet.cpp:
578         (WebCore::InspectorStyle::InspectorStyle):
579         (WebCore::InspectorStyle::populateAllProperties):
580         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
581         (WebCore::InspectorStyleSheet::reparseStyleSheet):
582         (WebCore::InspectorStyleSheet::inspectorStyleForId):
583         (WebCore::InspectorStyle::setPropertyText): Deleted.
584         (WebCore::InspectorStyle::toggleProperty): Deleted.
585         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Deleted.
586         (WebCore::InspectorStyleSheet::setPropertyText): Deleted.
587         (WebCore::InspectorStyleSheet::toggleProperty): Deleted.
588         (WebCore::InspectorStyleSheet::rememberInspectorStyle): Deleted.
589         (WebCore::InspectorStyleSheet::forgetInspectorStyle): Deleted.
590         (WebCore::InspectorStyleSheet::revalidateStyle): Deleted.
591         * inspector/InspectorStyleSheet.h:
592         * inspector/InspectorStyleTextEditor.cpp: Removed.
593         * inspector/InspectorStyleTextEditor.h: Removed.
594
595 2015-01-28  Zalan Bujtas  <zalan@apple.com>
596
597         Simple line layout: Move FlowContents iterator interface to FlowContentsIterator.
598         https://bugs.webkit.org/show_bug.cgi?id=140944
599
600         Reviewed by Antti Koivisto.
601
602         This patch cleans up FlowContents's interface by moving the iterator functionality
603         to this new FlowContentsIterator class.
604
605         No change in functionality.
606
607         * CMakeLists.txt:
608         * WebCore.vcxproj/WebCore.vcxproj:
609         * WebCore.vcxproj/WebCore.vcxproj.filters:
610         * WebCore.xcodeproj/project.pbxproj:
611         * rendering/SimpleLineLayout.cpp:
612         (WebCore::SimpleLineLayout::LineState::addUncommitted):
613         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
614         (WebCore::SimpleLineLayout::preWrap):
615         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
616         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
617         (WebCore::SimpleLineLayout::firstFragment):
618         (WebCore::SimpleLineLayout::createLineRuns):
619         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
620         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
621         (WebCore::SimpleLineLayout::createTextRuns):
622         * rendering/SimpleLineLayoutFlowContents.cpp:
623         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
624         (WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted.
625         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment): Deleted.
626         (WebCore::SimpleLineLayout::nextBreakablePosition): Deleted.
627         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): Deleted.
628         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
629         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): Deleted.
630         (WebCore::SimpleLineLayout::FlowContents::textWidth): Deleted.
631         (WebCore::SimpleLineLayout::FlowContents::runWidth): Deleted.
632         * rendering/SimpleLineLayoutFlowContents.h:
633         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator):
634         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
635         (WebCore::SimpleLineLayout::FlowContents::begin):
636         (WebCore::SimpleLineLayout::FlowContents::end):
637         (WebCore::SimpleLineLayout::FlowContents::length):
638         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++):
639         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==):
640         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=):
641         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition):
642         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment): Deleted.
643         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty): Deleted.
644         (WebCore::SimpleLineLayout::FlowContents::hasOneSegment): Deleted.
645         (WebCore::SimpleLineLayout::FlowContents::style): Deleted.
646         (WebCore::SimpleLineLayout::FlowContents::characterAt): Deleted.
647         (WebCore::SimpleLineLayout::FlowContents::isLineBreak): Deleted.
648         (WebCore::SimpleLineLayout::FlowContents::isEnd): Deleted.
649         * rendering/SimpleLineLayoutFlowContentsIterator.cpp: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp.
650         (WebCore::SimpleLineLayout::FlowContentsIterator::Style::Style):
651         (WebCore::SimpleLineLayout::FlowContentsIterator::FlowContentsIterator):
652         (WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):
653         (WebCore::SimpleLineLayout::FlowContentsIterator::textWidth):
654         (WebCore::SimpleLineLayout::nextBreakablePosition):
655         (WebCore::SimpleLineLayout::FlowContentsIterator::findNextBreakablePosition):
656         (WebCore::SimpleLineLayout::findNextNonWhitespace):
657         (WebCore::SimpleLineLayout::FlowContentsIterator::findNextNonWhitespacePosition):
658         (WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):
659         * rendering/SimpleLineLayoutFlowContentsIterator.h: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.h.
660         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
661         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):
662         (WebCore::SimpleLineLayout::FlowContentsIterator::style):
663         (WebCore::SimpleLineLayout::FlowContentsIterator::segmentForPosition):
664         (WebCore::SimpleLineLayout::FlowContentsIterator::characterAt):
665         (WebCore::SimpleLineLayout::FlowContentsIterator::isLineBreak):
666         (WebCore::SimpleLineLayout::FlowContentsIterator::isEnd):
667
668 2015-01-28  Beth Dakin  <bdakin@apple.com>
669
670         Remove Mountain Lion code from WebCore
671         https://bugs.webkit.org/show_bug.cgi?id=141007
672
673         Reviewed by Sam Weinig.
674
675         * WebCore.exp.in:
676         * page/AlternativeTextClient.h:
677         * page/mac/SettingsMac.mm:
678         (WebCore::Settings::initializeDefaultFontFamilies):
679         * platform/cocoa/SystemVersion.mm:
680         (WebCore::callGestalt): Deleted.
681         (WebCore::createSystemMarketingVersion): Deleted.
682         * platform/graphics/Font.cpp:
683         (WebCore::Font::applyTransforms):
684         * platform/graphics/WidthIterator.h:
685         (WebCore::WidthIterator::supportsTypesettingFeatures):
686         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
687         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
688         * platform/graphics/ca/GraphicsLayerCA.cpp:
689         (WebCore::supportsAcceleratedFilterAnimations):
690         * platform/graphics/ca/PlatformCAFilters.h:
691         * platform/graphics/mac/FontCacheMac.mm:
692         (WebCore::FontCache::platformInit):
693         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
694         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
695         * platform/mac/PlatformEventFactoryMac.mm:
696         (WebCore::phaseForEvent):
697         * platform/mac/WebCoreSystemInterface.h:
698         * platform/mac/WebCoreSystemInterface.mm:
699         * platform/network/cf/SocketStreamHandleCFNet.cpp:
700         (WebCore::SocketStreamHandle::createStreams):
701         * platform/network/cocoa/CredentialCocoa.mm:
702         (WebCore::toCredentialPersistence):
703         * platform/spi/cocoa/CoreTextSPI.h:
704
705 2015-01-28  peavo@outlook.com  <peavo@outlook.com>
706
707         [WinCairo] Compile error in media player implementation.
708         https://bugs.webkit.org/show_bug.cgi?id=141004
709
710         Reviewed by Brent Fulgham.
711
712         MediaPlayer::cachedResourceLoader() returns a pointer to the resource loader, not a reference.
713
714         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
715         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
716         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
717
718 2015-01-28  Jeremy Jones  <jeremyj@apple.com>
719
720         Prevent implicit animation when setting fullscreen background to clear.
721         https://bugs.webkit.org/show_bug.cgi?id=140888
722
723         Reviewed by Eric Carlson.
724
725         This patch decreases flicker when exiting fullscreen by preventing
726         an implicit animation when changing the background to clear.
727
728         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
729         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
730
731 2015-01-28  Dana Burkart  <dburkart@apple.com>
732
733         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
734         https://bugs.webkit.org/show_bug.cgi?id=136765
735
736         Reviewed by Alexey Proskuryakov.
737
738         * Configurations/Base.xcconfig:
739         * Configurations/DebugRelease.xcconfig:
740         * WebCore.xcodeproj/project.pbxproj:
741
742 2015-01-28  Chris Dumez  <cdumez@apple.com>
743
744         Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
745         https://bugs.webkit.org/show_bug.cgi?id=140981
746
747         Reviewed by Darin Adler.
748
749         Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
750         instead of a simple enum, as suggested by Sam. This is a bit nicer.
751
752         Also, use a boolean type for CSSFontFamily.fromSystemFontID instead of
753         the enum type to facilitate handling. Using a enum (class) for
754         CSSFontFamily's fromSystemFontID member is not useful as it is always
755         accessed by name.
756
757         * css/CSSFontFamily.h:
758         * css/CSSParser.cpp:
759         (WebCore::CSSParser::parseSystemFont):
760         * css/CSSValuePool.cpp:
761         (WebCore::CSSValuePool::createFontFamilyValue):
762         * css/CSSValuePool.h:
763
764 2015-01-28  Chris Dumez  <cdumez@apple.com>
765
766         Fix typo in markPagesForVistedLinkStyleRecalc()
767         https://bugs.webkit.org/show_bug.cgi?id=140977
768
769         Reviewed by Darin Adler.
770
771         * WebCore.exp.in:
772         * history/CachedPage.h:
773         (WebCore::CachedPage::markForVisitedLinkStyleRecalc):
774         (WebCore::CachedPage::markForVistedLinkStyleRecalc): Deleted.
775         * history/PageCache.cpp:
776         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc):
777         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc): Deleted.
778         * history/PageCache.h:
779
780 2015-01-28  Chris Dumez  <cdumez@apple.com>
781
782         Unreviewed. Remove duplicate friend class statement after r179255.
783
784         * history/PageCache.h:
785
786 2015-01-28  Darin Adler  <darin@apple.com>
787
788         Make SVGElement::instancesForElement point to elements in the shadow tree, not SVGElementInstance objects
789         https://bugs.webkit.org/show_bug.cgi?id=140984
790
791         Reviewed by Anders Carlsson.
792
793         Refactoring of code that is pretty well covered by existing tests, so
794         not adding new tests.
795
796         Inspired by work Rob Buis did in Blink:
797
798             http://src.chromium.org/viewvc/blink?view=revision&revision=173275
799
800         * page/EventHandler.cpp:
801         (WebCore::EventHandler::clear): Removed code to zero m_lastInstanceUnderMouse.
802         (WebCore::instanceAssociatedWithShadowTreeElement): Deleted.
803         (WebCore::EventHandler::updateMouseEventTargetNode): Removed code that used
804         m_lastInstanceUnderMouse to track events on an object after recloning.
805         This behavior doesn't seem to be needed to pass any existing tests, and Rob
806         removed it from Blink, so I'll take it out and we can bring if back, based
807         on the original element rather than on the SVGElementInstance, if we find we
808         need to restore the behavior in the future.
809
810         * page/EventHandler.h: Removed m_lastInstanceUnderMouse.
811
812         * svg/SVGAnimateElementBase.cpp:
813         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
814         Changed this function to take a reference and to call the updated version
815         of the targetElement.animatedPropertyTypesForAttribute function.
816         (WebCore::SVGAnimateElementBase::calculateAnimatedValue): Updated to pass
817         a reference rather than a pointer.
818         (WebCore::SVGAnimateElementBase::resetAnimatedType): Updated to pass
819         references rather than pointers.
820         (WebCore::applyCSSPropertyToTarget): Updated to take a reference.
821         (WebCore::removeCSSPropertyFromTarget): Ditto.
822         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto. Also use a modern
823         for loop, and iterate over shadow tree instances, not over SVGElementInstance.
824         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
825         (WebCore::notifyTargetAboutAnimValChange): Ditto.
826         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
827         (WebCore::SVGAnimateElementBase::clearAnimatedType): More of the same.
828         (WebCore::SVGAnimateElementBase::applyResultsToTarget): Ditto.
829         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Ditto.
830
831         * svg/SVGAnimateElementBase.h: Changed determineAnimatedPropertyType to take
832         a reference rahter than a pointer.
833
834         * svg/SVGAnimateMotionElement.cpp:
835         (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Updated to use the
836         new instances instead of SVGElementInstance. Also added code to skip work if
837         the transform is not changing, and use the assignment operator instead of
838         breaking one matrix down and calling setMatrix on the other.
839
840         * svg/SVGAnimatedTypeAnimator.cpp:
841         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
842         Changed to take a reference rather than a pointer, and rewrote to streamline,
843         using modern for loops and using the new instances set.
844
845         * svg/SVGAnimatedTypeAnimator.h: Removed the constructors from the
846         SVGElementAnimatedProperties struct since we can build them just fine without
847         them. Changed findAnimatedPropertiesForAttributeName to take a reference.
848
849         * svg/SVGAnimationElement.cpp:
850         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): Pass a
851         reference rather than a pointer. Also streamlined the code a bit and removed
852         a comment that tried to say exactly what the code was doing, but was outdated.
853
854         * svg/SVGElement.cpp:
855         (WebCore::SVGElement::~SVGElement): Disconnect all instances from this element
856         and also disconnect the corresponding element from this element if it itself
857         is an instance. This guarantees we have no dangling pointers.
858         (WebCore::SVGElement::mapInstanceToElement): Deleted.
859         (WebCore::SVGElement::removeInstanceMapping): Deleted.
860         (WebCore::SVGElement::instances): Renamed from instancesForElement and changed
861         to be a set of SVG element instances in the shadow tree, rather than
862         SVGElementInstance objects.
863         (WebCore::SVGElement::correspondingElement): Tweaked assertion a little and use
864         nullptr instead of 0.
865         (WebCore::SVGElement::correspondingUseElement): Added. Finds the use element
866         that owns the shadow tree this element is in by following the host element
867         pointer from the shadow root.
868         (WebCore::SVGElement::setCorrespondingElement): Added code to insert or remove
869         this element from the instances set of the corresponding element.
870         (WebCore::SVGElement::animatedPropertyTypesForAttribute): Renamed from
871         animatedPropertyTypeForAttribute and switched to use a return value instead of
872         an out argument.
873         (WebCore::SVGElement::addEventListener): Updated to use instances rather than
874         the old instancesForElement.
875         (WebCore::SVGElement::removeEventListener): Ditto.
876         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute): Pass a reference.
877         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute): Ditto.
878         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Updated to use the
879         new function from AttributeToPropertyMap.
880
881         * svg/SVGElement.h: Changed animatedPropertyTypesForAttribute name to be plural
882         since it returns a vector of types, and made it use a return value instead of
883         an out argument. Added the correspondingUseElement function, and removed the
884         mapInstanceToElement and removeInstanceMapping functions.
885
886         * svg/SVGElementInstance.cpp:
887         (WebCore::SVGElementInstance::SVGElementInstance): Removed now-unneeded call to
888         mapInstanceToElement. This is now handled entirely by the SVGElement itself.
889         (WebCore::SVGElementInstance::detach): Removed now-unneeded call to
890         removeInstanceMapping. This is now handled entirely by the SVGElement itself.
891         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Rewrote to be
892         based on the instances set; logic is different now because we remove each
893         element from that set as we go.
894
895         * svg/SVGElementRareData.h:
896         (WebCore::SVGElementRareData::SVGElementRareData): Removed initialization of
897         pointers since we can do that where they are defined instead.
898         (WebCore::SVGElementRareData::instances): Renamed from elementInstances and
899         changed the type.
900         (WebCore::SVGElementRareData::destroyAnimatedSMILStyleProperties): Deleted.
901         Unneeded since it was already called just before deleting the rare data.
902
903         * svg/SVGTests.cpp:
904         (WebCore::SVGTests::SVGTests): Took advantage of using namespace.
905         (WebCore::createSVGTestPropertyInfo): Added. Helper for function below.
906         (WebCore::createSVGTextAttributeToPropertyMap): Ditto.
907         (WebCore::SVGTests::attributeToPropertyMap): Changed to use the create function
908         above. No longer allocates objects on the heap.
909         (WebCore::SVGTests::hasExtension): Reworked #if code to make the MathML part
910         independent rather than repeating the return statement.
911         (WebCore::SVGTests::synchronizeAttribute): Added. Helper for functions below.
912         (WebCore::SVGTests::synchronizeRequiredFeatures): Call synchronizeAttribute.
913         (WebCore::SVGTests::synchronizeRequiredExtensions): Ditto.
914         (WebCore::SVGTests::synchronizeSystemLanguage): Ditto.
915
916         * svg/SVGTests.h: Removed unneeded forward declarations. Mark the many functions
917         that do not depend on object state as static so the call sites don't wastefully
918         pass a this pointer. Removed the unneeded requiredFeaturesPropertyInfo,
919         requiredExtensionsPropertyInfo, and systemLanguagePropertyInfo functions.
920         Added synchronizeAttribute helper function.
921
922         * svg/SVGUseElement.cpp:
923         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Updated to use the
924         new instances set and a modern for loop.
925
926         * svg/properties/SVGAnimatedPropertyMacros.h: Pass reference to addProperty and
927         made a few other small refinements.
928
929         * svg/properties/SVGAttributeToPropertyMap.cpp:
930         (WebCore::SVGAttributeToPropertyMap::addProperties): Fixed problems mentioned
931         in FIXME where we did too much hashing and vector resizing.
932         (WebCore::SVGAttributeToPropertyMap::addProperty): Streamlined to use a single
933         hash table lookup.
934         (WebCore::SVGAttributeToPropertyMap::properties): Renamed from
935         animatedPropertiesForAttribute and changed to return a vector rather than using
936         an out argument. Also had to change some since the vectors are in the hash table
937         now rather than allocated on the heap.
938         (WebCore::SVGAttributeToPropertyMap::types): Renamed from
939         animatedPropertyTypeForAttribute and made changes just like the ones above.
940         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Use modern for
941         loops, take a reference rather than a pointer, and use the function pointer
942         directly instead of calling through a helper with various assertions.
943         (WebCore::SVGAttributeToPropertyMap::synchronizeProperty): Ditto.
944
945         * svg/properties/SVGAttributeToPropertyMap.h: Updated to match the changes
946         above. Also changed the map to contain vectors instead of pointers to vectors.
947
948 2015-01-28  Darin Adler  <darin@apple.com>
949
950         REGRESSION (r173698): Leaks of selector lists in CSS parsing
951         https://bugs.webkit.org/show_bug.cgi?id=140993
952
953         Reviewed by Anders Carlsson.
954
955         * css/CSSGrammar.y.in: Fixed logic in rules that were not moving a parser-
956         owned pointer into a unique_ptr in all code paths. The magic value
957         invalidSelectorVector makes this really messy. We might want to find a
958         different seolution in the future.
959
960 2015-01-28  Brent Fulgham  <bfulgham@apple.com>
961
962         [Win] Unreviewed build fix after r179247.
963
964         * history/PageCache.h: Need to declare NeverDestroyed specialization as
965         a friend.
966
967 2015-01-28  Joanmarie Diggs  <jdiggs@igalia.com>
968
969         AX: [ATK] Implement support for new AtkRole types for MathML
970         https://bugs.webkit.org/show_bug.cgi?id=140916
971
972         Reviewed by Chris Fleizach.
973
974         Expose mfrac as ATK_ROLE_MATH_FRACTION, and both mroot and msqrt as
975         ATK_ROLE_MATH_ROOT. In the case of script elements, expose the container
976         (msub, msup, msubsup, and mmultiscripts) using the generic text block role
977         ATK_ROLE_SECTION. Then expose the actual script child elements using role
978         ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT. In the case of mmultiscripts,
979         expose whether it is a prescript or postscript via AtkObject attribute.
980
981         Test: accessibility/math-multiscript-attributes.html
982         Also added additional test cases to accessibility/roles-exposed.html
983
984         * accessibility/AccessibilityObject.h:
985         (WebCore::AccessibilityObject::isMathScriptObject): Added.
986         (WebCore::AccessibilityObject::isMathMultiscriptObject): Added.
987         * accessibility/AccessibilityRenderObject.cpp:
988         (WebCore::AccessibilityRenderObject::isMathScriptObject): Added.
989         (WebCore::AccessibilityRenderObject::isMathMultiscriptObject): Added.
990         * accessibility/AccessibilityRenderObject.h:
991         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
992         (webkitAccessibleGetAttributes): Expose whether a multiscript object is a prescript or postscript.
993         (atkRole): Map WebCore Accessibility objects to the new ATK roles.
994
995 2015-01-28  Chris Dumez  <cdumez@apple.com>
996
997         Rename pageCache() to PageCache::shared() and return a reference
998         https://bugs.webkit.org/show_bug.cgi?id=140983
999
1000         Reviewed by Andreas Kling.
1001
1002         Rename pageCache() to PageCache::shared() as this is a singleton class
1003         and have it return a reference instead of a pointer.
1004
1005         * history/BackForwardList.cpp:
1006         (WebCore::BackForwardList::addItem):
1007         (WebCore::BackForwardList::setCapacity):
1008         (WebCore::BackForwardList::clearAllPageCaches):
1009         (WebCore::BackForwardList::close):
1010         * history/CachedFrame.cpp:
1011         (WebCore::CachedFrame::CachedFrame):
1012         * history/HistoryItem.cpp:
1013         (WebCore::HistoryItem::setURL):
1014         * history/PageCache.cpp:
1015         (WebCore::PageCache::shared):
1016         (WebCore::PageCache::get):
1017         (WebCore::pageCache): Deleted.
1018         * history/PageCache.h:
1019         * loader/FrameLoader.cpp:
1020         (WebCore::FrameLoader::commitProvisionalLoad):
1021         (WebCore::FrameLoader::loadDifferentDocumentItem):
1022         * loader/HistoryController.cpp:
1023         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
1024         (WebCore::HistoryController::updateForReload):
1025         * page/Frame.cpp:
1026         (WebCore::Frame::setPageAndTextZoomFactors):
1027         * page/Page.cpp:
1028         (WebCore::Page::setDeviceScaleFactor):
1029         (WebCore::Page::setPagination):
1030         (WebCore::Page::setVisitedLinkStore):
1031         * page/PageGroup.cpp:
1032         (WebCore::PageGroup::captionPreferencesChanged):
1033         * page/Settings.cpp:
1034         (WebCore::Settings::setUsesPageCache):
1035         * platform/MemoryPressureHandler.cpp:
1036         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1037
1038 2015-01-28  Darin Adler  <darin@apple.com>
1039
1040         Fix MediaPlayerEngine leaks
1041         https://bugs.webkit.org/show_bug.cgi?id=140992
1042
1043         Reviewed by Jer Noble.
1044
1045         * platform/graphics/MediaPlayer.cpp:
1046         (WebCore::mutableInstalledMediaEnginesVector): Added.
1047         (WebCore::buildMediaEnginesVector): Added.
1048         (WebCore::installedMediaEngines): Changed this to be a vector of factories
1049         instead of a vector of heap-allocated factories. The old code would leak
1050         all the factories when this was called with the ResetEngines option.
1051         (WebCore::addMediaEngine): Updated for above change.
1052         (WebCore::bestMediaEngineForSupportParameters): Ditto.
1053         (WebCore::nextMediaEngine): Ditto.
1054         (WebCore::MediaPlayer::nextBestMediaEngine): Ditto.
1055         (WebCore::MediaPlayer::loadWithNextMediaEngine): Ditto.
1056         (WebCore::MediaPlayer::supportsType): Ditto.
1057         (WebCore::MediaPlayer::getSupportedTypes): Ditto.
1058         (WebCore::MediaPlayer::getSitesInMediaCache): Ditto.
1059         (WebCore::MediaPlayer::clearMediaCache): Ditto.
1060         (WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
1061         (WebCore::MediaPlayer::supportsKeySystem): Ditto.
1062         (WebCore::MediaPlayer::resetMediaEngines): Ditto.
1063         * platform/graphics/MediaPlayer.h: Ditto.
1064
1065 2015-01-28  Jeongmin Kim  <jm86.kim@lge.com>
1066
1067         Rename descendentxxx to descendantxxxx in RenderLayerBacking
1068         https://bugs.webkit.org/show_bug.cgi?id=140979
1069
1070         Reviewed by Martin Robinson.
1071
1072         Rename descendentxxx to descendantxxxx in RenderLayerBacking
1073         for matching other variables and function names.
1074
1075         * rendering/RenderLayerBacking.cpp:
1076         (WebCore::RenderLayerBacking::updateConfiguration):
1077         (WebCore::RenderLayerBacking::updateAfterDescendants):
1078         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1079         (WebCore::RenderLayerBacking::paintsChildren):
1080         (WebCore::descendantLayerPaintsIntoAncestor):
1081         (WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
1082         (WebCore::descendentLayerPaintsIntoAncestor): Deleted.
1083         (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers): Deleted.
1084
1085 2015-01-27  Chris Dumez  <cdumez@apple.com>
1086
1087         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr
1088         https://bugs.webkit.org/show_bug.cgi?id=140971
1089
1090         Reviewed by Andreas Kling.
1091
1092         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr as it
1093         can never be null. Also have Document::cachedResourceLoader() return a
1094         reference instead of a pointer. This gets rid of a lot of unnecessary
1095         null-checks.
1096
1097 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
1098
1099         More build fixes for newer clang.
1100
1101         Rubber-stamped by Anders Carlsson.
1102
1103         * loader/icon/IconDatabase.h: Added missing override keywords.
1104
1105 2015-01-27  Roger Fong  <roger_fong@apple.com>
1106
1107         WebGL2: Disable various extensions on WebGL2 context that have been promoted to core.
1108         https://bugs.webkit.org/show_bug.cgi?id=140907.
1109         <rdar://problem/19545857>
1110
1111         Reviewed by Brent Fulgham.
1112
1113         * html/canvas/WebGL2RenderingContext.cpp:
1114         (WebCore::WebGL2RenderingContext::getExtension):
1115         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1116         * html/canvas/WebGL2RenderingContext.h:
1117         * html/canvas/WebGLRenderingContext.cpp:
1118         (WebCore::WebGLRenderingContext::getExtension):
1119         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1120         * html/canvas/WebGLRenderingContext.h:
1121         * html/canvas/WebGLRenderingContextBase.cpp:
1122         (WebCore::WebGLRenderingContextBase::getSupportedExtensions): Deleted.
1123         * html/canvas/WebGLRenderingContextBase.h:
1124         * html/canvas/WebGLRenderingContextBase.idl: 
1125         Remove some extra extension enums that shouldn't have been declared on the context idl.
1126
1127 2015-01-27  Chris Dumez  <cdumez@apple.com>
1128
1129         Remove unnecessary m_cachedPage null-checks in PageCache
1130         https://bugs.webkit.org/show_bug.cgi?id=140965
1131
1132         Reviewed by Andreas Kling.
1133
1134         Remove unnecessary m_cachedPage null-checks in PageCache. We initialize
1135         m_cachedPage when inserting the HistoryItem in the page cache and clear
1136         it when removing it from the page cache. Therefore, it is guaranteed
1137         that HistoryItems currently in the page cache have m_cachedPage
1138         initialized and there is no need to null-check it.
1139
1140         * history/PageCache.cpp:
1141         (WebCore::PageCache::frameCount):
1142         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
1143         (WebCore::PageCache::markPagesForFullStyleRecalc):
1144         (WebCore::PageCache::markPagesForDeviceScaleChanged):
1145         (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
1146
1147 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
1148
1149         Some NSAccessibility methods we use are deprecated on 10.10
1150         https://bugs.webkit.org/show_bug.cgi?id=140966
1151
1152         Reviewed by Anders Carlsson.
1153
1154         * accessibility/mac/AccessibilityObjectMac.mm:
1155         (WebCore::AccessibilityObject::overrideAttachmentParent):
1156         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
1157         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1158         (-[WebAccessibilityObjectWrapper role]):
1159         (-[WebAccessibilityObjectWrapper roleDescription]):
1160         Silence the warnings for now.
1161
1162 2015-01-27  Chris Dumez  <cdumez@apple.com>
1163
1164         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity
1165         https://bugs.webkit.org/show_bug.cgi?id=140954
1166
1167         Reviewed by Andreas Kling.
1168
1169         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity as
1170         all CSS shorthand properties are now expanded during parsing (even
1171         'font').
1172
1173         * css/StylePropertyShorthand.cpp:
1174         (WebCore::isShorthandCSSProperty):
1175         (WebCore::isExpandedShorthand): Deleted.
1176         * css/StylePropertyShorthand.h:
1177         * css/StyleResolver.cpp:
1178         (WebCore::StyleResolver::applyProperty):
1179         * css/makeprop.pl:
1180
1181 2015-01-27  Eric Carlson  <eric.carlson@apple.com>
1182
1183         Simplify http/tests/media/video-play-stall.html
1184         https://bugs.webkit.org/show_bug.cgi?id=140630
1185
1186         Reviewed by Brent Fulgham.
1187
1188         Test: http/tests/media/video-play-waiting.html
1189
1190         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1191         (WebCore::MediaPlayerPrivateAVFoundation::play): Add more logging.
1192         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty
1193             always maps to HaveCurrentData.
1194         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Don't log FunctionType,
1195             doing so it needlessly verbose.
1196         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
1197         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1198         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Log KVO property 
1199             values and notification state.
1200
1201 2015-01-27  Commit Queue  <commit-queue@webkit.org>
1202
1203         Unreviewed, rolling out r179192.
1204         https://bugs.webkit.org/show_bug.cgi?id=140953
1205
1206         Caused numerous layout test failures (Requested by mattbaker_
1207         on #webkit).
1208
1209         Reverted changeset:
1210
1211         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
1212         pages"
1213         https://bugs.webkit.org/show_bug.cgi?id=140900
1214         http://trac.webkit.org/changeset/179192
1215
1216 2015-01-27  Benjamin Poulain  <bpoulain@apple.com>
1217
1218         Modernize some constructors of the CSS JIT
1219         https://bugs.webkit.org/show_bug.cgi?id=140903
1220
1221         Reviewed by Darin Adler.
1222
1223         Two constructors were still using the old style.
1224
1225         * cssjit/SelectorCompiler.cpp:
1226         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment): Deleted.
1227         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern): Deleted.
1228
1229 2015-01-27  Brent Fulgham  <bfulgham@apple.com>
1230
1231         [Win] Unreviewed build fix.
1232
1233         Lack of include guards in WebVTTElement.h caused a build failure once we started including
1234         this header file from more than one implementation file.
1235
1236         * html/track/WebVTTElement.h:
1237
1238 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
1239
1240         CSSKeyframesRule::findRule() and deleteRule() should delete the last matching rule, not the first
1241         https://bugs.webkit.org/show_bug.cgi?id=139732
1242
1243         Reviewed by Dean Jackson and Darin Adler.
1244
1245         No new tests because existing tests have been updated to verify this behavior.
1246
1247         * css/CSSKeyframeRule.h:
1248         (WebCore::StyleKeyframe::getKeys): Deleted.
1249         * css/StyleResolver.cpp:
1250         (WebCore::StyleResolver::keyframeStylesForAnimation): use StyleKeyframe::keys().
1251         * css/CSSKeyframeRule.cpp:
1252         (WebCore::StyleKeyframe::parseKeyString): Deleted. Moved to CSSParser.
1253         (WebCore::StyleKeyframe::keyText): Build keyframe selector from Vector<double> representation.
1254         * css/CSSKeyframeRule.h:
1255         (WebCore::StyleKeyframe::setKeyText): parse keyframe selector into Vector<double>.
1256         (WebCore::StyleKeyframe::keys): Added. Returns vector representation of selector keys.
1257         (WebCore::StyleKeyframe::getKeys): Deleted. Now keys().
1258         * css/CSSKeyframesRule.cpp:
1259         (WebCore::StyleRuleKeyframes::findKeyframeIndex): Return last matching rule.
1260         * css/CSSParser.cpp:
1261         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
1262         * css/CSSParser.h:
1263         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
1264
1265 2015-01-26  Geoffrey Garen  <ggaren@apple.com>
1266
1267         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
1268         https://bugs.webkit.org/show_bug.cgi?id=140900
1269
1270         Reviewed by Mark Hahnenberg.
1271
1272         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1273         (WebCore::MemoryPressureHandler::install): Be sure to release other
1274         memory after GC and not before, since GC might contribute to free
1275         malloc pages now.
1276
1277 2015-01-27  Zalan Bujtas  <zalan@apple.com>
1278
1279         Simple line layout: Make FlowContents an iterator class.
1280         https://bugs.webkit.org/show_bug.cgi?id=140909
1281
1282         Reviewed by Antti Koivisto.
1283
1284         This patch transfers content position handling from createLineRuns()/LineState to
1285         FlowContents. FlowContents becomes a real iterator class.
1286         It tightens content and position information so that we can start supporting
1287         no textual content such as <br>.
1288
1289         No change in functionality.
1290
1291         * rendering/SimpleLineLayout.cpp:
1292         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Remove redundant committedLogicalRight.
1293         (WebCore::SimpleLineLayout::LineState::addUncommitted): Now that we don't have current
1294         positon in LineState, we need to be able to figure out where we start the uncommitted content.
1295         This is mainly relevant after collapsed whitespace, when we start a new uncommitted segment.
1296         It was previously achieved through LineState::jumpTo().
1297         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
1298         (WebCore::SimpleLineLayout::firstFragment): Return the first fragment for this line.
1299         (WebCore::SimpleLineLayout::createLineRuns): Renaming and removing position handling.
1300         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): Renaming.
1301         (WebCore::SimpleLineLayout::createTextRuns):
1302         (WebCore::SimpleLineLayout::LineState::jumpTo): Deleted.
1303         (WebCore::SimpleLineLayout::initializeNewLine): Deleted. : Move overflow fragment functionality
1304         to firstFragment().
1305         * rendering/SimpleLineLayoutFlowContents.cpp:
1306         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
1307         * rendering/SimpleLineLayoutFlowContents.h:
1308
1309 2015-01-27  Chris Dumez  <cdumez@apple.com>
1310
1311         HTMLElement.dir should only return known values
1312         https://bugs.webkit.org/show_bug.cgi?id=140925
1313
1314         Reviewed by Darin Adler.
1315
1316         HTMLElement.dir should only return known values according to the HTML
1317         specification:
1318         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
1319
1320         Chrome and Firefox 28 match the specification. IE11's behavior is
1321         slightly different:
1322         - When setting an unknown 'dir' value, an exception will be thrown.
1323         - Setting a known 'dir' value in a non-canonical case (e.g. "RTL"),
1324           the value will be directly converted to its canonical form (e.g.
1325           "rtl") before updating the DOM tree. (close to the spec but changing
1326           the case upon setting).
1327
1328         This patch is based on the following Blink revision by me:
1329         https://src.chromium.org/viewvc/blink?view=rev&revision=171861
1330
1331         Test: fast/dom/document-dir-property.html
1332
1333         * html/HTMLDocument.cpp:
1334         (WebCore::HTMLDocument::dir):
1335         (WebCore::HTMLDocument::setDir):
1336         * html/HTMLDocument.h:
1337         * html/HTMLElement.cpp:
1338         (WebCore::toValidDirValue):
1339         (WebCore::HTMLElement::dir):
1340         (WebCore::HTMLElement::setDir):
1341         * html/HTMLElement.h:
1342         * html/HTMLElement.idl:
1343
1344 2015-01-26  Chris Dumez  <cdumez@apple.com>
1345
1346         Introduce Document::body() for call sites interested in the <body> element
1347         https://bugs.webkit.org/show_bug.cgi?id=140920
1348
1349         Reviewed by Darin Adler.
1350
1351         Introduce Document::body() method for call sites interested only in the
1352         document's <body> element (not the <frameset>). Also clean up the call
1353         sites of Document::bodyOrFrameset() to cache the return value when
1354         suitable as this method does a tree traversal.
1355
1356         This patch does not change behavior, it merely ports calls sites that
1357         were calling Document::bodyOrFrameset() then checking if the tag was
1358         <body>, to call Document::body() instead. Doing so is more efficient
1359         and clearer.
1360
1361 2015-01-26  Brent Fulgham  <bfulgham@apple.com>
1362
1363         [Win] ASSERTION FAILED !m_ptr under AccessibilityController::winAddNotificationListener
1364         https://bugs.webkit.org/show_bug.cgi?id=87426
1365         <rdar://problem/11527899>
1366
1367         Reviewed by Darin Adler.
1368
1369         Revise COMPtr to work better with our HashMap implementation:
1370         (1) Add a specialization for IsSmartPtr.
1371         (2) Remove PtrHash specialization.
1372         (3) Refresh HashTrails specialization for COMPtr to match what we
1373         do for RefPtr.
1374
1375         * platform/win/COMPtr.h:
1376
1377 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
1378
1379         The computed value of line-height:normal is incorrect
1380         https://bugs.webkit.org/show_bug.cgi?id=133744
1381
1382         Reviewed by Dean Jackson.
1383
1384         Use font's line spacing as computed line-height value when specified value is 'normal'.
1385         This behavior is compatible with all other engines.
1386
1387         No new tests; all existing tests are updated to reflect the new computed value.
1388
1389         * css/CSSComputedStyleDeclaration.cpp:
1390         (WebCore::lineHeightFromStyle): If line-height wasn't set, use the font's line spacing (same as Blink).
1391
1392 2015-01-26  Chris Dumez  <cdumez@apple.com>
1393
1394         Document.dir should reflect the 'dir' attribute of the root html element
1395         https://bugs.webkit.org/show_bug.cgi?id=140922
1396
1397         Reviewed by Darin Adler.
1398
1399         Document.dir should reflect the 'dir' content attribute of the root
1400         <html> element as per the specification:
1401         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
1402
1403         Previously, WebKit was reflecting the 'dir' content attribute of the
1404         body element. This patch aligns WebKit with the specification and the
1405         behavior of other browsers (tested Firefox 28, IE11 and Chrome).
1406
1407         This patch is based on the following Blink revision by me:
1408         https://src.chromium.org/viewvc/blink?revision=171734&view=revision
1409
1410         Test: fast/dom/document-dir-property.html
1411
1412         * html/HTMLDocument.cpp:
1413         (WebCore::HTMLDocument::dir):
1414         (WebCore::HTMLDocument::setDir):
1415         * html/HTMLDocument.h:
1416
1417 2015-01-26  Darin Adler  <darin@apple.com>
1418
1419         REGRESSION (r179101): SVGUseElement::expandUseElementsInShadowTree has an object lifetime mistake
1420         https://bugs.webkit.org/show_bug.cgi?id=140921
1421
1422         Reviewed by Alexey Proskuryakov.
1423
1424         Bug found by running regression tests with Address Sanitizer.
1425
1426         * svg/SVGUseElement.cpp:
1427         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Use a Ref to protect
1428         the original use element after it's been replaced in the tree; we use it for
1429         one more thing after that.
1430
1431 2015-01-26  Roger Fong  <roger_fong@apple.com>
1432
1433         WebGL 2.0: Actually allow for experimental-webgl2 context creation.
1434         https://bugs.webkit.org/show_bug.cgi?id=140906
1435         <rdar://problem/19606875>.
1436
1437         Reviewed by Brent Fulgham.
1438
1439         * html/HTMLCanvasElement.cpp:
1440         (WebCore::HTMLCanvasElement::is3dType): Include "experimental-webgl2" in the list of acceptable 3d context types.
1441
1442 2015-01-26  Chris Dumez  <cdumez@apple.com>
1443
1444         Rename Document::body() to Document::bodyOrFrameset() for clarity
1445         https://bugs.webkit.org/show_bug.cgi?id=140902
1446
1447         Reviewed by Andreas Kling.
1448
1449         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
1450         method does not necessarily return an HTMLBodyElement, it can also
1451         return a frameset as per the specification:
1452         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
1453
1454         This method is often misused internally (the caller is only interested
1455         in the <body> element). I will fix these instances in a follow-up patch,
1456         this patch is only renaming mechanically.
1457
1458 2015-01-26  Byungseon Shin  <sun.shin@lge.com>
1459
1460         Fix Border-radius clipping issue on a composited descendants
1461         https://bugs.webkit.org/show_bug.cgi?id=138551 
1462
1463         Reviewed by Simon Fraser.
1464
1465         Fix assertion in RenderLayerBacking::paintIntoLayer
1466         by not checking out of sync with the GraphicsLayer heirarchy
1467         in GraphicsLayerPaintChildClippingMask phase.
1468
1469         Test: compositing/clipping/border-radius-overflow-hidden-stacking-context.html
1470
1471         * rendering/RenderLayerBacking.cpp:
1472         (WebCore::RenderLayerBacking::paintIntoLayer):
1473
1474 2015-01-26  Chris Dumez  <cdumez@apple.com>
1475
1476         Simplify RenderElement's shouldRepaintForImageAnimation()
1477         https://bugs.webkit.org/show_bug.cgi?id=140890
1478
1479         Reviewed by Darin Adler.
1480
1481         Simplify RenderElement's shouldRepaintForImageAnimation() by
1482         not calling rendererForRootBackground(). The previous code was
1483         doing a null-check on Document::documentElement() but failing
1484         to do a null-check on the renderer just after, which lead me
1485         to refactor this code.
1486
1487         Instead of calling document().documentElement.renderer(), we
1488         now call renderer.parent(). This is equivalent because we already
1489         know that renderer.isBody() returns true. The parent of the <body>
1490         has to be the <html> element, which has to be the documentElement.
1491         There is also no need to do a null-check on renderer.parent(). We
1492         already know that the <body> has a renderer (because |renderer| is
1493         its renderer), thus its parent <html> element has to have a renderer
1494         as well.
1495
1496         Finally, simply call !rootElement.hasBackground() instead of
1497         rootElement.rendererForRootBackground() == &bodyRenderer to determine
1498         if the background painted by the root. This is equivalent but more
1499         efficient because:
1500         - We already know that the root renderer's is an <html> element. We
1501           can thus avoid the check in rendererForRootBackground().
1502         - We already have the <body>'s renderer so we don't need to do the
1503           DOM tree traversal in rendererForRootBackground() to get it.
1504
1505         No new tests, already covered by:
1506         fast/images/animated-gif-body-delegated-background-image.html
1507         fast/images/animated-gif-html-background-image.html
1508
1509         * rendering/RenderElement.cpp:
1510         (WebCore::shouldRepaintForImageAnimation):
1511
1512 2015-01-26  Chris Dumez  <cdumez@apple.com>
1513
1514         First argument to DOM traversal functions should be a reference
1515         https://bugs.webkit.org/show_bug.cgi?id=140895
1516
1517         Reviewed by Antti Koivisto.
1518
1519         First argument to DOM traversal functions should be a reference instead
1520         of a pointer as it is dereferenced without null-check.
1521
1522 2015-01-26  Roger Fong  <roger_fong@apple.com>
1523
1524         [WebGL2] Update IDL for WebGL2.
1525         https://bugs.webkit.org/show_bug.cgi?id=126406
1526         <rdar://problem/15002268>.
1527
1528         Reviewed by Brent Fulgham.
1529
1530         Update WebGL2RenderingContext idl to match spec. Create method stubs as necessary.
1531
1532         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1533         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter):
1534         (WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
1535         (WebCore::JSWebGL2RenderingContext::getQueryParameter):
1536         (WebCore::JSWebGL2RenderingContext::getSamplerParameter):
1537         (WebCore::JSWebGL2RenderingContext::getSyncParameter):
1538         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1539         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
1540         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
1541         * html/canvas/WebGL2RenderingContext.cpp:
1542         (WebCore::WebGL2RenderingContext::copyBufferSubData):
1543         (WebCore::WebGL2RenderingContext::getBufferSubData):
1544         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
1545         (WebCore::WebGL2RenderingContext::blitFramebuffer):
1546         (WebCore::WebGL2RenderingContext::framebufferTextureLayer):
1547         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
1548         (WebCore::WebGL2RenderingContext::invalidateFramebuffer):
1549         (WebCore::WebGL2RenderingContext::invalidateSubFramebuffer):
1550         (WebCore::WebGL2RenderingContext::readBuffer):
1551         (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
1552         (WebCore::WebGL2RenderingContext::texStorage2D):
1553         (WebCore::WebGL2RenderingContext::texStorage3D):
1554         (WebCore::WebGL2RenderingContext::texImage3D):
1555         (WebCore::WebGL2RenderingContext::texSubImage3D):
1556         (WebCore::WebGL2RenderingContext::copyTexSubImage3D):
1557         (WebCore::WebGL2RenderingContext::compressedTexImage3D):
1558         (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
1559         (WebCore::WebGL2RenderingContext::getFragDataLocation):
1560         (WebCore::WebGL2RenderingContext::uniform1ui):
1561         (WebCore::WebGL2RenderingContext::uniform2ui):
1562         (WebCore::WebGL2RenderingContext::uniform3ui):
1563         (WebCore::WebGL2RenderingContext::uniform4ui):
1564         (WebCore::WebGL2RenderingContext::uniform1uiv):
1565         (WebCore::WebGL2RenderingContext::uniform2uiv):
1566         (WebCore::WebGL2RenderingContext::uniform3uiv):
1567         (WebCore::WebGL2RenderingContext::uniform4uiv):
1568         (WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
1569         (WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
1570         (WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
1571         (WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
1572         (WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
1573         (WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
1574         (WebCore::WebGL2RenderingContext::vertexAttribI4i):
1575         (WebCore::WebGL2RenderingContext::vertexAttribI4iv):
1576         (WebCore::WebGL2RenderingContext::vertexAttribI4ui):
1577         (WebCore::WebGL2RenderingContext::vertexAttribI4uiv):
1578         (WebCore::WebGL2RenderingContext::vertexAttribIPointer):
1579         (WebCore::WebGL2RenderingContext::vertexAttribDivisor):
1580         (WebCore::WebGL2RenderingContext::drawArraysInstanced):
1581         (WebCore::WebGL2RenderingContext::drawElementsInstanced):
1582         (WebCore::WebGL2RenderingContext::drawRangeElements):
1583         (WebCore::WebGL2RenderingContext::drawBuffers):
1584         (WebCore::WebGL2RenderingContext::clearBufferiv):
1585         (WebCore::WebGL2RenderingContext::clearBufferuiv):
1586         (WebCore::WebGL2RenderingContext::clearBufferfv):
1587         (WebCore::WebGL2RenderingContext::clearBufferfi):
1588         (WebCore::WebGL2RenderingContext::createQuery):
1589         (WebCore::WebGL2RenderingContext::deleteQuery):
1590         (WebCore::WebGL2RenderingContext::isQuery):
1591         (WebCore::WebGL2RenderingContext::beginQuery):
1592         (WebCore::WebGL2RenderingContext::endQuery):
1593         (WebCore::WebGL2RenderingContext::getQuery):
1594         (WebCore::WebGL2RenderingContext::getQueryParameter):
1595         (WebCore::WebGL2RenderingContext::createSampler):
1596         (WebCore::WebGL2RenderingContext::deleteSampler):
1597         (WebCore::WebGL2RenderingContext::isSampler):
1598         (WebCore::WebGL2RenderingContext::bindSampler):
1599         (WebCore::WebGL2RenderingContext::samplerParameteri):
1600         (WebCore::WebGL2RenderingContext::samplerParameterf):
1601         (WebCore::WebGL2RenderingContext::getSamplerParameter):
1602         (WebCore::WebGL2RenderingContext::fenceSync):
1603         (WebCore::WebGL2RenderingContext::isSync):
1604         (WebCore::WebGL2RenderingContext::deleteSync):
1605         (WebCore::WebGL2RenderingContext::clientWaitSync):
1606         (WebCore::WebGL2RenderingContext::waitSync):
1607         (WebCore::WebGL2RenderingContext::getSyncParameter):
1608         (WebCore::WebGL2RenderingContext::createTransformFeedback):
1609         (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
1610         (WebCore::WebGL2RenderingContext::isTransformFeedback):
1611         (WebCore::WebGL2RenderingContext::bindTransformFeedback):
1612         (WebCore::WebGL2RenderingContext::beginTransformFeedback):
1613         (WebCore::WebGL2RenderingContext::endTransformFeedback):
1614         (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
1615         (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
1616         (WebCore::WebGL2RenderingContext::pauseTransformFeedback):
1617         (WebCore::WebGL2RenderingContext::resumeTransformFeedback):
1618         (WebCore::WebGL2RenderingContext::bindBufferBase):
1619         (WebCore::WebGL2RenderingContext::bindBufferRange):
1620         (WebCore::WebGL2RenderingContext::getIndexedParameter):
1621         (WebCore::WebGL2RenderingContext::getUniformIndices):
1622         (WebCore::WebGL2RenderingContext::getActiveUniforms):
1623         (WebCore::WebGL2RenderingContext::getUniformBlockIndex):
1624         (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter):
1625         (WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
1626         (WebCore::WebGL2RenderingContext::uniformBlockBinding):
1627         (WebCore::WebGL2RenderingContext::createVertexArray):
1628         (WebCore::WebGL2RenderingContext::deleteVertexArray):
1629         (WebCore::WebGL2RenderingContext::isVertexArray):
1630         (WebCore::WebGL2RenderingContext::bindVertexArray):
1631         * html/canvas/WebGL2RenderingContext.h:
1632         * html/canvas/WebGL2RenderingContext.idl:
1633         * platform/graphics/GraphicsTypes3D.h:
1634
1635 2015-01-26  Andreas Kling  <akling@apple.com>
1636
1637         Don't let the CSSValuePool's font family cache grow unbounded.
1638         <https://webkit.org/b/140894>
1639
1640         Reviewed by Chris Dumez.
1641
1642         Darin pointed out to Chris who pointed out to me that the font family cache
1643         in CSSValuePool can grow unbounded until we get a system memory pressure
1644         notification. Put a limit on it like we did with the font face cache.
1645
1646         * css/CSSValuePool.cpp:
1647         (WebCore::CSSValuePool::createFontFamilyValue):
1648
1649 2015-01-26  Andreas Kling  <akling@apple.com>
1650
1651         Plug leak in jsValueWithDictionaryInContext().
1652         <https://webkit.org/b/140889>
1653
1654         Reviewed by Alexey Proskuryakov.
1655
1656         Add a missing JSStringRelease to plug leak that was showing up on leaks bot.
1657
1658         * platform/mac/SerializedPlatformRepresentationMac.mm:
1659         (WebCore::jsValueWithDictionaryInContext):
1660
1661 2015-01-26  Benjamin Poulain  <benjamin@webkit.org>
1662
1663         Fix CSS Selector's tag name matching when mixing HTML and XML
1664         https://bugs.webkit.org/show_bug.cgi?id=140878
1665
1666         Reviewed by Darin Adler.
1667
1668         Previsouly, WebKit was unable to match any XML element that had
1669         any uppercase character if the stylesheet was in a HTML document.
1670         This problem was most often reported due to the inability to style
1671         SVG-in-HTML.
1672
1673         The reason was that the tag local name was incorrectly transformed
1674         to lowercase at parsing time. Instead, we are supposed to only
1675         do case-insensitive match for HTML elements in a HTML document.
1676
1677         This fix is very similar with how we handle attributes:
1678         -Keep both the original and the lowercase versions of the name.
1679         -When matching, chose which version to use depending on the element being matched.
1680
1681         There is one major difference in the way the names are stored.
1682         Unlike attribute selectors, tag name selectors are common, and the uppercase
1683         version is not that uncommon. I wanted to preserve the dense representation
1684         so I specialized CSSSelector specifically for tag names.
1685
1686         To store the data, if the name is already lowercase, just use the m_data pointer
1687         as usual.
1688         If the name is not lowercase, allocate a new small structure in the union to store
1689         both names.
1690
1691         Tests: fast/css/tagname-and-namespace-case-sensitivity-xml-in-html.html
1692                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml-expected.xhtml
1693                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml.xhtml
1694                fast/css/tagname-case-sensitivity-svg-in-html.html
1695                fast/css/tagname-case-sensitivity-svg-in-xhtml-expected.xhtml
1696                fast/css/tagname-case-sensitivity-svg-in-xhtml.xhtml
1697                fast/css/tagname-case-sensitivity-xml-in-html.html
1698                fast/css/tagname-case-sensitivity-xml-in-xhtml-expected.xhtml
1699                fast/css/tagname-case-sensitivity-xml-in-xhtml.xhtml
1700                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-html.html
1701                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-xhtml.xhtml
1702                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-html.html
1703                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-xhtml.xhtml
1704                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-html.html
1705                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-xhtml.xhtml
1706                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-html.html
1707                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-xhtml.xhtml
1708                fast/selectors/tagname-adjacent-backtracking-case-sensitivity-html.html
1709                fast/selectors/tagname-descendant-backtracking-case-sensitivity-html.html
1710
1711         * css/CSSGrammar.y.in:
1712         The parser is unaware of anything case related. CSSSelector takes care of that.
1713
1714         * css/CSSSelector.cpp:
1715         (WebCore::CSSSelector::CSSSelector):
1716         (WebCore::CSSSelector::createRareData):
1717         * css/CSSSelector.h:
1718         (WebCore::CSSSelector::NameWithCase::NameWithCase):
1719         (WebCore::CSSSelector::CSSSelector):
1720         (WebCore::CSSSelector::~CSSSelector):
1721         (WebCore::CSSSelector::tagQName):
1722         (WebCore::CSSSelector::tagLowercaseLocalName):
1723         The new representation stores both the original form and the lower case
1724         form.
1725
1726         * css/RuleSet.cpp:
1727         (WebCore::RuleSet::addRule):
1728         (WebCore::RuleSet::shrinkToFit):
1729         * css/RuleSet.h:
1730         (WebCore::RuleSet::tagRules):
1731         * css/ElementRuleCollector.cpp:
1732         (WebCore::ElementRuleCollector::collectMatchingRules):
1733         The tag name partition is now split in two: lowercase and original case.
1734         If the matched element is HTML, the lowercase partition is used. 
1735
1736         * css/SelectorFilter.cpp:
1737         (WebCore::collectElementIdentifierHashes):
1738         (WebCore::collectDescendantSelectorIdentifierHashes):
1739         This is the most annoying part of the patch performance wise:
1740         the bloom filter knows the case of the real elements but it cannot know
1741         how selectors will match them.
1742
1743         To make it work, all names are now converted to lowercase.
1744         That implies that we can filter less on XML and we may have to pay for
1745         converting the tag name to lowercase.
1746
1747         I expect the performance hit to be small because:
1748         -Having two XML elements with the same name but different case is uncommon.
1749         -Most elements use lowercase names.
1750
1751         Still sad...that's the price to pay for correctness.
1752
1753         * css/SelectorChecker.cpp:
1754         (WebCore::tagMatches):
1755         (WebCore::SelectorChecker::checkOne):
1756         * css/SelectorChecker.h:
1757         (WebCore::SelectorChecker::tagMatches): Deleted.
1758         Update the legacy matcher, nothing special.
1759
1760         * cssjit/SelectorCompiler.cpp:
1761         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1762         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
1763         (WebCore::SelectorCompiler::constructFragmentsInternal):
1764         (WebCore::SelectorCompiler::equalTagNames):
1765         (WebCore::SelectorCompiler::equalTagNamePatterns):
1766         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
1767         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
1768         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
1769         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1770         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
1771         Tag names are used to optimize backtracking; this is quite common for descendant
1772         (e.g. div > ul > li).
1773         We have to differenciate one new case there: if two tag names are equal
1774         when compared case-insensitively but strictly different, they may still
1775         be equal if they don't match the same kind of elements or both matches
1776         and HTML element.
1777
1778         * dom/SelectorQuery.cpp:
1779         (WebCore::localNameMatches):
1780         (WebCore::elementsForLocalName):
1781         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
1782         Update the inline versions of SelectorQuery.
1783
1784 2015-01-26  Chris Dumez  <cdumez@apple.com>
1785
1786         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
1787         https://bugs.webkit.org/show_bug.cgi?id=140891
1788
1789         Reviewed by Anders Carlsson.
1790
1791         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
1792         to make sure the argument is not unexpectedly moved when it shouldn't (like I
1793         experienced yesterday in Bug 140577):
1794         <http://trac.webkit.org/changeset/179105>
1795
1796         * css/CSSPrimitiveValue.h:
1797         (WebCore::CSSPrimitiveValue::create):
1798         * css/CSSValuePool.h:
1799         (WebCore::CSSValuePool::createValue):
1800
1801 2015-01-26  Beth Dakin  <bdakin@apple.com>
1802
1803         Blacklist iBooks for WebKit's default immediate actions
1804         https://bugs.webkit.org/show_bug.cgi?id=140854
1805         -and corresponding-
1806         rdar://problem/19489518
1807
1808         Reviewed by Tim Horton.
1809
1810         Add a runtime check for iBooks.
1811         * WebCore.exp.in:
1812         * platform/RuntimeApplicationChecks.cpp:
1813         (WebCore::applicationIsIBooks):
1814         * platform/RuntimeApplicationChecks.h:
1815
1816 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
1817
1818         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
1819         https://bugs.webkit.org/show_bug.cgi?id=140860
1820
1821         Reviewed by Darin Adler.
1822
1823         No new tests because this simply reverts broken code.
1824
1825         The fonts it makes are grotesque. (See what I did there? Typographic
1826         humor is the best humor.)
1827
1828         * Configurations/FeatureDefines.xcconfig:
1829
1830 2015-01-26  Chris Dumez  <cdumez@apple.com>
1831
1832         Demote 'line-height' to a low priority property.
1833         https://bugs.webkit.org/show_bug.cgi?id=140817
1834
1835         Reviewed by Andreas Kling.
1836
1837         Our special handling of the 'line-height' property is no longer
1838         required, since the 'font' shorthand is now expanded in the parser
1839         in all cases (also for system fonts).
1840
1841         This patch is based on the following Blink revision:
1842         https://src.chromium.org/viewvc/blink?revision=184629&view=revision
1843
1844         No new tests, already covered by:
1845         fast/css/font-shorthand-line-height.html
1846         fast/css/line-height-font-order.html
1847
1848         * css/CSSPropertyNames.in:
1849         * css/StyleResolver.cpp:
1850         (WebCore::StyleResolver::styleForKeyframe):
1851         (WebCore::StyleResolver::styleForPage):
1852         (WebCore::StyleResolver::applyMatchedProperties):
1853         (WebCore::StyleResolver::initializeFontStyle):
1854         (WebCore::StyleResolver::CascadedProperties::Property::apply):
1855         * css/StyleResolver.h:
1856         (WebCore::StyleResolver::State::State):
1857         (WebCore::StyleResolver::State::setLineHeightValue): Deleted.
1858         (WebCore::StyleResolver::State::lineHeightValue): Deleted.
1859
1860 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
1861
1862         [GTK] gtkdoc does not appear in DevHelp
1863         https://bugs.webkit.org/show_bug.cgi?id=139369
1864
1865         Reviewed by Philippe Normand.
1866
1867         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
1868
1869 2015-01-25  Chris Dumez  <cdumez@apple.com>
1870
1871         Remove 'font' shorthand property special casing
1872         https://bugs.webkit.org/show_bug.cgi?id=140577
1873
1874         Reviewed by Darin Adler.
1875
1876         Mark CSSPrimitiveValue::m_value.fontFamily as const as it is not
1877         supposed to change. This also makes sure that m_value.fontFamily
1878         gets copied instead of moved when constructing a clone in
1879         CSSPrimitiveValue::cloneForCSSOM(). This was causing several tests
1880         to fail on the bots.
1881
1882         * css/CSSPrimitiveValue.h:
1883
1884 2015-01-25  Alexey Proskuryakov  <ap@apple.com>
1885
1886         Setting HTMLMarqueeElement.trueSpeed doesn't work
1887         https://bugs.webkit.org/show_bug.cgi?id=140863
1888
1889         Reviewed by Darin Adler.
1890
1891         Test: fast/html/marquee-set-truespeed.html
1892
1893         * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::minimumDelay):
1894         Check the boolean attribute properly - an empty value is true.
1895
1896 2015-01-25  Darin Adler  <darin@apple.com>
1897
1898         Streamline SVGUseElement shadow tree handling and make it use SVGElementInstance less
1899         https://bugs.webkit.org/show_bug.cgi?id=140875
1900
1901         Reviewed by Anders Carlsson.
1902
1903         Refactoring of code that is pretty well covered by existing tests, so
1904         not adding new tests.
1905
1906         Inspired by work Rob Buis did in Blink:
1907
1908             http://src.chromium.org/viewvc/blink?view=revision&revision=173273
1909
1910         Althgouh that is less than half of what ended up in this patch.
1911
1912         * dom/ContainerNode.h: Fixed NoEventDispatchAssertion so it can be
1913         copied without causing an underflow of NoEventDispatchAssertion::s_count.
1914         Made the copy constructor call the default constructor. Also changed it
1915         to be based on ASSERT_DISABLED rather than NDEBUG and tweaked it a bit.
1916
1917         * dom/ElementIteratorAssertions.h: Removed an unnecessary include and
1918         an unnecessary default constructor. Changed to use WTF::Optional instead
1919         of WTF::OwnPtr to handle NoEventDispatchAssertion, which makes this class
1920         copyable and assignable, which in turn makes the iterators based on this
1921         copyable and assignable, which is what I needed in SVGUseElement code.
1922         Also simplified code in a couple places.
1923
1924         * dom/TypedElementDescendantIterator.h:
1925         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
1926         Fixed an error where the arguments to Traversal::next were passed backwards.
1927         This led to incomplete iteration in SVGUseElement code, and an immediate
1928         assertion failure. Probably could use some unit test coverage, too.
1929         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
1930         Ditto.
1931
1932         * svg/SVGUseElement.cpp:
1933         (WebCore::SVGUseElement::animatedInstanceRoot): Deleted.
1934         (WebCore::SVGUseElement::transferSizeAttributesToShadowTreeTargetClone):
1935         Removed the originalElement argument, since we can use the correspondingElement
1936         to get back to it. Removed the useElement argument and changed this into a
1937         member function.
1938         (WebCore::SVGUseElement::svgAttributeChanged): Updated for above changes.
1939         (WebCore::subtreeContainsDisallowedElement): Deleted this function, because
1940         it was only used to optimize by not calling removeDisallowedElementsFromSubtree,
1941         but that function is already similarly efficient when called to do nothing, so
1942         the preflight was not useful.
1943         (WebCore::SVGUseElement::clearResourceReferences): Call userAgentShadowRoot
1944         instead of shadowRoot for clarity.
1945         (WebCore::SVGUseElement::buildPendingResource): Pass a reference instead of
1946         a pointer to buildShadowAndInstanceTree, since it's guaranteed to not be null.
1947         (WebCore::SVGUseElement::shadowTreeTargetClone): Added. Returns the SVG element
1948         inside the shadow tree that corresponds to the use element's target.
1949         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Changed argument type
1950         to a reference instead of a pointer. Removed comments explaining why we have
1951         an instance tree, since soon we will not have one. Removed many comments that
1952         simply state the names of the functions they are commenting on and perhaps a tiny
1953         bit more. Changed to not use m_targetElementInstance as much, dealing with the
1954         shadow tree directly instead of through the instance tree.
1955         (WebCore::SVGUseElement::toClipPath): Use shadowTreeTargetClone instead of
1956         getting at the element through m_targetElementInstance.
1957         (WebCore::SVGUseElement::rendererClipChild): Ditto.
1958         (WebCore::removeDisallowedElementsFromSubtree): Removed the inline keyword,
1959         since there's no good reason to inline thif function's body. Improved local
1960         variable names and used a modern for loop. Also moved the comment about why
1961         this function is used here inside the function instead of repeating it at
1962         each call site.
1963         (WebCore::SVGUseElement::buildShadowTree): Changed to take a reference
1964         instead of a pointer. Moved the check to see if the target is disallowed
1965         out of this function and into buildShadowAndInstanceTree, which needs to
1966         handle that failure explicitly. Tightened up the code a bit, using Ref instead
1967         of RefPtr, putting the comment about removeDisallowedElementsFromSubtree into
1968         that function itself, and removing the unneeded subtreeContainsDisallowedElement
1969         check entirely.
1970         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed the argument,
1971         getting the shadow tree from the shadowTree function instead. Walk the tree
1972         iteratively instead of recursively, using the descendantsOfType function.
1973         Rearranged and streamlined the logic.
1974         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
1975         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
1976         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Renamed
1977         this to avoid the term "replaced element", which is not a reasonable way to
1978         refer to the <g> element in the shadow tree that replaces the <use> element.
1979         Changed the argument type to SVGGElement to make it harder to misuse this
1980         function by accident, and made the use element be "this" instead of passing
1981         it as an argument.
1982         (WebCore::SVGUseElement::selfHasRelativeLengths): Call hasRelativeLengths
1983         on the target inside the shadow tree rather than the original target, which
1984         makes more sense anyway, and is straightforward now that we have the
1985         shadowTreeTargetClone function. Removes use of m_targetElementInstance here.
1986
1987         * svg/SVGUseElement.h: Updated for above changes.
1988
1989         * svg/SVGUseElement.idl: Removed animatedInstanceRoot and tweaked formatting.
1990
1991 2015-01-25  Chris Dumez  <cdumez@apple.com>
1992
1993         Remove 'font' shorthand property special casing
1994         https://bugs.webkit.org/show_bug.cgi?id=140577
1995
1996         Reviewed by Darin Adler.
1997
1998         Expand system font values during 'font' property parsing. The 'font'
1999         CSS property was the only shorthand that wasn't always expanded in
2000         the CSS parser, so it needed a lot of special handling that we can
2001         now get rid of.
2002
2003         This patch is inspired from the following Blink revision:
2004         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
2005
2006         Tests:
2007         - fast/css/css2-system-fonts.html (existing)
2008         - fast/css/CSSPrimitiveValue-font-family-primitiveType.html (new)
2009         - fast/css/font-systemFontID-parsing.html (new)
2010         - fast/css/font-shorthand-line-height.html (rebased)
2011
2012         * WebCore.xcodeproj/project.pbxproj:
2013         * css/CSSCalculationValue.cpp:
2014         (WebCore::hasDoubleValue):
2015         Handle CSS_FONT_FAMILY similarly to CSS_STRING in the switch.
2016
2017         * css/CSSFontFamily.h: Added.
2018         Introduce new CSSFontFamily class to store font families inside
2019         CSSPrimitive, instead of using a simple String as previously. We need
2020         an additional 'fromSystemFontID' flag in addition to the font family
2021         name now that system font ID are expanded during parsing. This
2022         information is needed later on by the StyleBuilder (see comment below).
2023
2024         * css/CSSFontSelector.cpp:
2025         (WebCore::CSSFontSelector::addFontFaceRule):
2026         Update code dealing with font family CSSPrimitiveValues now that they
2027         hold a CSSFontFamily internally instead of a String.
2028
2029         * css/CSSParser.cpp:
2030         (WebCore::CSSParser::parseValue):
2031         (WebCore::CSSParser::parseSystemFont):
2032         Expand system font values for the 'font' property by asking the
2033         RenderTheme for the system font and using it to set the 'font'
2034         longhand properties.
2035
2036         * css/CSSParserValues.cpp:
2037         (WebCore::CSSParserValue::createCSSValue):
2038         Handle CSS_FONT_FAMILY value in the switch.
2039
2040         * css/CSSPrimitiveValue.cpp:
2041         (WebCore::CSSPrimitiveValue::primitiveType):
2042         Make sure we still expose font family CSSPrimitiveValues to the Web as
2043         CSS_STRING, even though we are using a slightly different representation
2044         internally. This is so that we don't change web-exposed behavior and I
2045         added a new layout test to cover this.
2046
2047         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2048         (WebCore::CSSPrimitiveValue::cleanup):
2049         (WebCore::CSSPrimitiveValue::getStringValue):
2050         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
2051         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2052         (WebCore::CSSPrimitiveValue::equals):
2053         Handle CSS_FONT_FAMILY type in switches.
2054
2055         * css/CSSPrimitiveValue.h:
2056         (WebCore::CSSPrimitiveValue::isFontFamily):
2057         Add method to test if a CSSPrimitiveValue holds a CSSFontFamily
2058         internally.
2059
2060         (WebCore::CSSPrimitiveValue::fontFamily):
2061         Add a getter to retrieve the internal CSSFontFamily object if the
2062         primitive type is CSS_FONT_FAMILY.
2063
2064         * css/CSSPropertyNames.in:
2065         Treat 'font' as a regular shorthand property. Specify its longhand
2066         properties so that makeprop.pl can generate the shorthand code for
2067         us. Also demote 'font' to being a low-priority property as it is
2068         now always expanded during parsing.
2069
2070         * css/CSSValuePool.cpp:
2071         (WebCore::CSSValuePool::createFontFamilyValue):
2072         * css/CSSValuePool.h:
2073         * css/StyleBuilderCustom.h:
2074         (WebCore::StyleBuilderCustom::applyValueFontFamily):
2075         - Update the 'font-family' value setter in the StyleBuilder to reflect
2076         the changes in the CSS parser. The CSSPrimitiveValues in the list now
2077         have CSS_FONT_FAMILY type instead of CSS_STRING.
2078         - We also set the 'isGenericFamily' flag if the font-family was expanded
2079           from a system font ID (e.g. caption). The 'isGenericFamily' flag is
2080           used later on to property set the 'isSpecifiedFont' flag on the
2081           FontDescription object. If we don't do this, system font values will
2082           be treated as specified fonts, which means that we will no longer use
2083           the 'use backslash as Yen sign' hack for those. This is covered by the
2084           following layout tests:
2085           - fast/text/backslash-to-yen-sign-euc.html
2086           - editing/selection/find-yensign-and-backslash.html
2087
2088         (WebCore::StyleBuilderCustom::applyInitialFont): Deleted.
2089         (WebCore::StyleBuilderCustom::applyInheritFont): Deleted.
2090         (WebCore::StyleBuilderCustom::applyValueFont): Deleted.
2091         Remove StyleBuilder code dealing with the 'font' property. Now that
2092         the 'font' property is always expanded during parsing, this code can
2093         never be reached.
2094
2095         * css/StylePropertyShorthand.cpp:
2096         (WebCore::isExpandedShorthand):
2097         Stop returning false for 'font' as it is now expanded during parsing
2098         as well. We should probably consider renaming this method to something
2099         else now that all shorthands are expanded, maybe isCSSShorthand() or
2100         isShorthandProperty().
2101
2102         (WebCore::fontShorthand): Deleted.
2103         * css/StylePropertyShorthand.h:
2104         (WebCore::matchingCustomShorthandsForLonghand): Deleted.
2105         Remove custom shorthand code for the 'font' property as it is now
2106         generated by makeprop.pl, like other shorthands.
2107
2108         * css/StyleResolver.cpp:
2109         (WebCore::StyleResolver::applyFont): Deleted.
2110         This is unused now that the StyleBuilder code for 'font' has been
2111         removed.
2112
2113         * css/makeprop.pl:
2114         Remove custom shorthand code for 'font' as it no longer requires any
2115         special handling.
2116
2117 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
2118
2119         Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
2120         https://bugs.webkit.org/show_bug.cgi?id=140862
2121         <rdar://problem/19566089>
2122
2123         Reviewed by Dan Bernstein.
2124
2125         * page/Frame.cpp:
2126         (WebCore::Frame::rangeForPoint):
2127         If there isn't a selectable text node at the given point, rangeForPoint
2128         will eventually return null. However, we can make it fail much faster
2129         by checking the initial position's text-ness and selectability.
2130
2131 2015-01-24  Darin Adler  <darin@apple.com>
2132
2133         Move height/width implementation for use element from RenderSVGViewportContainer to SVGUseElement
2134         https://bugs.webkit.org/show_bug.cgi?id=140826
2135
2136         Reviewed by Anders Carlsson.
2137
2138         Tests: svg/animations/use-animate-width-and-height.html
2139                svg/custom/use-attribute-invalidations.html
2140                svg/custom/use-dynamic-attribute-setting.html
2141
2142         This is an adaptation of work Rob Buis did in Blink:
2143
2144             http://src.chromium.org/viewvc/blink?view=revision&revision=173258
2145
2146         The goal here is to reduce use of SVGElementInstance since we are going to
2147         remove it. The tests Rob added to Blink (which I believe I improved a bit here)
2148         meant we had to fix quite a few bugs in the implementation of the width/height
2149         logic rather than just moving it. Even so, this could use even more test coverage
2150         since there is separate logic for <symbol> and <svg>, three different code paths
2151         (animation/attribute setting, initial creation, and one other), and also
2152         distinct issues for attributes not set at all, attributes set to values that
2153         can't be parsed, and attributes set with different units.
2154
2155         * rendering/svg/RenderSVGViewportContainer.cpp:
2156         (WebCore::RenderSVGViewportContainer::calcViewport): Removed the old logic.
2157
2158         * svg/SVGSVGElement.cpp:
2159         (WebCore::SVGSVGElement::SVGSVGElement): Use ASCIILiteral to more efficiently
2160         create strings from ASCII literals here.
2161         (WebCore::SVGSVGElement::parseAttribute): Default to 100%, not 0, when the
2162         width or height property are either not set or not successfully parsed. Without
2163         this change, one of the SVG tests starts failing.
2164
2165         * svg/SVGUseElement.cpp:
2166         (WebCore::updateWidthAndHeight): Added. The tricky part here is that we have
2167         to copy width and height attributes only if they were successfully parsed, and
2168         also we need to copy the current animating values, not the original attribute
2169         strings. Kind of messy, but I wanted to adapt Rob's solution for the time being,
2170         rather than inventing something new.
2171         (WebCore::SVGUseElement::svgAttributeChanged): Call updateWidthAndHeight.
2172         This is used both when actual attribute changes occur and also when animation
2173         changes the current value.
2174         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateWidthAndHeight.
2175         This is used when the shadow elements are first created.
2176         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Call updateWidthAndHeight.
2177         This was in Rob's patch, but I am not sure we have sufficient test coverage.
2178
2179 2015-01-24  Chris Dumez  <cdumez@apple.com>
2180
2181         Provide implementation for WTF::DefaultHash<bool>
2182         https://bugs.webkit.org/show_bug.cgi?id=140848
2183
2184         Reviewed by Anders Carlsson.
2185
2186         Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
2187         CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
2188         It builds now that WTF::DefaultHash<bool> is defined in WTF.
2189
2190         * platform/graphics/Font.cpp:
2191         (WebCore::Font::removeFromSystemFallbackCache):
2192
2193 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
2194
2195         [Win] Cursor assignment operator is skipping scale factor
2196         https://bugs.webkit.org/show_bug.cgi?id=140852
2197
2198         Reviewed by Chris Dumez.
2199
2200         Found by fast/events/mouse-cursor-image-set.html
2201
2202         * platform/win/CursorWin.cpp:
2203         (WebCore::Cursor::operator=): Make sure to also assign the
2204         scale factor.
2205
2206 2015-01-23  David Kilzer  <ddkilzer@apple.com>
2207
2208         [iOS] Attempt to fix the build after AVValueTiming.h moved
2209
2210         * platform/spi/ios/AVKitSPI.h: The AVValueTiming.h header moved
2211         to an unexpected location, so work around it by using local SPI
2212         declarations.
2213
2214 2015-01-23  Alexey Proskuryakov  <ap@apple.com>
2215
2216         Try to fix the build after r179056.
2217
2218         * platform/Cursor.h: (WebCore::Cursor::Cursor): Initialize dadat members in correct order.
2219
2220 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
2221
2222         [Win] Cursor copy constructor does not initialize scale factor
2223         https://bugs.webkit.org/show_bug.cgi?id=140849
2224
2225         Reviewed by Antti Koivisto.
2226
2227         Found by fast/events/mouse-cursor-image-set.html
2228
2229         Make sure the scale factor is captured during copy construction. Also make sure
2230         it is properly initialized in the default constructor, since it it used in the
2231         Windows port for some default cursors.
2232
2233         * platform/CursorWin.h:
2234         * platform/win/CursorWin.cpp:
2235         (WebCore::Cursor::Cursor): Make sure copy constructor captures
2236         the scale factor.
2237
2238 2015-01-23  Benjamin Poulain  <bpoulain@apple.com>
2239
2240         Add pointer/hover media queries
2241         https://bugs.webkit.org/show_bug.cgi?id=134822
2242
2243         Reviewed by Antti Koivisto.
2244
2245         Media Queries Level 4 introduces two types of Interaction Media Features:
2246         "pointer" and "hover". Those media features are useful for adapting the design
2247         to the type of input:
2248             http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction
2249
2250         This implementation is trivial: just #ifdef the return value depending on
2251         the support for touch events.
2252         In the future we should move that to a client interface but let's start easy
2253         for now.
2254
2255         Tests: fast/media/mq-any-hover-cssom.html
2256                fast/media/mq-any-hover-invalid.html
2257                fast/media/mq-any-hover-matchMedia.html
2258                fast/media/mq-any-hover-styling.html
2259                fast/media/mq-any-pointer-cssom.html
2260                fast/media/mq-any-pointer-invalid.html
2261                fast/media/mq-any-pointer-matchMedia.html
2262                fast/media/mq-any-pointer-styling.html
2263                fast/media/mq-hover-cssom.html
2264                fast/media/mq-hover-invalid.html
2265                fast/media/mq-hover-matchMedia.html
2266                fast/media/mq-hover-styling.html
2267                fast/media/mq-pointer-cssom.html
2268                fast/media/mq-pointer-invalid.html
2269                fast/media/mq-pointer-matchMedia.html
2270                fast/media/mq-pointer-styling.html
2271
2272         * css/CSSValueKeywords.in:
2273         * css/MediaFeatureNames.h:
2274         * css/MediaQueryEvaluator.cpp:
2275         (WebCore::hoverMediaFeatureEval):
2276         (WebCore::any_hoverMediaFeatureEval):
2277         (WebCore::pointerMediaFeatureEval):
2278         (WebCore::any_pointerMediaFeatureEval):
2279         (WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
2280         * css/MediaQueryExp.cpp:
2281         (WebCore::featureWithCSSValueID):
2282         (WebCore::featureWithZeroOrOne):
2283         (WebCore::featureWithoutValue):
2284         * page/EventHandler.cpp:
2285         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2286         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
2287         * page/Settings.in:
2288
2289 2015-01-23  Commit Queue  <commit-queue@webkit.org>
2290
2291         Unreviewed, rolling out r179051.
2292         https://bugs.webkit.org/show_bug.cgi?id=140850
2293
2294         broke the 32-bit build (Requested by thorton on #webkit).
2295
2296         Reverted changeset:
2297
2298         "[Mac][EME] Support ClearKey encryption with AES128-encrypted
2299         HLS"
2300         https://bugs.webkit.org/show_bug.cgi?id=140825
2301         http://trac.webkit.org/changeset/179051
2302
2303 2015-01-23  Joseph Pecoraro  <pecoraro@apple.com>
2304
2305         Web Inspector: Rename InjectedScriptHost::type to subtype
2306         https://bugs.webkit.org/show_bug.cgi?id=140841
2307
2308         Reviewed by Timothy Hatcher.
2309
2310         * inspector/WebInjectedScriptHost.cpp:
2311         (WebCore::WebInjectedScriptHost::subtype):
2312         (WebCore::WebInjectedScriptHost::type): Deleted.
2313         * inspector/WebInjectedScriptHost.h:
2314
2315 2015-01-23  Jer Noble  <jer.noble@apple.com>
2316
2317         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
2318         https://bugs.webkit.org/show_bug.cgi?id=140825
2319
2320         Reviewed by Eric Carlson.
2321
2322         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
2323
2324         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
2325
2326         * Modules/encryptedmedia/CDM.cpp:
2327         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
2328         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2329         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
2330         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
2331         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
2332         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
2333         * Modules/encryptedmedia/CDMPrivateClearKey.h:
2334         (WebCore::CDMPrivateClearKey::create): Simple factory.
2335         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
2336         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
2337         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
2338         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
2339         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
2340         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
2341         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
2342             URI, and return same.
2343         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
2344         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
2345         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
2346         * Modules/encryptedmedia/CDMSessionClearKey.h:
2347
2348         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
2349         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
2350
2351         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2352         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2353         (WebCore::keySystemIsSupported):
2354         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2355         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
2356         (WebCore::fulfillRequestWithKeyData): Added utility method.
2357         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2358         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
2359
2360         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
2361
2362         * Modules/encryptedmedia/MediaKeySession.cpp:
2363         (WebCore::MediaKeySession::cachedKeyForKeyId):
2364         (WebCore::MediaKeySession::addKeyTimerFired):
2365         * Modules/encryptedmedia/MediaKeySession.h:
2366         * Modules/encryptedmedia/MediaKeys.cpp:
2367         (WebCore::MediaKeys::keyAdded):
2368         (WebCore::MediaKeys::cachedKeyForKeyId):
2369         * Modules/encryptedmedia/MediaKeys.h:
2370         * html/HTMLMediaElement.cpp:
2371         (WebCore::HTMLMediaElement::keyAdded):
2372         * html/HTMLMediaElement.h:
2373         * platform/graphics/CDMSession.h:
2374         (WebCore::CDMSession::cachedKeyForKeyID):
2375         * platform/graphics/MediaPlayer.cpp:
2376         (WebCore::MediaPlayer::keyAdded):
2377         (WebCore::MediaPlayer::cachedKeyForKeyId):
2378         * platform/graphics/MediaPlayer.h:
2379         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
2380         * platform/graphics/MediaPlayerPrivate.h:
2381         (WebCore::MediaPlayerPrivateInterface::keyAdded):
2382
2383         Add new files to project:
2384
2385         * WebCore.xcodeproj/project.pbxproj:
2386         * CMakeLists.txt:
2387         * WebCore.vcxproj/WebCore.vcxproj:
2388         * WebCore.vcxproj/WebCore.vcxproj.filters:
2389
2390 2015-01-23  Chris Dumez  <cdumez@apple.com>
2391
2392         Implement system fonts FontDescription caching at RenderTheme level
2393         https://bugs.webkit.org/show_bug.cgi?id=140840
2394
2395         Reviewed by Andreas Kling.
2396
2397         Implement system fonts FontDescription caching at RenderTheme level
2398         instead of duplicating the logic in its subclasses for each platform.
2399         This reduces code / logic duplication and reduces the amount of
2400         platform-specific code. This will also make the refactoring at
2401         Bug 140577 a lot easier.
2402
2403         The caching logic remains in RenderThemeIOS class for iOS because:
2404         - It supports different system font values than all other platforms
2405         - It requires cache invalidation in some cases while other platforms
2406           do not.
2407
2408         This patch is inspired by the following Blink revision:
2409         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
2410
2411         Test: fast/css/css2-system-fonts.html
2412
2413 2015-01-23  Zalan Bujtas  <zalan@apple.com>
2414
2415         Simple line layout: Refactor line wrapping logic.
2416         https://bugs.webkit.org/show_bug.cgi?id=140834
2417
2418         Reviewed by Antti Koivisto.
2419
2420         Use a more readable structure to deal with wrapping logic. 
2421
2422         No change in functionality.
2423
2424         * rendering/SimpleLineLayout.cpp:
2425         (WebCore::SimpleLineLayout::createLineRuns):
2426
2427 2015-01-23  Zalan Bujtas  <zalan@apple.com>
2428
2429         Simple line layout: Use only FlowContents::nextTextFragment() to read fragments from the text flow.
2430         https://bugs.webkit.org/show_bug.cgi?id=140842
2431
2432         Reviewed by Antti Koivisto.
2433
2434         This is in preparation to make FlowContents a content iterator class.
2435
2436         No change in functionality.
2437
2438         * rendering/SimpleLineLayout.cpp:
2439         (WebCore::SimpleLineLayout::initializeNewLine):
2440         * rendering/SimpleLineLayoutFlowContents.h:
2441
2442 2015-01-23  Bartlomiej Gajda  <b.gajda@samsung.com>
2443
2444         [MSE] Implement Range Removal algorithm.
2445         https://bugs.webkit.org/show_bug.cgi?id=140622.
2446
2447         Reviewed by Jer Noble.
2448
2449         This extract Range Removal algorithm (Editor's Draft version, bug:26316) from remove(),
2450         to separate function to deal with old FIXME since bug in spec was resolved.
2451         This should both guarantee good order of events, and prevent from switching to 'open' state
2452         during end of stream.
2453
2454         Test: media/media-source/media-source-end-of-stream-readyState.html
2455
2456         * Modules/mediasource/MediaSource.cpp:
2457         (WebCore::MediaSource::setDurationInternal): update to use rangeRemoval(), not remove()
2458         (WebCore::MediaSource::streamEndedWithError): remove FIXME, brigning back correct order of events.
2459         * Modules/mediasource/SourceBuffer.cpp:
2460         (WebCore::SourceBuffer::remove): comments up to spec, extract rangeRemoval algorithm.
2461         (WebCore::SourceBuffer::rangeRemoval):
2462         (WebCore::SourceBuffer::removeTimerFired): comments up to spec.
2463         * Modules/mediasource/SourceBuffer.h:
2464
2465 2015-01-23  Enrica Casucci  <enrica@apple.com>
2466
2467         Hit test returns incorrect results when performed in paginated content over the page gaps.
2468         https://bugs.webkit.org/show_bug.cgi?id=140837
2469         rdar://problem/17494390
2470
2471         Reviewed by Dave Hyatt.
2472
2473         Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
2474                fast/multicol/pagination/RightToLeft-rl-hittest.html
2475
2476         When hittesting reaches the RenderView we need to check if we are
2477         in paginated content and use the correct class to compute hittest results.
2478
2479         * rendering/RenderView.cpp:
2480         (WebCore::RenderView::updateHitTestResult):
2481
2482 2015-01-23  Andreas Kling  <akling@apple.com>
2483
2484         Document should be a FontSelectorClient.
2485         <https://webkit.org/b/140833>
2486
2487         Reviewed by Antti Koivisto.
2488
2489         Make Document a FontSelectorClient so it can listen to the invalidation
2490         callbacks from FontSelector instead of having code in FontSelector that
2491         calls out to Document on invalidation.
2492
2493         * css/CSSFontSelector.cpp:
2494         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
2495         * dom/Document.cpp:
2496         (WebCore::Document::fontsNeedUpdate):
2497         (WebCore::Document::fontSelector):
2498         (WebCore::Document::clearStyleResolver):
2499         * dom/Document.h:
2500
2501 2015-01-23  Chris Dumez  <cdumez@apple.com>
2502
2503         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
2504         https://bugs.webkit.org/show_bug.cgi?id=140829
2505
2506         Reviewed by Andreas Kling.
2507
2508         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
2509         by calling CSSValuePool::createFontFamilyValue() to create the font
2510         family CSSPrimitiveValue instead of cssValuePool().createValue().
2511
2512         * css/CSSComputedStyleDeclaration.cpp:
2513         (WebCore::valueForFamily):
2514
2515 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
2516
2517         QLPreviewMenuItem popovers don't close when the page scrolls
2518         https://bugs.webkit.org/show_bug.cgi?id=140806
2519         <rdar://problem/19555618>
2520
2521         Reviewed by Beth Dakin.
2522
2523         * platform/spi/mac/QuickLookMacSPI.h:
2524         Add some SPI.
2525
2526 2015-01-23  Andreas Kling  <akling@apple.com>
2527
2528         Hang CSSFontSelector off Document instead of StyleResolver.
2529         <https://webkit.org/b/140820>
2530
2531         Reviewed by Antti Koivisto.
2532
2533         Move the CSSFontSelector from StyleResolver to Document. This is the first
2534         step towards making the CSSFontSelector be able to survive full style recalc.
2535
2536         Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
2537         though that is done in Document::clearStyleResolver() now.
2538
2539         * css/CSSFontSelector.cpp:
2540         (WebCore::CSSFontSelector::CSSFontSelector):
2541         * css/CSSFontSelector.h:
2542
2543             Modernize CSSFontSelector construction a bit by having create() return
2544             a Ref and the constructor take a Document& instead of a Document*.
2545             Also made the constructor explicit.
2546
2547         (WebCore::StyleResolver::~StyleResolver):
2548         * dom/Document.cpp:
2549         (WebCore::Document::clearStyleResolver):
2550
2551             Nuke the current CSSFontSelector in clearStyleResolver() instead of
2552             in ~StyleResolver. It's a minor change, but shows the way forward.
2553             Added a FIXME about how CSSFontSelector should eventually survive
2554             this operation.
2555
2556         (WebCore::Document::fontSelector):
2557         * css/FontLoader.cpp:
2558         (WebCore::FontLoader::loadFont):
2559         (WebCore::FontLoader::checkFont):
2560         (WebCore::FontLoader::resolveFontStyle):
2561         * css/RuleSet.cpp:
2562         (WebCore::RuleSet::addChildRules):
2563         * css/StyleResolver.h:
2564         (WebCore::StyleResolver::fontSelector): Deleted.
2565         * css/StyleResolver.cpp:
2566         (WebCore::StyleResolver::StyleResolver):
2567         (WebCore::StyleResolver::appendAuthorStyleSheets):
2568         (WebCore::StyleResolver::styleForElement):
2569         (WebCore::StyleResolver::defaultStyleForElement):
2570         (WebCore::StyleResolver::updateFont):
2571         * dom/Document.h:
2572         * html/canvas/CanvasRenderingContext2D.cpp:
2573         (WebCore::CanvasRenderingContext2D::setFont):
2574         * rendering/RenderListBox.cpp:
2575         (WebCore::RenderListBox::updateFromElement):
2576         (WebCore::RenderListBox::paintItemForeground):
2577         * rendering/RenderMenuList.cpp:
2578         (RenderMenuList::fontSelector):
2579         * rendering/RenderSearchField.cpp:
2580         (WebCore::RenderSearchField::fontSelector):
2581         * rendering/TextAutoSizing.cpp:
2582         (WebCore::TextAutoSizingValue::adjustNodeSizes):
2583         (WebCore::TextAutoSizingValue::reset):
2584         * rendering/svg/RenderSVGInlineText.cpp:
2585         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2586         * style/StyleResolveForDocument.cpp:
2587         (WebCore::Style::resolveForDocument):
2588         * style/StyleResolveTree.cpp:
2589         (WebCore::Style::resolveTree):
2590
2591             Move CSSFontSelector ownership from StyleResolver to Document.
2592
2593 2015-01-23  Jer Noble  <jer.noble@apple.com>
2594
2595         Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
2596         https://bugs.webkit.org/show_bug.cgi?id=140827
2597
2598         Reviewed by Eric Carlson.
2599
2600         Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.
2601
2602         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2603         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2604
2605 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2606
2607         [GTK] Add initial database process support
2608         https://bugs.webkit.org/show_bug.cgi?id=139491
2609
2610         Reviewed by Sergio Villar Senin.
2611
2612         * platform/sql/SQLiteFileSystem.cpp:
2613         (WebCore::SQLiteFileSystem::openDatabase): Use
2614         WebCore::fileSystemRepresentation() for the database filename,
2615         otherwise sqlite3_open() fails when the filename contains "%2E".
2616
2617 2015-01-23  Byeongha Cho  <byeongha.cho@samsung.com>
2618
2619         Initialization for some member variable of FontPlatformData
2620         https://bugs.webkit.org/show_bug.cgi?id=136327
2621
2622         Reviewed by Myles C. Maxfield.
2623
2624         No new tests. There's no functional change.
2625
2626         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2627         (WebCore::FontPlatformData::FontPlatformData):
2628         (WebCore::FontPlatformData::operator=):
2629         (WebCore::FontPlatformData::~FontPlatformData):
2630
2631 2015-01-23  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2632
2633         Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
2634         https://bugs.webkit.org/show_bug.cgi?id=140766
2635
2636         Reviewed by Andreas Kling.
2637
2638         ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
2639         a node as removal point.
2640         It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.
2641
2642         No new tests. No behavior change.
2643
2644         * dom/ContainerNodeAlgorithms.h:
2645         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
2646         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
2647         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
2648
2649 2015-01-23  Hunseop Jeong  <hs85.jeong@samsung.com>
2650
2651         [GTK] Fix debug build after r178940
2652         https://bugs.webkit.org/show_bug.cgi?id=140814
2653
2654         Reviewed by Carlos Garcia Campos.
2655
2656         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
2657         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
2658
2659 2015-01-22  Zalan Bujtas  <zalan@apple.com>
2660
2661         Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
2662         https://bugs.webkit.org/show_bug.cgi?id=140757
2663
2664         Reviewed by Antti Koivisto.
2665
2666         Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
2667         Move it to initializeNewLine(). 
2668
2669         No change in functionality.
2670
2671         * rendering/SimpleLineLayout.cpp:
2672         (WebCore::SimpleLineLayout::preWrap):
2673         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2674         (WebCore::SimpleLineLayout::initializeNewLine):
2675         * rendering/SimpleLineLayoutFlowContents.h:
2676         (WebCore::SimpleLineLayout::FlowContents::isLineBreak):
2677
2678 2015-01-22  Jer Noble  <jer.noble@apple.com>
2679
2680         [iOS] Media controls disappear when loading a HLS live stream
2681         https://bugs.webkit.org/show_bug.cgi?id=140792
2682         rdar://problem/19491658
2683
2684         Reviewed by Dean Jackson.
2685
2686         Overload reconnectControls to reconnect the "start playback" button
2687         if the control type has been set to "StartPlaybackButton".
2688
2689         * Modules/mediacontrols/mediaControlsiOS.js:
2690         (ControllerIOS.prototype.reconnectControls):
2691
2692 2015-01-22  peavo@outlook.com  <peavo@outlook.com>
2693
2694         [Win] No plugin content on some sites.
2695         https://bugs.webkit.org/show_bug.cgi?id=140780
2696
2697         Reviewed by Anders Carlsson.
2698
2699         Return script instance from ScriptController::createScriptInstanceForWidget(),
2700         instead of always returning null.
2701
2702         * bindings/js/ScriptController.cpp:
2703         (WebCore::ScriptController::createScriptInstanceForWidget):
2704         * plugins/PluginViewBase.h:
2705         (WebCore::PluginViewBase::bindingInstance):
2706
2707 2015-01-22  Jer Noble  <jer.noble@apple.com>
2708
2709         [Mac][EME] Adopt changes to AVStreamSession class methods
2710         https://bugs.webkit.org/show_bug.cgi?id=140778
2711         rdar://problem/19458200
2712
2713         Reviewed by Eric Carlson.
2714
2715         AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
2716         read and modify records stored at non-default storage locations.
2717
2718         * Modules/encryptedmedia/MediaKeySession.cpp:
2719         (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
2720         * Modules/encryptedmedia/MediaKeySession.h:
2721         * platform/graphics/CDMSession.h:
2722         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2723         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2724         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
2725         (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
2726         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
2727         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
2728
2729 2015-01-22  Michael Saboff  <msaboff@apple.com>
2730
2731         REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
2732         https://bugs.webkit.org/show_bug.cgi?id=140794
2733
2734         Reviewed by Anders Carlsson.
2735
2736         If a document.open has been set, return it instead of always returning a new,
2737         non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
2738
2739         Test: js/dom/document-overwrite-open.html
2740
2741         * bindings/js/JSHTMLDocumentCustom.cpp:
2742         (WebCore::JSHTMLDocument::getOwnPropertySlot):
2743
2744 2015-01-22  Zalan Bujtas  <zalan@apple.com>
2745
2746         Simple line layout: Reset LineState when starting a new line.
2747         https://bugs.webkit.org/show_bug.cgi?id=140789
2748
2749         Reviewed by Antti Koivisto.
2750
2751         Reset LineState when starting a new line to ensure we always
2752         start with a clean state.
2753
2754         No change in functionality.
2755
2756         * rendering/SimpleLineLayout.cpp:
2757         (WebCore::SimpleLineLayout::updateLineConstrains):
2758         (WebCore::SimpleLineLayout::initializeNewLine):
2759         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
2760         (WebCore::SimpleLineLayout::createTextRuns):
2761
2762 2015-01-22  Roger Fong  <roger_fong@apple.com>
2763
2764         [WebGL2] Create empty interface files for new WebGL2 objects.
2765         https://bugs.webkit.org/show_bug.cgi?id=140779.
2766         <rdar://problem/15002288>
2767
2768         Reviewed by Dean Jackson.
2769
2770         * CMakeLists.txt:
2771         * DerivedSources.cpp:
2772         * DerivedSources.make:
2773         * WebCore.vcxproj/WebCore.vcxproj:
2774         * WebCore.vcxproj/WebCore.vcxproj.filters:
2775         * WebCore.xcodeproj/project.pbxproj:
2776         * html/canvas/WebGLQuery.cpp: Added.
2777         (WebCore::WebGLQuery::create):
2778         (WebCore::WebGLQuery::~WebGLQuery):
2779         (WebCore::WebGLQuery::WebGLQuery):
2780         (WebCore::WebGLQuery::deleteObjectImpl):
2781         * html/canvas/WebGLQuery.h: Added.
2782         * html/canvas/WebGLQuery.idl: Added.
2783         * html/canvas/WebGLSampler.cpp: Added.
2784         (WebCore::WebGLSampler::create):
2785         (WebCore::WebGLSampler::~WebGLSampler):
2786         (WebCore::WebGLSampler::WebGLSampler):
2787         (WebCore::WebGLSampler::deleteObjectImpl):
2788         * html/canvas/WebGLSampler.h: Added.
2789         * html/canvas/WebGLSampler.idl: Added.
2790         * html/canvas/WebGLSharedObject.h:
2791         (WebCore::WebGLSharedObject::isQuery):
2792         (WebCore::WebGLSharedObject::isSampler):
2793         (WebCore::WebGLSharedObject::isSync):
2794         (WebCore::WebGLSharedObject::isTransformFeedback):
2795         (WebCore::WebGLSharedObject::isVertexArrayObject):
2796         * html/canvas/WebGLSync.cpp: Added.
2797         (WebCore::WebGLSync::create):
2798         (WebCore::WebGLSync::~WebGLSync):
2799         (WebCore::WebGLSync::WebGLSync):
2800         (WebCore::WebGLSync::deleteObjectImpl):
2801         * html/canvas/WebGLSync.h: Added.
2802         * html/canvas/WebGLSync.idl: Added.
2803         * html/canvas/WebGLTransformFeedback.cpp: Added.
2804         (WebCore::WebGLTransformFeedback::create):
2805         (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
2806         (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
2807         (WebCore::WebGLTransformFeedback::deleteObjectImpl):
2808         * html/canvas/WebGLTransformFeedback.h: Added.
2809         * html/canvas/WebGLTransformFeedback.idl: Added.
2810         * html/canvas/WebGLVertexArrayObject.cpp: Added.
2811         (WebCore::WebGLVertexArrayObject::create):
2812         (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
2813         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
2814         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
2815         * html/canvas/WebGLVertexArrayObject.h: Added.
2816         * html/canvas/WebGLVertexArrayObject.idl: Added.
2817
2818 2015-01-22  Chris Dumez  <cdumez@apple.com>
2819
2820         Fix remaining multiple targets per rule issues in DerivedSources.make
2821         https://bugs.webkit.org/show_bug.cgi?id=140790
2822
2823         Reviewed by David Kilzer.
2824
2825         Fix remaining multiple target per rule issues in DerivedSources.make,
2826         similarly to Bug 140784 and Bug 140756.
2827
2828         This was causing us to run scripts several times to generate the same
2829         files and may lead to malformed files in case of concurrency.
2830
2831         * DerivedSources.make:
2832
2833 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
2834
2835         Add a build flag for ES6 class syntax
2836         https://bugs.webkit.org/show_bug.cgi?id=140760
2837
2838         Reviewed by Michael Saboff.
2839
2840         * Configurations/FeatureDefines.xcconfig:
2841
2842 2015-01-22  Chris Dumez  <cdumez@apple.com>
2843
2844         SVGNames.cpp and HTMLNames.cpp are sometimes malformed
2845         https://bugs.webkit.org/show_bug.cgi?id=140784
2846         <rdar://problem/17701233>
2847
2848         Reviewed by David Kilzer.
2849
2850         Due to bad rules in DerivedSources.make, make_names.pl was called
2851         several times with the same arguments during build. This is because
2852         SVG/HTML/MathML each had several targets associated to the same
2853         command. This would cause the command (make_names.pl) to be called
2854         once per target. However, make_names.pl only needs to be executed
2855         once to generate all of the files currently marked as target.
2856
2857         Calling make_names.pl several times for the same files is not only
2858         wasteful, but it can also lead to malformed generated files if the
2859         scripts instances are executed in parallel as they will read / write
2860         from / to the same files.
2861
2862         This patch uses INTERMEDIATE targets instead so that we can still
2863         indicate which files are generated by make_names.pl but only run
2864         the script once.
2865
2866         This is a similar fix as for Bug 140756. There may several other
2867         similar issues in DerivedSources.make but this patch focuses on
2868         make_names.pl. I will take care of other in follow-ups if needed.
2869
2870         * DerivedSources.make:
2871
2872 2015-01-22  Chris Dumez  <cdumez@apple.com>
2873
2874         Have Counter::create() return a Ref<Counter>
2875         https://bugs.webkit.org/show_bug.cgi?id=140777
2876
2877         Reviewed by Andreas Kling.
2878
2879         Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
2880
2881         The CSSPrimitiveValue class needed some updates as well to support
2882         constructing a CSSPrimitiveValue object from a Ref<>.
2883
2884         * css/CSSPrimitiveValue.cpp:
2885         (WebCore::CSSPrimitiveValue::init):
2886         * css/CSSPrimitiveValue.h:
2887         (WebCore::CSSPrimitiveValue::create):
2888         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2889         * css/Counter.h:
2890         (WebCore::Counter::create):
2891         (WebCore::Counter::cloneForCSSOM):
2892
2893 2015-01-22  Chris Dumez  <cdumez@apple.com>
2894
2895         Drop the legacy FeatureCounter class
2896         https://bugs.webkit.org/show_bug.cgi?id=140749
2897
2898         Reviewed by Andreas Kling.
2899
2900         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
2901         instead.
2902
2903         * CMakeLists.txt:
2904         * Configurations/WebCore.xcconfig:
2905         * WebCore.exp.in:
2906         * WebCore.vcxproj/WebCore.vcxproj:
2907         * WebCore.vcxproj/WebCore.vcxproj.filters:
2908         * WebCore.xcodeproj/project.pbxproj:
2909         * html/HTMLMediaElement.cpp:
2910         (WebCore::HTMLMediaElement::parseAttribute):
2911         * loader/SubresourceLoader.cpp:
2912         (WebCore::SubresourceLoader::willSendRequest):
2913         (WebCore::SubresourceLoader::didReceiveResponse):
2914         * loader/cache/CachedResource.cpp:
2915         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
2916         * loader/cache/CachedResourceLoader.cpp:
2917         (WebCore::logMemoryCacheResourceRequest):
2918         (WebCore::CachedResourceLoader::requestResource):
2919         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2920         * page/DiagnosticLoggingKeys.cpp:
2921         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
2922         (WebCore::DiagnosticLoggingKeys::playedKey):
2923         (WebCore::DiagnosticLoggingKeys::noCacheKey):
2924         (WebCore::DiagnosticLoggingKeys::noStoreKey):
2925         (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
2926         (WebCore::DiagnosticLoggingKeys::mediaKey):
2927         (WebCore::DiagnosticLoggingKeys::isExpiredKey):
2928         (WebCore::DiagnosticLoggingKeys::loadingKey):
2929         (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
2930         (WebCore::DiagnosticLoggingKeys::reasonKey):
2931         (WebCore::DiagnosticLoggingKeys::audioKey):
2932         (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
2933         (WebCore::DiagnosticLoggingKeys::resourceRequestKey):
2934         (WebCore::DiagnosticLoggingKeys::revalidatingKey):
2935         (WebCore::DiagnosticLoggingKeys::unusedKey):
2936         (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
2937         (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
2938         (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
2939         (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
2940         (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
2941         (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
2942         (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
2943         (WebCore::DiagnosticLoggingKeys::usedKey):
2944         (WebCore::DiagnosticLoggingKeys::userKey):
2945         (WebCore::DiagnosticLoggingKeys::videoKey):
2946         (WebCore::DiagnosticLoggingKeys::webViewKey):
2947         (WebCore::DiagnosticLoggingKeys::zoomedKey):
2948         * page/DiagnosticLoggingKeys.h:
2949         * page/Settings.in:
2950         * platform/FeatureCounter.cpp: Removed.
2951         * platform/FeatureCounter.h: Removed.
2952         * platform/FeatureCounterKeys.h: Removed.
2953         * platform/ios/FeatureCounter.mm: Removed.
2954
2955 2015-01-22  Benjamin Poulain  <benjamin@webkit.org>
2956
2957         When extending the fallback transitions with their closure, we are modifying the Set while iterating it
2958         https://bugs.webkit.org/show_bug.cgi?id=140785
2959
2960         Reviewed by Andreas Kling.
2961
2962         * contentextensions/NFAToDFA.cpp:
2963         (WebCore::ContentExtensions::populateTransitions):
2964         Make that in two steps: accumulate the fallback transitions then add the closure
2965         of every element.
2966
2967 2015-01-21  Antti Koivisto  <antti@apple.com>
2968
2969         Rename SimpleFontData to Font
2970         https://bugs.webkit.org/show_bug.cgi?id=140496
2971
2972         Reviewed by Zalan Bujtas.
2973
2974         The fallback supporting Font type was renamed FontCascade.
2975         We can now rename SimpleFontData to Font matching the usual definition.
2976
2977 2015-01-22  Zalan Bujtas  <zalan@apple.com>
2978
2979         Simple line layout: Make trailing whitespace handling more explicit.
2980         https://bugs.webkit.org/show_bug.cgi?id=140776
2981
2982         Reviewed by Antti Koivisto.
2983
2984         Differentiate between committed and uncommitted trailing whitespace.
2985         This enables further cleanup in removeTrailingWhitespace().
2986
2987         No change in functionality.
2988
2989         * rendering/SimpleLineLayout.cpp:
2990         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
2991         (WebCore::SimpleLineLayout::LineState::addUncommitted):
2992         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
2993         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2994         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2995         (WebCore::SimpleLineLayout::LineState::LineState): Deleted.
2996         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
2997         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
2998
2999 2015-01-22  Alexey Proskuryakov  <ap@apple.com>
3000
3001         Crash in URL::protocol() after appcache load fails
3002         https://bugs.webkit.org/show_bug.cgi?id=140755
3003         rdar://problem/7881290
3004
3005         Reviewed by Dan Bates.
3006
3007         Test: http/tests/appcache/404-resource-with-slow-main-resource.php
3008
3009         Not every cache that isn't being updated is complete. It could also be in a zombie
3010         state after failing to load. We get rid of the cache once the main resource finishes
3011         loading, but while it's being loaded, the zombie still looks like a regular
3012         candidate application cache.
3013
3014         * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
3015         * loader/appcache/ApplicationCache.h:
3016         Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
3017         Constness doesn't make a lot of sense for these objects anyway.
3018
3019         * loader/appcache/ApplicationCacheGroup.cpp:
3020         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
3021         We can fail a main resource load when the document has a zombie appcache, too.
3022
3023         * loader/appcache/ApplicationCacheGroup.h:
3024         (WebCore::ApplicationCacheGroup::cacheIsComplete):
3025         (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
3026         These functions are only used in ApplicationCache::isComplete().
3027
3028 2015-01-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3029
3030         Avoid defining always empty Vector<TextCheckingResult>
3031         https://bugs.webkit.org/show_bug.cgi?id=140765
3032
3033         Reviewed by Alexey Proskuryakov.
3034
3035         Pass an empty vector direclty instead.
3036
3037         No new tests. No behavior change.
3038
3039         * editing/SpellChecker.cpp:
3040         (WebCore::SpellChecker::didCheckCancel):
3041
3042 2015-01-22  Chris Dumez  <cdumez@apple.com>
3043
3044         makeprop.pl script is called too many times during build
3045         https://bugs.webkit.org/show_bug.cgi?id=140756
3046         <rdar://problem/19467942>
3047
3048         Reviewed by David Kilzer.
3049
3050         The makeprop.pl script was called 4 times (instead of once) during
3051         build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
3052         had 4 associated targets and thus was called 4 times (with the same
3053         parameter). Calling it once is sufficient to generate all 4 files
3054         that were marked as target. This patch uses an INTERMEDIATE target
3055         instead so that we can indicate that several files are generated
3056         by the same command.
3057
3058         I believe this may be the reason for the sporatic build failures
3059         that look like:
3060         """
3061         CSSPropertyNames.gperf: No keywords in input file!
3062         calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
3063         """
3064         The makeprop.pl script is generating gperf's input file and calling the
3065         gperf executable on this file. If the script is executed several times
3066         in parallel, it would explain the build failures as several instances
3067         of makeprop.pl may be writing / reading from the same
3068         CSSPropertyNames.gperf file.
3069
3070         * DerivedSources.make:
3071
3072 2015-01-22  Commit Queue  <commit-queue@webkit.org>
3073
3074         Unreviewed, rolling out r178894.
3075         https://bugs.webkit.org/show_bug.cgi?id=140775
3076
3077         Broke JSC and bindings tests (Requested by ap_ on #webkit).
3078
3079         Reverted changeset:
3080
3081         "put_by_val_direct need to check the property is index or not
3082         for using putDirect / putDirectIndex"
3083         https://bugs.webkit.org/show_bug.cgi?id=140426
3084         http://trac.webkit.org/changeset/178894
3085
3086 2015-01-22  David Kilzer  <ddkilzer@apple.com>
3087
3088         [iOS] Fix iphoneos SDK builds for ios-ews queue
3089         <http://webkit.org/b/140748>
3090
3091         Reviewed by Daniel Bates.
3092
3093         * WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
3094         * platform/graphics/cg/ImageBufferCG.cpp: Switch to using
3095         "IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
3096         * platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
3097         * platform/graphics/cocoa/IOSurface.mm: Ditto.  Move definitions
3098         in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
3099         * platform/spi/cg/CoreGraphicsSPI.h: Switch to
3100         WTF_EXTERN_C_{BEGIN,END}.  Add
3101         CGContextGetFontAntialiasingStyle() and
3102         CGContextSetFontAntialiasingStyle().
3103         * platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
3104         * platform/spi/cocoa/IOReturnSPI.h: Add.
3105         * platform/spi/cocoa/IOSurfaceSPI.h: Add.
3106         * platform/spi/cocoa/IOTypesSPI.h: Add.
3107
3108 2015-01-21  Sergio Villar Senin  <svillar@igalia.com>
3109
3110         [CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
3111         https://bugs.webkit.org/show_bug.cgi?id=140720
3112
3113         Reviewed by David Hyatt.
3114
3115         Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
3116         us to ignore items spanning tracks with flex sizing functions when
3117         resolving the content-based track sizing functions. Items with
3118         span < 2 are not affected by this rule (as they will belong to a
3119         single track). This way the algorithm ensures that min-content and
3120         max-content restrictions are fulfilled before distributing the
3121         extra space.
3122
3123         Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
3124
3125         * rendering/RenderGrid.cpp:
3126         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
3127         (WebCore::integerSpanForDirection):
3128         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3129         * rendering/RenderGrid.h:
3130
3131 2015-01-22  Yusuke Suzuki  <utatane.tea@gmail.com>
3132
3133         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
3134         https://bugs.webkit.org/show_bug.cgi?id=140426
3135
3136         Reviewed by Geoffrey Garen.
3137
3138         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
3139
3140         * bindings/js/JSDOMWindowCustom.cpp:
3141         (WebCore::JSDOMWindow::getOwnPropertySlot):
3142         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3143         (WebCore::callHTMLAllCollection):
3144         (WebCore::JSHTMLAllCollection::item):
3145         * bindings/scripts/CodeGeneratorJS.pm:
3146         (GenerateGetOwnPropertySlotBody):
3147         (GenerateImplementation):
3148         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3149         (WebCore::JSFloat64Array::getOwnPropertySlot):
3150         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
3151         (WebCore::JSFloat64Array::put):
3152         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3153         (WebCore::JSTestEventTarget::getOwnPropertySlot):
3154         * bridge/runtime_array.cpp:
3155         (JSC::RuntimeArray::getOwnPropertySlot):
3156         (JSC::RuntimeArray::put):
3157
3158 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
3159
3160         [CSS Grid Layout] Size tracks using a list of all items sorted by span
3161         https://bugs.webkit.org/show_bug.cgi?id=140615
3162
3163         Reviewed by Andreas Kling.
3164
3165         In r173620 we fixed
3166         RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
3167         now collects all items spanning content-sized tracks and process
3168         them one by one after sorting them by ascending span.
3169
3170         The problem is that it was incorrectly implemented, it has two
3171         important bugs. First one is that the hash table that collects
3172         items is regenerated after processing each track, so it's actually
3173         doing nothing. Secondly we're only sorting the items on each
3174         track, instead of all the items in the grid.
3175
3176         * rendering/RenderGrid.cpp:
3177         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3178
3179 2015-01-21  Daniel Bates  <dabates@apple.com>
3180
3181         Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
3182         (https://bugs.webkit.org/show_bug.cgi?id=140742)
3183
3184         Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
3185
3186         * rendering/RenderLayerBacking.cpp:
3187         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
3188
3189 2015-01-21  Daniel Bates  <dabates@apple.com>
3190
3191         [iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
3192         https://bugs.webkit.org/show_bug.cgi?id=140742
3193
3194         Reviewed by Simon Fraser.
3195
3196         Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
3197         report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
3198         avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
3199         platform-independent compositing test results.
3200
3201         The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
3202         not make use of a tiled cache layer and defers to UIKit to handle the final compositing
3203         of the web view, including applying the page scale factor.
3204
3205         * platform/RuntimeApplicationChecksIOS.mm:
3206         (WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
3207         the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
3208         * platform/graphics/GraphicsLayer.cpp:
3209         (WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
3210         GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
3211         * platform/graphics/GraphicsLayerClient.h:
3212         (WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
3213         default implementation (returns false).
3214         * rendering/RenderLayerBacking.cpp:
3215         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
3216         returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
3217         RenderView layer.
3218         * rendering/RenderLayerBacking.h:
3219
3220 2015-01-21  Roger Fong  <roger_fong@apple.com>
3221
3222         WebGL2 (spec section 3.1): Add new types to WebGL2 API.
3223         https://bugs.webkit.org/show_bug.cgi?id=140741.
3224         <rdar://problem/19552962>
3225
3226         Reviewed by Dean Jackson.
3227
3228         * html/canvas/WebGL2RenderingContext.idl:
3229
3230 2015-01-21  Zalan Bujtas  <zalan@apple.com>
3231
3232         Simple line layout: Move nextTextFragment() to FlowContents class.
3233         https://bugs.webkit.org/show_bug.cgi?id=140738
3234
3235         Reviewed by Antti Koivisto.
3236
3237         This is in preparation to make FlowContents an iterator class.
3238         
3239         No change in functionality.
3240
3241         * rendering/SimpleLineLayout.cpp:
3242         (WebCore::SimpleLineLayout::LineState::addUncommitted):
3243         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
3244         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3245         (WebCore::SimpleLineLayout::initializeNewLine):
3246         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3247         (WebCore::SimpleLineLayout::createLineRuns):
3248         (WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
3249         (WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
3250         (WebCore::SimpleLineLayout::nextFragment): Deleted.
3251         * rendering/SimpleLineLayoutFlowContents.cpp:
3252         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
3253         * rendering/SimpleLineLayoutFlowContents.h:
3254         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
3255         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
3256
3257 2015-01-21  Andreas Kling  <akling@apple.com>
3258
3259         DocumentLoader::timing() should return a reference.
3260         <https://webkit.org/b/128272>
3261
3262         Reviewed by Antti Koivisto.
3263
3264         There is always a DocumentLoadTiming object, so return it by
3265         reference since it can never be null.
3266
3267         * Modules/gamepad/NavigatorGamepad.cpp:
3268         (WebCore::NavigatorGamepad::from):
3269         * dom/ScriptedAnimationController.cpp:
3270         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
3271         * html/HTMLMediaElement.cpp:
3272         (WebCore::HTMLMediaElement::parseAttribute):
3273         * inspector/InspectorResourceAgent.cpp:
3274         (WebCore::buildObjectForTiming):
3275         * loader/DocumentLoader.cpp:
3276         (WebCore::DocumentLoader::finishedLoading):
3277         (WebCore::DocumentLoader::willSendRequest):
3278         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
3279         (WebCore::DocumentLoader::startLoadingMainResource):
3280         * loader/DocumentLoader.h:
3281         (WebCore::DocumentLoader::timing):
3282         * loader/FrameLoader.cpp:
3283         (WebCore::FrameLoader::stopLoading):
3284         (WebCore::FrameLoader::commitProvisionalLoad):
3285         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
3286         * page/DOMWindow.cpp:
3287         (WebCore::DOMWindow::dispatchLoadEvent):
3288         * page/Performance.cpp:
3289         (WebCore::Performance::now):
3290         * page/PerformanceNavigation.cpp:
3291         (WebCore::PerformanceNavigation::redirectCount):
3292         * page/PerformanceResourceTiming.cpp:
3293         (WebCore::monotonicTimeToDocumentMilliseconds):
3294         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
3295         * page/PerformanceTiming.cpp:
3296         (WebCore::PerformanceTiming::documentLoadTiming):
3297
3298 2015-01-21  Benjamin Poulain  <benjamin@webkit.org>
3299
3300         Handle the transition on any character as a separate type of transition
3301         https://bugs.webkit.org/show_bug.cgi?id=140711
3302
3303         Reviewed by Andreas Kling.
3304
3305         Instead of considering the universal transition as 127 transitions, it is now
3306         handled as a separate type of transition.
3307
3308         The goal is to reduce the number of exit edge to consider for each node. Instead
3309         of having 127 for any partition containing one universal transition, we have
3310         as few exit edges as necessary + one universal transition.
3311
3312         In the NFA, the universal transition is stored directly on NFANode in a new
3313         HashSet (transitionsOnAnyCharacter).
3314         The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
3315         by construction. That is not strictly needed but it simplify debugging at the moment.
3316
3317         When converting a NFA to a DFA, we first find all the node that transition on any character.
3318         Then, when we iterate over "real" transition, we also augment that set with the set on
3319         any character.
3320
3321         When creating the DFA node, we first consider each "real" transition, then we have a single
3322         "fallback" transition for any character that has not been handled yet.
3323
3324         When matching, we first search for any real transition. If there is none but a fallback exists,
3325         we take the fallback.
3326
3327         * contentextensions/DFA.cpp:
3328         (WebCore::ContentExtensions::DFA::nextState):
3329         (WebCore::ContentExtensions::printTransitions):
3330         (WebCore::ContentExtensions::DFA::debugPrintDot):
3331         (WebCore::ContentExtensions::printTransition): Deleted.
3332         * contentextensions/DFANode.h:
3333         * contentextensions/NFA.cpp:
3334         (WebCore::ContentExtensions::NFA::addTransition):
3335         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
3336         (WebCore::ContentExtensions::printTransitions):
3337         (WebCore::ContentExtensions::NFA::debugPrintDot):
3338         (WebCore::ContentExtensions::printTransition): Deleted.
3339         * contentextensions/NFA.h:
3340         * contentextensions/NFANode.h:
3341         * contentextensions/NFAToDFA.cpp:
3342         (WebCore::ContentExtensions::populateTransitions):
3343         (WebCore::ContentExtensions::getOrCreateDFANode):
3344         (WebCore::ContentExtensions::NFAToDFA::convert):
3345         * contentextensions/URLFilterParser.cpp:
3346         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
3347
3348 2015-01-20  Antti Koivisto  <antti@apple.com>
3349
3350         REGRESSION(r178180): Membuster regressed ~4%
3351         https://bugs.webkit.org/show_bug.cgi?id=140495
3352
3353         Reviewed by Andreas Kling.
3354
3355         After r178180 we keep system fallback fonts that are used on glyph pages alive.
3356         Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
3357
3358         * platform/graphics/FontCache.cpp:
3359         (WebCore::FontCache::purgeInactiveFontData):
3360         * platform/graphics/FontCascade.cpp:
3361         (WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
3362         (WebCore::pruneSystemFallbackFonts):
3363         * platform/graphics/FontCascade.h:
3364         * platform/graphics/FontGlyphs.cpp:
3365         (WebCore::FontGlyphs::pruneSystemFallbacks):
3366
3367             When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
3368             and release the fallbacks.
3369
3370         * platform/graphics/FontGlyphs.h:
3371
3372 2015-01-21  Manuel Rego Casasnovas  <rego@igalia.com>
3373
3374         first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
3375         https://bugs.webkit.org/show_bug.cgi?id=138424
3376
3377         Reviewed by Benjamin Poulain.
3378
3379         Source/WebCore:
3380
3381         According to the grid and flexbox specs:
3382         "::first-letter pseudo-element do not apply to grid/flex containers".
3383         http://dev.w3.org/csswg/css-grid/#grid-containers
3384         http://dev.w3.org/csswg/css-flexbox/#flex-containers
3385
3386         Check also the CSS WG mailing list discussion:
3387         http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
3388
3389         This was almost working right, except in the case that an ancestor was
3390         setting the ::first-letter pseudo-element.
3391
3392         Added a few more cases to the current tests in order to check this
3393         behavior.
3394         Also created some new tests to increase coverage
3395
3396         Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
3397                fast/css/first-letter-ignores-display-property.html
3398
3399         * rendering/RenderBlock.cpp:
3400         (WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
3401         looking for the first text child if you reach a grid or flexbox.
3402
3403 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
3404
3405         Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
3406         https://bugs.webkit.org/show_bug.cgi?id=140670
3407
3408         Reviewed by Darin Adler.
3409
3410         * platform/efl/EflScreenUtilities.cpp:
3411         (WebCore::createCustomCursor):
3412
3413 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
3414
3415         Remove ENABLE(INSPECTOR) ifdef guards
3416         https://bugs.webkit.org/show_bug.cgi?id=140668
3417
3418         Reviewed by Darin Adler.
3419