4b7b76d5cf8f0feee15feec68b63ee7e95d7ccea
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-27  Sam Weinig  <sam@webkit.org>
2
3         Add WebKit2 SPI to create a DOM File object
4         https://bugs.webkit.org/show_bug.cgi?id=142109
5
6         Reviewed by Tim Horton.
7
8         * WebCore.xcodeproj/project.pbxproj:
9         Make <WebCore/File.h> (and associated files) available to WebKit2.
10
11 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
12
13         [Subpixel] Subpixelize RenderListMarker
14         https://bugs.webkit.org/show_bug.cgi?id=142093
15
16         Reviewed by Zalan Bujtas.
17
18         Use floats instead of ints.
19
20         Test: fast/lists/rtl-marker.html
21
22         * rendering/RenderListMarker.cpp:
23         (WebCore::RenderListMarker::paint):
24         (WebCore::RenderListMarker::updateContent):
25         (WebCore::RenderListMarker::getRelativeMarkerRect):
26         * rendering/RenderListMarker.h:
27
28 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
29
30         <attachment> should be selected immediately upon click, and be drag/copyable upon click
31         https://bugs.webkit.org/show_bug.cgi?id=142114
32         <rdar://problem/19982520>
33
34         Reviewed by Enrica Casucci.
35
36         * css/html.css:
37         (attachment):
38         Make attachment use 'user-select: all' to act as a single click-to-select unit.
39
40         * html/HTMLAttachmentElement.cpp:
41         (WebCore::HTMLAttachmentElement::setFocus): Deleted.
42         * html/HTMLAttachmentElement.h:
43         * rendering/RenderAttachment.cpp:
44         (WebCore::RenderAttachment::isFocused): Deleted.
45         (WebCore::RenderAttachment::focusChanged): Deleted.
46         * rendering/RenderAttachment.h:
47         * rendering/RenderThemeMac.mm:
48         (WebCore::RenderThemeMac::paintAttachment):
49         Remove focus-related code; instead of focusing the element upon click,
50         we get a selection including just the <attachment>, and everything
51         behaves much more consistently (copy works, drag works, etc.).
52
53 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
54
55         [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
56         https://bugs.webkit.org/show_bug.cgi?id=141371
57
58         Reviewed by David Kilzer.
59
60         Null checks.
61
62         Covered by existing mathml tests.
63
64         * rendering/mathml/RenderMathMLOperator.cpp:
65         (WebCore::RenderMathMLOperator::boundsForGlyph):
66         (WebCore::RenderMathMLOperator::advanceForGlyph):
67         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
68
69 2015-02-27  Chris Dumez  <cdumez@apple.com>
70
71         Make SourceBuffer ActiveDOMObject suspendable
72         https://bugs.webkit.org/show_bug.cgi?id=142108
73         <rdar://problem/19923085>
74
75         Reviewed by Jer Noble.
76
77         Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
78         MediaSource and does not have any pending events. This makes it more
79         likely for pages using SourceBuffer objects to go into the PageCache.
80
81         Test: fast/history/page-cache-removed-source-buffer.html
82
83         * Modules/mediasource/SourceBuffer.cpp:
84         (WebCore::SourceBuffer::canSuspend):
85         * Modules/mediasource/SourceBuffer.h:
86
87 2015-02-26  Sam Weinig  <sam@webkit.org>
88
89         Add support for canvas ellipse method
90         https://bugs.webkit.org/show_bug.cgi?id=82791
91         <rdar://problem/11159172>
92
93         Reviewed by Dirk Schulze.
94
95         Tests: fast/canvas/canvas-ellipse-360-winding.html
96                fast/canvas/canvas-ellipse-circumference-fill.html
97                fast/canvas/canvas-ellipse-circumference.html
98                fast/canvas/canvas-ellipse-connecting-line.html
99                fast/canvas/canvas-ellipse-negative-radius.html
100                fast/canvas/canvas-ellipse-zero-lineto.html
101                fast/canvas/canvas-ellipse.html
102
103         * html/canvas/CanvasPathMethods.h:
104         * html/canvas/CanvasPathMethods.cpp:
105         (WebCore::CanvasPathMethods::lineTo):
106         Convenience for passing a FloatPoint instead of two floats.
107
108         (WebCore::normalizeAngles):
109         Normalizes the angles as described in the HTML spec. Ensuring the startAngle
110         is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
111         from the start angle.
112
113         (WebCore::CanvasPathMethods::arc):
114         - Renames some of the parameters to be clearer.
115         - Normalizes the angles for consistency with ellipse.
116         - Moves hasInvertibleTransform() higher in the function for consistency.
117
118         (WebCore::CanvasPathMethods::ellipse): Added.
119
120         * html/canvas/CanvasRenderingContext2D.idl:
121         * html/canvas/DOMPath.idl:
122         Add ellipse(...).
123
124         * platform/graphics/Path.h:
125         * platform/graphics/cg/PathCG.cpp:
126         (WebCore::Path::addArc):
127         Rename parameters for clarity and use a nullptr.
128
129         (WebCore::Path::addEllipse):
130         Added. Constructs an ellipse via a transformed arc.
131
132 2015-02-27  Enrica Casucci  <enrica@apple.com>
133
134         Adding support for serializing HTMLAttachment elements.
135         https://bugs.webkit.org/show_bug.cgi?id=142026
136
137         Reviewed by Tim Horton.
138
139         Test: editing/pasteboard/copy-paste-attachment.html
140
141         Adding support to serialize the attachment element
142         and properly handle it when converting a DOM range
143         to NSAttributedString.
144
145         * editing/cocoa/HTMLConverter.mm:
146         (HTMLConverter::_processElement):
147         * editing/markup.cpp:
148         (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
149         for attachment element when serializating.
150         (WebCore::StyledMarkupAccumulator::appendElement):
151         (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
152         when creating the fragment.
153         * html/HTMLAttachmentElement.cpp:
154         (WebCore::HTMLAttachmentElement::file): Added const to file() to
155         use it in appendCustonAttributes where the element is a const reference.
156         * html/HTMLAttachmentElement.h:
157         * html/HTMLAttributeNames.in:
158
159 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
160
161         <attachment> should have an inactive style (gray in background)
162         https://bugs.webkit.org/show_bug.cgi?id=142103
163         <rdar://problem/19982486>
164
165         Reviewed by Dan Bernstein.
166
167         * rendering/RenderThemeMac.mm:
168         (WebCore::attachmentLabelInactiveBackgroundColor):
169         (WebCore::attachmentLabelInactiveTextColor):
170         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
171         (WebCore::RenderThemeMac::paintAttachmentLabel):
172         Use a gray background and gray text when the selection containing the
173         attachment isn't focused and active.
174
175 2015-02-27  Brady Eidson  <beidson@apple.com>
176
177         Add a "block-cookies" rule to the user content filter.
178         https://bugs.webkit.org/show_bug.cgi?id=142105
179
180         Reviewed by Alex Christensen.
181
182         Tests: http/tests/usercontentfilter/block-cookies-basic.html
183                http/tests/usercontentfilter/block-cookies-send.html
184
185         * contentextensions/ContentExtensionRule.h:
186
187         * contentextensions/ContentExtensionsBackend.cpp:
188         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
189         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
190         * contentextensions/ContentExtensionsBackend.h:
191
192         * contentextensions/ContentExtensionsManager.cpp:
193         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
194
195         * loader/cache/CachedResourceLoader.cpp:
196         (WebCore::CachedResourceLoader::requestResource):
197
198         * page/UserContentController.cpp:
199         (WebCore::UserContentController::actionForURL):
200         (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
201         * page/UserContentController.h:
202
203 2015-02-27  Alex Christensen  <achristensen@webkit.org>
204
205         [WinCairo] Unreviewed build fix.
206
207         * platform/graphics/BitmapImage.h:
208         * platform/win/BitmapInfo.h:
209         Added WEBCORE_EXPORT.
210
211 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
212
213         <attachment>'s label baseline should match that of the surrounding text
214         https://bugs.webkit.org/show_bug.cgi?id=142099
215         rdar://problem/19982495
216
217         Reviewed by Dan Bernstein.
218
219         * rendering/RenderAttachment.cpp:
220         (WebCore::RenderAttachment::baselinePosition):
221         * rendering/RenderAttachment.h:
222         Override baselinePosition and retrieve it from RenderTheme.
223
224         * rendering/RenderTheme.h:
225         (WebCore::RenderTheme::attachmentBaseline):
226         * rendering/RenderThemeMac.h:
227         * rendering/RenderThemeMac.mm:
228         (WebCore::AttachmentLayout::AttachmentLayout):
229         (WebCore::RenderThemeMac::attachmentBaseline):
230         Plumb the label baseline from AttachmentLayout to RenderAttachment.
231
232 2015-02-27  Commit Queue  <commit-queue@webkit.org>
233
234         Unreviewed, rolling out r180752.
235         https://bugs.webkit.org/show_bug.cgi?id=142098
236
237         Causes 10 SVG test failures on Windows. (Requested by
238         bfulgham_ on #webkit).
239
240         Reverted changeset:
241
242         "Cache glyph widths to GlyphPages"
243         https://bugs.webkit.org/show_bug.cgi?id=142028
244         http://trac.webkit.org/changeset/180752
245
246 2015-02-27  David Kilzer  <ddkilzer@apple.com>
247
248         [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
249
250         * platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
251         until header refactoring is completed.
252
253 2015-02-27  Chris Dumez  <cdumez@apple.com>
254
255         MediaSource should be suspendable when closed
256         https://bugs.webkit.org/show_bug.cgi?id=142089
257         <rdar://problem/19923085>
258
259         Reviewed by Jer Noble.
260
261         Make MediaSource ActiveDOMObject suspendable when it is in closed state
262         and it has no pending events. This increases the likelihood of pages
263         using MediaSource to enter the PageCache.
264
265         Tests: fast/history/page-cache-media-source-closed-2.html
266                fast/history/page-cache-media-source-closed.html
267                fast/history/page-cache-media-source-opened.html
268
269 2015-02-27  Andreas Kling  <akling@apple.com>
270
271         Use NeverDestroyed for JS wrapper owners.
272         <https://webkit.org/b/142090>
273
274         Reviewed by Chris Dumez.
275
276         Using NeverDestroyed puts these objects in BSS which is preferable
277         since that prevents them from pinning down entire malloc pages forever.
278
279         * bindings/scripts/CodeGeneratorJS.pm:
280         (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
281
282         * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
283
284 2015-02-27  Chris Dumez  <cdumez@apple.com>
285
286         Make IDBDatabase / IDBRequest suspendable
287         https://bugs.webkit.org/show_bug.cgi?id=142076
288         <rdar://problem/19923085>
289
290         Reviewed by Andreas Kling.
291
292         Make IDBDatabase / IDBRequest suspendable under certain conditions to
293         make it more likely for pages using indexeddb to enter the PageCache.
294
295         IDBDatabase is safely suspendable if the database is closed. IDBRequest
296         is safely suspendable if the request no longer has any pending activity
297         (i.e. state is DONE and success / failure handler was called). We may
298         be able to do better later but this is the bare minimum for now.
299
300         Tests: fast/history/page-cache-indexed-closed-db.html
301                fast/history/page-cache-indexed-opened-db.html
302
303         * Modules/indexeddb/IDBDatabase.cpp:
304         (WebCore::IDBDatabase::IDBDatabase):
305         (WebCore::IDBDatabase::closeConnection):
306         (WebCore::IDBDatabase::enqueueEvent):
307         (WebCore::IDBDatabase::canSuspend):
308         * Modules/indexeddb/IDBDatabase.h:
309         * Modules/indexeddb/IDBRequest.cpp:
310         (WebCore::IDBRequest::canSuspend):
311         * Modules/indexeddb/IDBRequest.h:
312
313 2015-02-27  Chris Dumez  <cdumez@apple.com>
314
315         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
316         https://bugs.webkit.org/show_bug.cgi?id=142052
317
318         Reviewed by Andreas Kling.
319
320         Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
321         DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
322         returning false so pages using WebDatabase would never enter the PageCache anyway.
323
324         This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
325         return false when there are open databases. This check is now equivalent to the one
326         that was in PageCache.
327
328         An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
329         to false so once a page opened a database, it will never be page-cacheable. This
330         will be taken care of separately though.
331
332         Test: fast/history/page-cache-webdatabase-opened-db.html
333
334         * Modules/webdatabase/DatabaseContext.cpp:
335         (WebCore::DatabaseContext::canSuspend):
336         * Modules/webdatabase/DatabaseContext.h:
337         * history/PageCache.cpp:
338         (WebCore::logCanCacheFrameDecision):
339         (WebCore::PageCache::canCachePageContainingThisFrame):
340         * page/DiagnosticLoggingKeys.cpp:
341         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
342         * page/DiagnosticLoggingKeys.h:
343
344 2015-02-27  Alex Christensen  <achristensen@webkit.org>
345
346         Compile DFA to bytecode.
347         https://bugs.webkit.org/show_bug.cgi?id=142031
348
349         Reviewed by Benjamin Poulain.
350
351         * WebCore.xcodeproj/project.pbxproj:
352         * contentextensions/ContentExtensionsBackend.cpp:
353         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
354         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
355         * contentextensions/ContentExtensionsBackend.h:
356         * contentextensions/DFA.cpp:
357         (WebCore::ContentExtensions::DFA::nextState): Deleted.
358         (WebCore::ContentExtensions::DFA::actions): Deleted.
359         * contentextensions/DFA.h:
360         (WebCore::ContentExtensions::DFA::size):
361         (WebCore::ContentExtensions::DFA::nodeAt):
362         * contentextensions/DFABytecode.h: Added.
363         (WebCore::ContentExtensions::instructionSizeWithArguments):
364         * contentextensions/DFABytecodeCompiler.cpp: Added.
365         (WebCore::ContentExtensions::append):
366         (WebCore::ContentExtensions::set32Bits):
367         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
368         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
369         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
370         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
371         (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
372         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
373         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
374         * contentextensions/DFABytecodeCompiler.h: Added.
375         (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
376         * contentextensions/DFABytecodeInterpreter.cpp: Added.
377         (WebCore::ContentExtensions::getBits):
378         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
379         * contentextensions/DFABytecodeInterpreter.h: Added.
380         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
381
382 2015-02-27  Zalan Bujtas  <zalan@apple.com>
383
384         Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
385         https://bugs.webkit.org/show_bug.cgi?id=138366
386
387         Reviewed by Dave Hyatt.
388
389         This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
390
391         In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
392         When a child is being detached from the tree, it removes itself from this hashmap.
393         We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
394         However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
395         is inside a flow too and continue the cleanup accordingly.
396
397         Test: fast/regions/region-with-multicolumn-embedded-crash.html
398
399         * rendering/RenderObject.cpp:
400         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
401
402 2015-02-27  Brady Eidson  <beidson@apple.com>
403
404         Add API to remove a single content filter.
405         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
406
407         Reviewed by Sam Weinig.
408
409         * page/UserContentController.cpp:
410         (WebCore::UserContentController::removeUserContentFilter):
411         * page/UserContentController.h:
412
413 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
414
415         [Win] Remove remaining SafariTheme cruft
416         https://bugs.webkit.org/show_bug.cgi?id=142075
417
418         Reviewed by Anders Carlsson.
419
420         Remove reference to SafariTheme-switching preference.
421
422         Tested by existing layout tests.
423
424         * WebCore.vcxproj/WebCore.vcxproj:
425         * WebCore.vcxproj/WebCore.vcxproj.filters:
426         * config.h:
427         * page/Settings.cpp:
428         (WebCore::Settings::fontRenderingMode):
429         (WebCore::Settings::setShouldPaintNativeControls): Deleted.
430         * page/Settings.h:
431         (WebCore::Settings::shouldPaintNativeControls): Deleted.
432         * platform/win/ScrollbarThemeWin.cpp:
433         (WebCore::ScrollbarTheme::nativeTheme):
434         * rendering/RenderThemeWin.cpp:
435         (WebCore::RenderTheme::themeForPage):
436
437 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
438
439         Add comment about CSS value name mangling
440
441         Unreviewed
442
443         * css/CSSParser.cpp:
444         (WebCore::cssValueKeywordID):
445
446 2015-02-27  Antti Koivisto  <antti@apple.com>
447
448         Cache glyph widths to GlyphPages
449         https://bugs.webkit.org/show_bug.cgi?id=142028
450
451         Reviewed by Andreas Kling.
452
453         Currently we have a separate cache in Font for glyph widths. In practice we always need
454         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
455         a per-character hash lookup from WidthIterator.
456
457         * platform/graphics/Font.cpp:
458         (WebCore::Font::Font):
459         (WebCore::Font::initCharWidths):
460         (WebCore::Font::platformGlyphInit):
461         (WebCore::createAndFillGlyphPage):
462         (WebCore::Font::computeWidthForGlyph):
463
464             Rename to make it clear this doesn't cache.
465
466         (WebCore::GlyphPage::setGlyphDataForIndex):
467
468             Initialize the width.
469             This could go to GlyphPage.cpp if we had one.
470
471         * platform/graphics/Font.h:
472         (WebCore::Font::glyphZeroWidth):
473         (WebCore::Font::isZeroWidthSpaceGlyph):
474         (WebCore::Font::zeroGlyph): Deleted.
475         (WebCore::Font::setZeroGlyph): Deleted.
476         (WebCore::Font::widthForGlyph): Deleted.
477         * platform/graphics/FontCascade.cpp:
478         (WebCore::offsetToMiddleOfGlyph):
479         * platform/graphics/FontCascadeFonts.cpp:
480         (WebCore::FontCascadeFonts::glyphDataForCharacter):
481         * platform/graphics/GlyphPage.h:
482         (WebCore::GlyphData::GlyphData):
483
484             Return width too as part of GlyphData.
485
486         (WebCore::GlyphPage::glyphDataForIndex):
487         (WebCore::GlyphPage::setGlyphDataForCharacter):
488         (WebCore::GlyphPage::setGlyphDataForIndex):
489         (WebCore::GlyphPage::GlyphPage):
490         * platform/graphics/WidthIterator.cpp:
491         (WebCore::WidthIterator::advanceInternal):
492
493             No need to lookup width separately now.
494
495         * platform/graphics/mac/ComplexTextController.cpp:
496         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
497         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
498         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
499         * rendering/mathml/RenderMathMLOperator.cpp:
500         (WebCore::RenderMathMLOperator::advanceForGlyph):
501         * rendering/svg/SVGTextRunRenderingContext.cpp:
502         (WebCore::missingGlyphForFont):
503         * svg/SVGFontData.cpp:
504         (WebCore::SVGFontData::initializeFont):
505
506 2015-02-26  Alexey Proskuryakov  <ap@apple.com>
507
508         iOS build fix after r180717.
509
510         * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
511
512 2015-02-26  Ryosuke Niwa  <rniwa@webkit.org>
513
514         isEditablePosition and related functions shouldn't move position out of table
515         https://bugs.webkit.org/show_bug.cgi?id=129200
516
517         Reviewed by Darin Adler.
518
519         This patch removes the legacy editing position for elements display: table in its computed style.
520         Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
521         such an element for historical reasons. This forced us to update the style tree before computing
522         the editability of a position because we have to check the editability of the position outside
523         the element with display: table if the position was using such a legacy editing position.
524         e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
525         should still be considered editable if the parent node of the table was editable.
526
527         This patch replaces such a legacy editing position by using modern position types:
528         PositionIsBeforeAnchor and PositionIsAfterAnchor.
529
530         No new tests since there should be no change in the user perceived editing operations.
531
532         * dom/Position.cpp:
533         (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
534         type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
535         is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
536         position inside a table.
537         (WebCore::Position::next): Ditto.
538         (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
539         of positions.
540         (WebCore::Position::atEndOfTree): Ditto.
541         (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
542         for an atomic element or a table element as done in the equivalent code in Position::upstream.
543         (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
544         (table, 1) when there are more than two children of the table.
545
546         * dom/PositionIterator.cpp:
547         (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
548         positions. So convert it to a modern position by returning a position before or after a table here.
549         * editing/ApplyBlockElementCommand.cpp:
550         (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
551         is actually empty before executing the simple code path for an empty unsplittable element. Without
552         this check, block formatting a table element will fail.
553
554         * editing/htmlediting.cpp:
555         (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
556         of a position before or after an element is determined by its parent, not the element itself.
557         (WebCore::isAtUnsplittableElement): Ditto.
558         (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
559         an element with display: table. This is the code removal for which this patch was made.
560         (WebCore::editableRootForPosition): Ditto.
561
562 2015-02-26  Timothy Horton  <timothy_horton@apple.com>
563
564         Implement <attachment> element appearance on Mac
565         https://bugs.webkit.org/show_bug.cgi?id=142023
566
567         Reviewed by Dean Jackson.
568
569         * css/CSSParser.cpp:
570         (WebCore::isValidKeywordPropertyAndValue):
571         * css/CSSPrimitiveValueMappings.h:
572         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
573         * css/CSSValueKeywords.in:
574         * css/html.css:
575         (attachment):
576         * platform/ThemeTypes.h:
577         Add a new -webkit-appearance value, attachment.
578
579         * WebCore.xcodeproj/project.pbxproj:
580         * html/HTMLAttachmentElement.cpp:
581         (WebCore::HTMLAttachmentElement::setFile):
582         Let the renderer know when the file changes (so it can relayout and repaint).
583
584         (WebCore::HTMLAttachmentElement::filePath):
585         (WebCore::HTMLAttachmentElement::fileName):
586         * html/HTMLAttachmentElement.h:
587         Handy acccessors for the full path and the name of the file.
588
589         * platform/spi/mac/IconServicesSPI.h: Added.
590         * platform/spi/mac/LaunchServicesSPI.h: Added.
591         Add some IconServices and LaunchServices SPI headers.
592
593         * rendering/RenderAttachment.cpp:
594         (WebCore::RenderAttachment::RenderAttachment):
595         Don't have a default intrinsic size; we'll adjust in layout().
596
597         (WebCore::RenderAttachment::isSelected):
598         (WebCore::RenderAttachment::isFocused):
599         (WebCore::RenderAttachment::isSelectedOrFocused):
600         Factor out from paintReplaced().
601
602         (WebCore::RenderAttachment::layout):
603         Use RenderTheme to compute the intrinsic size of this attachment.
604
605         (WebCore::RenderAttachment::paintReplaced):
606         Use RenderTheme to paint the attachment.
607
608         (WebCore::RenderAttachment::representedFileChanged):
609         When the represented file changes, we need to recompute the intrinsic size and repaint.
610
611         * rendering/RenderTheme.cpp:
612         (WebCore::RenderTheme::adjustStyle):
613         (WebCore::RenderTheme::paint):
614         (WebCore::RenderTheme::adjustAttachmentStyle):
615         (WebCore::RenderTheme::paintAttachment):
616         Plumb through the attachment appearance.
617
618         * rendering/RenderAttachment.h:
619         * rendering/RenderTheme.h:
620         (WebCore::RenderTheme::paintAttachment):
621         (WebCore::RenderTheme::attachmentIntrinsicSize):
622         * rendering/RenderThemeMac.h:
623         * rendering/RenderThemeMac.mm:
624         (WebCore::attachmentIconBackgroundColor):
625         (WebCore::attachmentIconBorderColor):
626         (WebCore::AttachmentLayout):
627         AttachmentLayout lays out the innards of the RenderThemeMac attachment
628         presentation: an icon with an optional bordered background, with a label
629         underneath it with an optional background.
630
631         (WebCore::RenderThemeMac::attachmentIntrinsicSize):
632         (WebCore::paintAttachmentIconBackground):
633         (WebCore::paintAttachmentIcon):
634         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
635         (WebCore::RenderThemeMac::paintAttachmentLabel):
636         (WebCore::RenderThemeMac::paintAttachment):
637         Paint the attachment element. Paint the optional backgrounds (and swap
638         out the text color) if the element is selected/focused.
639
640 2015-02-26  Doug Russell  <d_russell@apple.com>
641
642         AX: Expose caret browsing preference to accessibility API
643         https://bugs.webkit.org/show_bug.cgi?id=141862
644
645         Reviewed by Chris Fleizach.
646
647         Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
648         Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.
649
650         Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
651                platform/mac/accessibility/caret-browsing-attribute.html
652                platform/mac/accessibility/caret-browsing-tab-selection.html
653
654         * accessibility/AccessibilityObject.h:
655         * accessibility/mac/AccessibilityObjectMac.mm:
656         (WebCore::AccessibilityObject::caretBrowsingEnabled):
657         (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
658         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
659         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
660         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
661         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
662         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
663         (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
664
665 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
666
667         Remove unnecessary create() factory functions
668         https://bugs.webkit.org/show_bug.cgi?id=142039
669
670         Reviewed by Chris Dumez.
671
672         Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
673         and DatabaseUnpauseTask::create.
674
675         * Modules/webdatabase/DatabaseThread.cpp:
676         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
677         (WebCore::DatabaseThread::setPaused):
678         (WebCore::DatabaseUnpauseTask::create): Deleted.
679         * bindings/js/JSCryptoKeySerializationJWK.h:
680         * bindings/js/JSSubtleCryptoCustom.cpp:
681         (WebCore::importKey):
682         * html/HTMLMediaElement.cpp:
683         (WebCore::HTMLMediaElement::HTMLMediaElement):
684         * html/HTMLMediaSession.cpp:
685         (WebCore::HTMLMediaSession::create): Deleted.
686         * html/HTMLMediaSession.h:
687
688 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
689
690         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
691         https://bugs.webkit.org/show_bug.cgi?id=142061
692
693         Reviewed by Timothy Hatcher.
694
695         * inspector/CommandLineAPIModuleSource.js:
696         Replace $1-$4 "inspected objects" with $1-$99 "saved results".
697
698         * bindings/js/JSCommandLineAPIHostCustom.cpp:
699         (WebCore::JSCommandLineAPIHost::inspectedObject):
700         * inspector/CommandLineAPIHost.cpp:
701         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
702         (WebCore::CommandLineAPIHost::InspectableObject::get):
703         (WebCore::CommandLineAPIHost::addInspectedObject):
704         (WebCore::CommandLineAPIHost::inspectedObject):
705         (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
706         * inspector/CommandLineAPIHost.h:
707         * inspector/CommandLineAPIHost.idl:
708         Since we now just save the single $0 inspected object, eliminate
709         keeping track of a list of 5 values.
710
711 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
712
713         Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
714         https://bugs.webkit.org/show_bug.cgi?id=141902
715
716         Reviewed by Darin Adler.
717
718         Create instance using std::make_unique<> in CDMFactory directly. To do that,
719         CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
720
721         No new tests, no behavior changes.
722
723         * Modules/encryptedmedia/CDM.cpp:
724         (WebCore::installedCDMFactories):
725         * Modules/encryptedmedia/CDM.h:
726         * Modules/encryptedmedia/CDMPrivateClearKey.h:
727         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
728         (WebCore::CDMPrivateClearKey::create): Deleted.
729         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
730         (WebCore::CDMPrivateMediaPlayer::create): Deleted.
731         * dom/Element.cpp:
732         (WebCore::Element::attributes):
733         * dom/NamedNodeMap.h:
734         (WebCore::NamedNodeMap::NamedNodeMap):
735         (WebCore::NamedNodeMap::create): Deleted.
736         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
737         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
738
739 2015-02-26  Andy Estes  <aestes@apple.com>
740
741         [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
742         https://bugs.webkit.org/show_bug.cgi?id=142062
743
744         Reviewed by Daniel Bates.
745
746         * WebCore.xcodeproj/project.pbxproj:
747         * platform/mac/ContentFilterMac.mm:
748         * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
749         * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
750
751 2015-02-26  Anders Carlsson  <andersca@apple.com>
752
753         Add API to remove all website data for the given data records
754         https://bugs.webkit.org/show_bug.cgi?id=142060
755
756         Reviewed by Beth Dakin.
757
758         * loader/cache/MemoryCache.cpp:
759         (WebCore::MemoryCache::removeResourcesWithOrigins):
760         New function that removes all resources that match the set of origins in a given session.
761
762 2015-02-26  Chris Dumez  <cdumez@apple.com>
763
764         Rename DatabaseManager::manager() to DatabaseManager::singleton()
765         https://bugs.webkit.org/show_bug.cgi?id=142054
766
767         Reviewed by Ryosuke Niwa.
768
769         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
770         per coding style and use WTF::NeverDestroyed.
771
772         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
773         (WebCore::DOMWindowWebDatabase::openDatabase):
774         * Modules/webdatabase/DatabaseBackendBase.cpp:
775         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
776         * Modules/webdatabase/DatabaseContext.cpp:
777         (WebCore::DatabaseContext::DatabaseContext):
778         (WebCore::DatabaseContext::~DatabaseContext):
779         (WebCore::DatabaseContext::stopDatabases):
780         (WebCore::DatabaseContext::databaseExceededQuota):
781         * Modules/webdatabase/DatabaseManager.cpp:
782         (WebCore::DatabaseManager::singleton):
783         (WebCore::DatabaseManager::manager): Deleted.
784         * Modules/webdatabase/DatabaseManager.h:
785         (WebCore::DatabaseManager::~DatabaseManager): Deleted.
786         * Modules/webdatabase/SQLTransactionClient.cpp:
787         (WebCore::SQLTransactionClient::didExceedQuota):
788         * history/PageCache.cpp:
789         (WebCore::logCanCacheFrameDecision):
790         (WebCore::PageCache::canCachePageContainingThisFrame):
791         * loader/FrameLoader.cpp:
792         (WebCore::FrameLoader::stopLoading):
793
794 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
795
796         Fix the !ENABLE(GEOLOCATION) build after r180533
797         https://bugs.webkit.org/show_bug.cgi?id=142053
798
799         Reviewed by Chris Dumez.
800
801         * Modules/geolocation/GeoNotifier.cpp:
802         * Modules/geolocation/GeoNotifier.h:
803
804 2015-02-26  Dean Jackson  <dino@apple.com>
805
806         [iOS Media] incorrect front padding on time values
807         https://bugs.webkit.org/show_bug.cgi?id=142027
808         <rdar://problem/19960790>
809
810         Reviewed by Brent Fulgham.
811
812         My last commit was updating the OS X file,
813         not the iOS file.
814
815         We don't want to prefix times with a "0".
816
817         * Modules/mediacontrols/mediaControlsApple.js:
818         (Controller.prototype.formatTime):
819         * Modules/mediacontrols/mediaControlsiOS.js:
820         (ControllerIOS.prototype.formatTime):
821
822 2015-02-26  Mark Lam  <mark.lam@apple.com>
823
824         Rolling out r180602, r180608, r180613, r180617, r180671.
825         <https://webkit.org/b/141990>
826
827         Not reviewed.
828
829         The r180602 solution does result in more work for GC when worker
830         threads are in use.  Filip is uncomfortable with that.
831         The EFL and GTK ports also seem to be unhappy with this change.
832         Rolling out while we investigate.
833
834         * bindings/js/JSDOMWindowBase.cpp:
835         (WebCore::JSDOMWindowBase::commonVM):
836
837 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
838
839         [Mac] [iOS] Parsing support for -apple-trailing-word
840         https://bugs.webkit.org/show_bug.cgi?id=141939
841
842         Reviewed by Andreas Kling.
843
844         This patch implements initial parsing support for the -apple-trailing-word CSS property.
845         This property has two possible (mutually exclusive) values: auto and
846         -apple-partially-balanced. This property is inherited.
847
848         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
849
850         This is an internal property that will allow us to control line breaking behavior for
851         short paragraphs.
852
853         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
854         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
855         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
856         version.
857
858         Test: platform/mac/fast/text/trailing-word-parse.html
859
860         * Configurations/FeatureDefines.xcconfig:
861         * css/CSSComputedStyleDeclaration.cpp:
862         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
863         CSS value.
864         * css/CSSParser.cpp:
865         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
866         pair.
867         (WebCore::isKeywordPropertyID): New property is a keyword property.
868         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
869         * css/CSSPrimitiveValueMappings.h:
870         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
871         representation and CSS values.
872         (WebCore::CSSPrimitiveValue::operator TrailingWord):
873         * css/CSSPropertyNames.in: New property.
874         * css/CSSValueKeywords.in: New value.
875         * rendering/SimpleLineLayout.cpp:
876         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
877         * rendering/style/RenderStyle.h: Getter, setter and initial value.
878         * rendering/style/RenderStyleConstants.h: Internal data type.
879         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
880         * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
881
882 2015-02-26  Roger Fong  <roger_fong@apple.com>
883
884         Unreviewed. Fix a accidental deletion from r178674.
885
886         * html/canvas/WebGLRenderingContextBase.cpp:
887         (WebCore::WebGLRenderingContextBase::create):
888         Return the fake WebGL context.
889
890 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
891
892         Cleanup RenderSVGResourceClipper class.
893         https://bugs.webkit.org/show_bug.cgi?id=142032.
894
895         Reviewed by Darin Adler.
896         
897         This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
898         It includes cleanup for RenderSVGResourceClipper class.
899
900         * rendering/svg/RenderSVGResourceClipper.cpp:
901         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
902         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
903         * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
904         typedef instead of a class and rename it to ClipperMaskImage. The purpose
905         of having it a class even though it includes only one member was because
906         we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
907         as a separate object on the heap anymore.
908         
909         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
910         double hash table lookups by calling HashMap::contains() and then HashMap::get(),
911         we can use HashMap::add() instead.
912
913 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
914
915         Setting any of the <object> element plugin controlling attributes does not have any affect.
916         https://bugs.webkit.org/show_bug.cgi?id=141936.
917
918         Reviewed by Zalan Bujtas.
919
920         When setting any of the <object> element plugin controlling attributes
921         dynamically we need to mark the the element to be dirty by calling
922         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
923         
924         Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
925
926         * dom/Element.h: Delete unimplemented function.
927         
928         * html/HTMLObjectElement.cpp:
929         (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
930         setNeedsStyleRecalc() when one of the plugin controlling attributes gets
931         changed. We have to clear the m_useFallbackContent because the attribute's
932         new value might fix the object rendering.
933         
934         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
935         
936         * html/HTMLPlugInImageElement.cpp:
937         (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to 
938         reconstruct the object renderer in the image case. This can happen if the
939         image was rendering fallback content and the attribute's new value fixes
940         the object rendering.
941
942 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
943
944         [Win] Make build logs more legible by reducing noise
945         https://bugs.webkit.org/show_bug.cgi?id=142034
946
947         Reviewed by Alexey Proskuryakov.
948
949         Modify batch files, makefiles, and DOS commands to remove
950         uninteresting/unhelpful output.
951
952         * WebCore.vcxproj/WebCoreGenerated.make:
953         * WebCore.vcxproj/WebCorePreBuild.cmd:
954         * WebCore.vcxproj/copyForwardingHeaders.cmd:
955         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
956
957 2015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
958
959         [FreeType] REGRESSION(r180563): Introduced crashes
960         https://bugs.webkit.org/show_bug.cgi?id=142044
961
962         Reviewed by Martin Robinson.
963
964         No new tests, should be caught by any woff font test.
965
966         Use optionsPattern, not m_pattern, when m_pattern may be null.
967
968         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
969         (WebCore::FontPlatformData::initializeWithFontFace):
970
971 2015-02-26  Sergio Villar Senin  <svillar@igalia.com>
972
973         ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
974         https://bugs.webkit.org/show_bug.cgi?id=141645
975
976         Reviewed by Chris Dumez.
977
978         This bug has been here since r110484 but was uncovered by
979         r180140. The problem r110484 was trying to fix was that
980         CSSPrimitiveValue::convertToLength<Length> ended up calling
981         CSSPrimitiveValue::computeLengthDouble() which was apparently
982         dereferencing conversionData.style() and
983         conversionData.rootStyle() pointers without checking them. That's
984         why that fix added this condition to convertToLength():
985
986         isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
987
988         which is not correct, because for the 4 possible font relative
989         length types, 3 of them just use the style() pointer and the other
990         one just uses rootStyle() which BTW could be NULL. This erroneous
991         condition makes that function to return Length(Undefined) more
992         often than it should.
993
994         From now on it only returns Length(Undefined) if the style()
995         pointer is NULL and the font relative length type is one in the
996         set (CSS_EMS, CSS_EXS, CSS_CHS);
997
998         Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
999
1000         * css/CSSPrimitiveValue.h:
1001         * css/CSSPrimitiveValueMappings.h:
1002         (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
1003         (WebCore::CSSPrimitiveValue::convertToLength):
1004
1005
1006 2015-02-26  Andreas Kling  <akling@apple.com>
1007
1008         [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
1009         <https://webkit.org/b/142024>
1010         <rdar://problem/19966096>
1011
1012         Reviewed by Antti Koivisto.
1013
1014         libcache already listens to the OS memory pressure notifications, but we still
1015         need to manually request a cleanup when doing an iOS process suspension, or when
1016         simulating memory pressure.
1017
1018         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1019         (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
1020         cache_simulate_memory_warning_event() to make sure that nonessential objects
1021         being kept alive by NSCaches get dropped when we need the memory.
1022
1023 2015-02-25  Zalan Bujtas  <zalan@apple.com>
1024
1025         Black line across screen on Adobe Illustrator detail page (non-retina only)
1026         https://bugs.webkit.org/show_bug.cgi?id=141866
1027
1028         Reviewed by Simon Fraser.
1029
1030         Phase is relative to the destination origin. We need to take location information into account
1031         while snapping so that the result is inline with the snapped destination rect.
1032         (location affects the snapped size.)
1033
1034         Test: fast/backgrounds/gradient-background-on-subpixel-position.html
1035
1036         * rendering/RenderBoxModelObject.cpp:
1037         (WebCore::pixelSnapBackgroundImageGeometryForPainting):
1038         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1039
1040 2015-02-25  Brent Fulgham  <bfulgham@apple.com>
1041
1042         [Win] Use WEBCORE_EXPORT instead of Definition file
1043         https://bugs.webkit.org/show_bug.cgi?id=141734
1044
1045         Reviewed by Alex Christensen.
1046
1047         No change in functionality.
1048
1049         * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
1050         settings on certain files.
1051         * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
1052         by Visual Studio.
1053         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
1054         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
1055         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
1056         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
1057         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
1058         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
1059         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
1060         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
1061         * WebCorePrefix.h: Provide proper export definitions for Windows.
1062         * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
1063         needed by the new export style.
1064         * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
1065         access to parts of it.
1066         * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
1067         needed by the new export style.
1068         * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
1069         when generating WebCoreTestSupport files, so that we don't confuse
1070         the linker when WebCore.lib and WebCoreTestSupport.lib try to
1071         both export WEBCORE_EXPORT symbols.
1072         (ExportLabelForClass):
1073         (GenerateHeader):
1074         * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
1075         export style.
1076         * css/CSSParser.cpp: Ditto.
1077         * dom/Document.cpp: Ditto.
1078         * html/HTMLImageLoader.cpp: Ditto.
1079         * inspector/CommandLineAPIModule.cpp: Ditto.
1080         * inspector/PageDebuggerAgent.cpp: Ditto.
1081         * inspector/PageRuntimeAgent.cpp: Ditto.
1082         * inspector/WorkerRuntimeAgent.cpp: Ditto.
1083         * page/DOMWindow.cpp: Ditto.
1084         * page/DOMWindow.h: Export the destructor, as it is needed by
1085         DumpRenderTree (on Windows).
1086         * page/Page.cpp: Add missing #include needed by the new export style.
1087         * platform/Logging.h: Remove conflicting export declaration.
1088         * platform/PlatformExportMacros.h: Update for Windows use.
1089         * testing/Internals.cpp: Add missing #include needed by the new export style.
1090         * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
1091         are supposed to be exported by WebCoreTestSupport, not WebCore.
1092         * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
1093         new export style.
1094         * testing/js/WebCoreTestSupportPrefix.cpp: Added.
1095         * testing/js/WebCoreTestSupportPrefix.h: Added.
1096         * xml/XMLHttpRequest.h: Export the destructor.
1097         * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
1098         export style.
1099         * xml/XSLTProcessorLibxslt.cpp: Ditto.
1100
1101 2015-02-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1102
1103         Remove unnecessary DatabaseFooTask::create
1104         https://bugs.webkit.org/show_bug.cgi?id=142002
1105
1106         Reviewed by Darin Adler.
1107
1108         DatabaseFooTask::create can be replaced with std::make_unique<>.
1109
1110         No new tests, no behavior changes.
1111
1112         * Modules/webdatabase/Database.cpp:
1113         (WebCore::Database::scheduleTransaction):
1114         (WebCore::Database::scheduleTransactionStep):
1115         (WebCore::Database::markAsDeletedAndClose):
1116         (WebCore::Database::closeImmediately):
1117         (WebCore::Database::tableNames):
1118         * Modules/webdatabase/DatabaseTask.h:
1119         (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
1120         (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
1121         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
1122
1123 2015-02-25  Dean Jackson  <dino@apple.com>
1124
1125         [iOS Media] incorrect front padding on time values
1126         https://bugs.webkit.org/show_bug.cgi?id=142027
1127         <rdar://problem/19960790>
1128
1129         Reviewed by Brent Fulgham.
1130
1131         We don't want to prefix times with a "0".
1132
1133         * Modules/mediacontrols/mediaControlsApple.js:
1134         (Controller.prototype.formatTime):
1135
1136 2015-02-25  Chris Dumez  <cdumez@apple.com>
1137
1138         Make PublicURLManager suspendable
1139         https://bugs.webkit.org/show_bug.cgi?id=141977
1140         <rdar://problem/19923085>
1141
1142         Reviewed by Andreas Kling.
1143
1144         Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
1145         and returning true. Nothing prevents suspending the PublicURLManager as its
1146         implementation never causes JS to be executed. No implementation for
1147         suspend() / resume() needs to be provided for the same reason.
1148
1149         The fact that PublicURLManager wasn't suspendable was preventing pages using
1150         URL.createObjectURL() from entering the PageCache. Baidu.com search results
1151         pages are using the API for example.
1152
1153         Test: fast/history/page-cache-createObjectURL.html
1154
1155         * html/PublicURLManager.cpp:
1156         (WebCore::PublicURLManager::canSuspend):
1157         * html/PublicURLManager.h:
1158
1159 2015-02-25  Zalan Bujtas  <zalan@apple.com>
1160
1161         Cleanup BackgroundImageGeometry class.
1162         https://bugs.webkit.org/show_bug.cgi?id=141997
1163
1164         Reviewed by Simon Fraser.
1165
1166         This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
1167         removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
1168         becomes a read only class (with the exception of the clip() method).
1169
1170         No change in functionality.
1171
1172         * rendering/RenderBoxModelObject.cpp:
1173         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
1174         (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
1175         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1176         (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
1177         (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
1178         (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
1179         (WebCore::BackgroundImageGeometry::clip): Deleted.
1180         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
1181         * rendering/RenderBoxModelObject.h:
1182         (WebCore::BackgroundImageGeometry::clip):
1183         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
1184         (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
1185         (WebCore::BackgroundImageGeometry::setPhase): Deleted.
1186         (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
1187         (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
1188         (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
1189         (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
1190         (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
1191
1192 2015-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
1193
1194         Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
1195         https://bugs.webkit.org/show_bug.cgi?id=141776.
1196
1197         Reviewed by Dean Jackson.
1198
1199         Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
1200                svg/clip-path/clip-path-line-use-before-defined.svg
1201
1202         * rendering/svg/RenderSVGResourceClipper.cpp:
1203         (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
1204         is added to m_clipper if it does not exist. The same renderer might have been 
1205         added to m_clipper in resourceBoundingBox().
1206         
1207         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
1208         m_clipper if it does not exist. Return the associated ClipperData.
1209         
1210         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
1211         referenced before it is defined, add the renderer to m_clipper. While doing the
1212         layout() for the clipper, we can check if m_clipper has values or not. If it does
1213         have, we are going to mark the clipper for client invalidation which is done by
1214         the SVG root.
1215         
1216         * rendering/svg/RenderSVGResourceClipper.h:
1217         * rendering/svg/RenderSVGResourceContainer.h:
1218         (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a 
1219         new function selfNeedsClientInvalidation() which controls marking the clipper 
1220         for client invalidation. In RenderSVGResourceClipper, override it so it checks
1221         m_clipper to force clients validation even if it the first time we do layout
1222         for this clipper.
1223
1224         * rendering/svg/RenderSVGResourceContainer.cpp:
1225         (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
1226         selfNeedsClientInvalidation() to check whether we need to mark the clipper for
1227         client invalidation.
1228         
1229         * svg/SVGElement.cpp: Delete unneeded header file.
1230
1231 2015-02-25  peavo@outlook.com  <peavo@outlook.com>
1232
1233         [WinCairo] WinLauncher is not starting on Vista.
1234         https://bugs.webkit.org/show_bug.cgi?id=141905
1235
1236         Reviewed by Alex Christensen.
1237
1238         We have to soft link with Media Foundation functions to be able
1239         to start on Vista and WinXP.
1240
1241         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1242         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
1243         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1244         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
1245         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1246         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
1247         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
1248         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
1249         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1250
1251 2015-02-25  Beth Dakin  <bdakin@apple.com>
1252
1253         REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
1254         https://bugs.webkit.org/show_bug.cgi?id=142020
1255         -and corresponding-
1256         rdar://problem/19945216
1257
1258         Reviewed by Tom Horton.
1259
1260         It was a mistaken assumption that it was necessary to return false in the zero-
1261         delta case. That is clearly conceptually wrong since false represents the DOM 
1262         doing something special with the event, which is clearly not the case if we never 
1263         even send the event to the DOM. Returning true will allow the rest of the 
1264         scrolling machinery the ability to handle the event.
1265         * dom/Element.cpp:
1266         (WebCore::Element::dispatchWheelEvent):
1267
1268 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
1269
1270         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
1271         https://bugs.webkit.org/show_bug.cgi?id=142003
1272
1273         Reviewed by Sam Weinig.
1274
1275         Utilized contentEditableType to reduce the code duplication.
1276
1277         * html/HTMLElement.cpp:
1278         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
1279         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
1280
1281 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
1282
1283         [CSS Grid Layout] Tracks growing beyond limits when they should not
1284         https://bugs.webkit.org/show_bug.cgi?id=140883
1285
1286         Reviewed by Darin Adler.
1287
1288         Our track sizing algorithm implementation incorrectly grew some
1289         tracks beyond limits when handling min-content and max-content
1290         base sizes. In those cases we should only grow "any affected track
1291         that happens to also have an intrinsic max track sizing function"
1292         or all of them if there are none.
1293
1294         The problem was that we're using a vector of indexes pointing to
1295         the vector with the list of affected tracks. Those indexes become
1296         easily incorrect because the first thing we do in
1297         distributeSpaceToTracks() is to sort the vector with the affected
1298         tracks by growth potential.
1299
1300         Instead of that we now pass a vector with pointers to the list of
1301         tracks allowed to grow over the limits. The size changes are now
1302         directly stored in the GridTracks (it's called plannedSize)
1303         instead of in a separate vector, so we don't need to worry about
1304         tracks being rearranged (and we also get rid of the ugly vector of
1305         indexes pointing to another vector).
1306
1307         * rendering/RenderGrid.cpp:
1308         (WebCore::GridTrack::plannedSize): New member with getter/setter.
1309         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1310         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1311         Pass a setXXX() function instead of a growXXX() one to ForItems().
1312         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1313         Renamed additionalBreadthSpace to extraSpace which is the term
1314         used by specs.
1315         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
1316         plannedSize instead of the old distribution vector.
1317         (WebCore::GridTrack::growBaseSize): Deleted.
1318         (WebCore::GridTrack::growGrowthLimit): Deleted.
1319         * rendering/RenderGrid.h:
1320
1321 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
1322
1323         AX: Implement support for ARIA 1.1 'searchbox' role
1324         https://bugs.webkit.org/show_bug.cgi?id=142004
1325
1326         Reviewed by Chris Fleizach.
1327
1328         Add a new accessible SearchFieldRole to handle both the ARIA role
1329         and the "search" input type.
1330
1331         No new tests. Instead, added a new test case to roles-exposed.html
1332         for the mapping, and updated roles-computedRoleString.html because
1333         there is now a one-to-one mapping between the "search" input type
1334         and an ARIA role.
1335
1336         * accessibility/AccessibilityNodeObject.cpp:
1337         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1338         (WebCore::AccessibilityNodeObject::isSearchField):
1339         * accessibility/AccessibilityObject.cpp:
1340         (WebCore::AccessibilityObject::isARIATextControl):
1341         (WebCore::AccessibilityObject::isARIAInput):
1342         (WebCore::initializeRoleMap):
1343         * accessibility/AccessibilityObject.h:
1344         * accessibility/AccessibilityRenderObject.cpp:
1345         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1346         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1347         (atkRole):
1348         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1349         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1350         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1351         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1352         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1353         (createAccessibilityRoleMap):
1354
1355 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1356
1357         Clarify some resizing terminology in ScrollView/FrameView
1358         https://bugs.webkit.org/show_bug.cgi?id=141996
1359
1360         Reviewed by Zalan Bujtas.
1361
1362         ScrollableArea/ScrollView/FrameView had some confusing terminology around
1363         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
1364         
1365         Clarify this by distinguishing between:
1366         1. Available size changes because of
1367             i) non-overlay scrollbar presence
1368            ii) ScrollableArea frame change
1369         2. Removing fixedLayoutSizeChanged() and just treating it like an
1370            available size change.
1371            
1372         contentsResized() is relegated to simply being a hook that allows Mac to
1373         flash overlay scrollbars.
1374         
1375         The confusingly named visibleContentsResized() is now updateContentsSize(),
1376         and is the way that a ScrollableArea tells its subclasss that it should recompute
1377         the size of the contents (i.e. do a layout).
1378
1379         * page/FrameView.cpp:
1380         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
1381         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
1382         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
1383         (WebCore::FrameView::adjustViewSize): Whitespace.
1384         (WebCore::FrameView::layout): Ditto.
1385         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
1386         change.
1387         (WebCore::FrameView::updateContentsSize): This actually does the layout.
1388         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
1389         will bail if not a forced update.
1390         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
1391         (WebCore::FrameView::contentsResized): Deleted.
1392         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
1393         (WebCore::FrameView::visibleContentsResized): Deleted.
1394         * page/FrameView.h:
1395         * platform/ScrollView.cpp:
1396         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
1397         (WebCore::ScrollView::setUseFixedLayout): Ditto.
1398         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
1399         the reason we are being called.
1400         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
1401         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
1402         replace with updateContentsSize().
1403         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
1404         updating scrollbars, so no need to explicitly do that.
1405         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
1406         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
1407         * platform/ScrollView.h:
1408         * platform/ScrollableArea.cpp:
1409         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
1410         to flash the scrollbars.
1411         (WebCore::ScrollableArea::scrolledToRight):
1412         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
1413         scrollbar style affects available space.
1414         * platform/ScrollableArea.h:
1415         (WebCore::ScrollableArea::updateContentsSize):
1416         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
1417
1418 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
1419
1420         Unreviewed Mavericks build attempt fix after r180609.
1421
1422         * platform/graphics/mac/GraphicsContext3DMac.mm:
1423         (WebCore::GraphicsContext3D::GraphicsContext3D):
1424         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
1425
1426 2015-02-19  Roger Fong  <roger_fong@apple.com>
1427
1428         WebGL: Destroy the GLContext if a GPU restart has been detected.
1429         https://bugs.webkit.org/show_bug.cgi?id=141567.
1430         <rdar://problem/18507496>
1431
1432         Reviewed by Dean Jackson.
1433
1434         * html/canvas/WebGLRenderingContextBase.cpp:
1435         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1436         * platform/graphics/GraphicsContext3D.h:
1437         (WebCore::GraphicsContext3D::setWebGLContext): 
1438         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
1439         * platform/graphics/mac/GraphicsContext3DMac.mm:
1440         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
1441         (WebCore::GraphicsContext3D::GraphicsContext3D): 
1442         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
1443         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1444         (WebCore::GraphicsContext3D::forceContextLost): 
1445         Force the WebGLRenderingContext to be lost.
1446         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
1447         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
1448         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
1449         * platform/spi/ios/OpenGLESSPI.h: Added.
1450
1451 2015-02-24  Stephanie Lewis  <slewis@apple.com>
1452
1453         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
1454
1455         * bindings/js/JSDOMWindowBase.cpp:
1456         (WebCore::JSDOMWindowBase::commonVM):
1457
1458 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1459
1460         Use an enum for scrollbar style
1461         https://bugs.webkit.org/show_bug.cgi?id=141985
1462
1463         Reviewed by Beth Dakin.
1464
1465         Switch to an enum class for the scrollbar style (normal or overlay).
1466
1467         * page/ChromeClient.h:
1468         * page/FrameView.cpp:
1469         (WebCore::FrameView::scrollbarStyleChanged):
1470         * page/FrameView.h:
1471         * platform/ScrollTypes.h:
1472         * platform/ScrollView.cpp:
1473         (WebCore::ScrollView::scrollbarStyleChanged):
1474         * platform/ScrollView.h:
1475         * platform/ScrollableArea.h:
1476         (WebCore::ScrollableArea::scrollbarStyleChanged):
1477         * platform/mac/ScrollAnimatorMac.mm:
1478         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1479
1480 2015-02-24  Commit Queue  <commit-queue@webkit.org>
1481
1482         Unreviewed, rolling out r180599.
1483         https://bugs.webkit.org/show_bug.cgi?id=141998
1484
1485         Lots of new test failures (Requested by smfr on #webkit).
1486
1487         Reverted changeset:
1488
1489         "Parsing support for -webkit-trailing-word"
1490         https://bugs.webkit.org/show_bug.cgi?id=141939
1491         http://trac.webkit.org/changeset/180599
1492
1493 2015-02-24  Sam Weinig  <sam@webkit.org>
1494
1495         [Attachment] Give <attachment> elements an underlying File
1496         https://bugs.webkit.org/show_bug.cgi?id=141993
1497
1498         Reviewed by Tim Horton.
1499
1500         - Add a JS subclass for attachments so that <attachment>s are
1501           instances of HTMLAttachmentElement rather than HTMLElement.
1502         - Give HTMLAttachmentElements an underlying File that they
1503           are the representation of. Expose it via a new 'file' property.
1504         - Expose a new Internals function called window.internals.createFile(url)
1505           that allows creating File objects for testing.
1506
1507         * CMakeLists.txt:
1508         * DerivedSources.cpp:
1509         * DerivedSources.make:
1510         * WebCore.vcxproj/WebCore.vcxproj:
1511         * WebCore.vcxproj/WebCore.vcxproj.filters:
1512         * WebCore.xcodeproj/project.pbxproj:
1513         * fileapi/File.h:
1514         * html/HTMLAttachmentElement.cpp:
1515         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
1516         (WebCore::HTMLAttachmentElement::file):
1517         (WebCore::HTMLAttachmentElement::setFile):
1518         * html/HTMLAttachmentElement.h:
1519         * html/HTMLAttachmentElement.idl: Added.
1520         * html/HTMLTagNames.in:
1521         * testing/Internals.cpp:
1522         (WebCore::Internals::createFile):
1523         * testing/Internals.h:
1524         * testing/Internals.idl:
1525
1526 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
1527
1528         AX: Implement support for ARIA 1.1 'switch' role
1529         https://bugs.webkit.org/show_bug.cgi?id=141986
1530
1531         Reviewed by Chris Fleizach.
1532
1533         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
1534         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
1535         widget to accessibility APIs (supports and emits notifications when
1536         toggled, doesn't have children, exposes a name and description when
1537         provided).
1538
1539         Tests: accessibility/aria-switch-checked.html
1540                accessibility/aria-switch-sends-notification.html
1541                accessibility/aria-switch-text.html
1542
1543         * accessibility/AccessibilityNodeObject.cpp:
1544         (WebCore::AccessibilityNodeObject::canHaveChildren):
1545         (WebCore::AccessibilityNodeObject::isChecked):
1546         (WebCore::AccessibilityNodeObject::visibleText):
1547         (WebCore::AccessibilityNodeObject::title):
1548         * accessibility/AccessibilityObject.cpp:
1549         (WebCore::AccessibilityObject::isARIAInput):
1550         (WebCore::AccessibilityObject::actionVerb):
1551         (WebCore::initializeRoleMap):
1552         (WebCore::AccessibilityObject::supportsChecked):
1553         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1554         * accessibility/AccessibilityObject.h:
1555         (WebCore::AccessibilityObject::isSwitch):
1556         * accessibility/atk/AXObjectCacheAtk.cpp:
1557         (WebCore::AXObjectCache::postPlatformNotification):
1558         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1559         (atkRole):
1560         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1561         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1562         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1563         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1564         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1565         (createAccessibilityRoleMap):
1566         (-[WebAccessibilityObjectWrapper subrole]):
1567         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1568
1569 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
1570
1571         [Mac] [iOS] Parsing support for -apple-trailing-word
1572         https://bugs.webkit.org/show_bug.cgi?id=141939
1573
1574         Reviewed by Andreas Kling.
1575
1576         This patch implements initial parsing support for the -apple-trailing-word CSS property.
1577         This property has two possible (mutually exclusive) values: auto and
1578         -apple-partially-balanced. This property is inherited.
1579
1580         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
1581
1582         This is an internal property that will allow us to control line breaking behavior for
1583         short paragraphs.
1584
1585         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
1586         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
1587         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
1588         version.
1589
1590         Test: platform/mac/fast/text/trailing-word-parse.html
1591
1592         * Configurations/FeatureDefines.xcconfig:
1593         * css/CSSComputedStyleDeclaration.cpp:
1594         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
1595         CSS value.
1596         * css/CSSParser.cpp:
1597         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
1598         pair.
1599         (WebCore::isKeywordPropertyID): New property is a keyword property.
1600         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
1601         * css/CSSPrimitiveValueMappings.h:
1602         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
1603         representation and CSS values.
1604         (WebCore::CSSPrimitiveValue::operator TrailingWord):
1605         * css/CSSPropertyNames.in: New property.
1606         * css/CSSValueKeywords.in: New value.
1607         * rendering/SimpleLineLayout.cpp:
1608         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
1609         * rendering/style/RenderStyle.h: Getter, setter and initial value.
1610         * rendering/style/RenderStyleConstants.h: Internal data type.
1611         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
1612
1613 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1614
1615         Remove DecodingTask::create and DatabaseOpenTask::create
1616         https://bugs.webkit.org/show_bug.cgi?id=141966
1617
1618         Reviewed by Anders Carlsson.
1619
1620         These create() factory functions are redundant. We can use std::make_unique<> directly.
1621
1622         No new tests, no behavior changes.
1623
1624         * Modules/webaudio/AsyncAudioDecoder.cpp:
1625         (WebCore::AsyncAudioDecoder::decodeAsync):
1626         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
1627         * Modules/webaudio/AsyncAudioDecoder.h:
1628         * Modules/webdatabase/Database.cpp:
1629         (WebCore::Database::openAndVerifyVersion):
1630         * Modules/webdatabase/DatabaseTask.h:
1631         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
1632
1633 2015-02-24  Commit Queue  <commit-queue@webkit.org>
1634
1635         Unreviewed, rolling out r180578.
1636         https://bugs.webkit.org/show_bug.cgi?id=141992
1637
1638         Broke scrolling in Inspector Console. (Requested by JoePeck on
1639         #webkit).
1640
1641         Reverted changeset:
1642
1643         "[Mac] WebKit abandons overlay scrollbar CALayers."
1644         https://bugs.webkit.org/show_bug.cgi?id=141943
1645         http://trac.webkit.org/changeset/180578
1646
1647 2015-02-24  Dean Jackson  <dino@apple.com>
1648
1649         [ios Media] the inline controls are visible after pressing Done on iPhone
1650         https://bugs.webkit.org/show_bug.cgi?id=141987
1651         <rdar://problem/19944110>
1652
1653         Reviewed by Beth Dakin.
1654
1655         When exiting out of a playing video, we should show the
1656         start playback button if we don't allow inline media
1657         (such as on iPhone).
1658
1659         * Modules/mediacontrols/mediaControlsiOS.js:
1660         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
1661         allowsInline as well.
1662
1663 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1664
1665         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
1666         https://bugs.webkit.org/show_bug.cgi?id=141982
1667
1668         Reviewed by Simon Fraser.
1669
1670         There should always be a valid FillLayer.
1671
1672         No change in functionality.
1673
1674         * rendering/RenderBox.cpp:
1675         (WebCore::RenderBox::getBackgroundPaintedExtent):
1676         (WebCore::RenderBox::maskClipRect):
1677         (WebCore::RenderBox::repaintLayerRectsForImage):
1678         * rendering/RenderBoxModelObject.cpp:
1679         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1680         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1681         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1682         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1683         * rendering/RenderBoxModelObject.h:
1684
1685 2015-02-24  Dean Jackson  <dino@apple.com>
1686
1687         [iOS Media] Be specific about which document to use for the timeline background canvas
1688         https://bugs.webkit.org/show_bug.cgi?id=141981
1689
1690         Reviewed by Eric Carlson.
1691
1692         In some cases, especially with nested iframes, the document
1693         reference for the shadow DOM might not be the one used
1694         to create a -webkit-canvas context for rendering via CSS.
1695         Explicitly get the context from the video's owner
1696         document.
1697
1698         There is still a bug here:
1699         https://bugs.webkit.org/show_bug.cgi?id=141983
1700
1701         * Modules/mediacontrols/mediaControlsiOS.js:
1702         (ControllerIOS.prototype.drawTimelineBackground):
1703
1704 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1705
1706         Remove unused BackgroundImageGeometry::m_destOrigin
1707         https://bugs.webkit.org/show_bug.cgi?id=141980
1708
1709         Reviewed by Simon Fraser.
1710
1711         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
1712         They are not used at all.
1713
1714         No change in functionality.
1715
1716         * rendering/RenderBoxModelObject.cpp:
1717         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1718         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
1719         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1720         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
1721         * rendering/RenderBoxModelObject.h:
1722         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
1723         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
1724         * rendering/svg/RenderSVGResourceMasker.cpp:
1725         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
1726
1727 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1728
1729         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
1730         https://bugs.webkit.org/show_bug.cgi?id=141979
1731
1732         Reviewed by Simon Fraser.
1733
1734         No change in functionality.
1735
1736         * rendering/RenderBox.cpp:
1737         (WebCore::RenderBox::getBackgroundPaintedExtent):
1738         (WebCore::RenderBox::maskClipRect):
1739         (WebCore::RenderBox::repaintLayerRectsForImage):
1740         * rendering/RenderBoxModelObject.cpp:
1741         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1742         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1743         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1744         * rendering/RenderBoxModelObject.h:
1745
1746 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1747
1748         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
1749         https://bugs.webkit.org/show_bug.cgi?id=141972
1750
1751         Reviewed by Simon Fraser.
1752
1753         Image geometry's phase represents distance.
1754
1755         No change in functionality.
1756
1757         * WebCore.order:
1758         * platform/graphics/GraphicsLayer.h:
1759         (WebCore::GraphicsLayer::setContentsTilePhase):
1760         (WebCore::GraphicsLayer::contentsTilePhase):
1761         * platform/graphics/texmap/TextureMapperLayer.cpp:
1762         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
1763         (WebCore::TextureMapperLayer::setContentsTilePhase):
1764         * platform/graphics/texmap/TextureMapperLayer.h:
1765         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1766         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
1767         * rendering/RenderBoxModelObject.cpp:
1768         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1769         (WebCore::BackgroundImageGeometry::setNoRepeatX):
1770         (WebCore::BackgroundImageGeometry::setNoRepeatY):
1771         (WebCore::BackgroundImageGeometry::useFixedAttachment):
1772         (WebCore::BackgroundImageGeometry::relativePhase):
1773         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
1774         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1775         * rendering/RenderBoxModelObject.h:
1776         (WebCore::BackgroundImageGeometry::phase):
1777         (WebCore::BackgroundImageGeometry::setPhase):
1778         (WebCore::BackgroundImageGeometry::setPhaseX):
1779         (WebCore::BackgroundImageGeometry::setPhaseY):
1780         * rendering/RenderLayerBacking.cpp:
1781         (WebCore::RenderLayerBacking::resetContentsRect):
1782         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1783         * rendering/svg/RenderSVGResourceMasker.cpp:
1784         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
1785
1786 2015-02-24  Andreas Kling  <akling@apple.com>
1787
1788         [Mac] WebKit abandons overlay scrollbar CALayers.
1789         <https://webkit.org/b/141943>
1790         <rdar://problem/19932199>
1791
1792         Reviewed by Beth Dakin.
1793
1794         * platform/mac/ScrollAnimatorMac.mm:
1795         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
1796         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
1797         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
1798         amounts of abandoned memory to accumulate over time.
1799
1800 2015-02-24  Anders Carlsson  <andersca@apple.com>
1801
1802         Implement more of the data fetching API
1803         https://bugs.webkit.org/show_bug.cgi?id=141975
1804
1805         Reviewed by Andreas Kling.
1806
1807         Add API for getting origins in a given session that has cached data.
1808
1809         * loader/cache/MemoryCache.cpp:
1810         (WebCore::MemoryCache::originsWithCache):
1811
1812 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1813
1814         Use nullptr in more places in FrameView, RenderView, RenderObject
1815         https://bugs.webkit.org/show_bug.cgi?id=141974
1816
1817         Reviewed by Zalan Bujtas.
1818
1819         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
1820         
1821         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
1822         to make it more clear that it's a count.
1823
1824         * page/FrameView.cpp:
1825         (WebCore::FrameView::FrameView):
1826         (WebCore::FrameView::reset):
1827         (WebCore::FrameView::setContentsSize):
1828         (WebCore::FrameView::calculateScrollbarModesForLayout):
1829         (WebCore::FrameView::layerForScrolling):
1830         (WebCore::FrameView::layerForHorizontalScrollbar):
1831         (WebCore::FrameView::layerForVerticalScrollbar):
1832         (WebCore::FrameView::layerForScrollCorner):
1833         (WebCore::FrameView::tiledBacking):
1834         (WebCore::FrameView::scrollLayerID):
1835         (WebCore::FrameView::layerForOverhangAreas):
1836         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
1837         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
1838         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
1839         (WebCore::FrameView::layoutRoot):
1840         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
1841         (WebCore::FrameView::layout):
1842         (WebCore::FrameView::hostWindow):
1843         (WebCore::FrameView::scheduleRelayout):
1844         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1845         (WebCore::FrameView::needsLayout):
1846         (WebCore::FrameView::setNeedsLayout):
1847         (WebCore::FrameView::enclosingScrollableArea):
1848         (WebCore::FrameView::parentFrameView):
1849         (WebCore::FrameView::paintControlTints):
1850         (WebCore::FrameView::adjustPageHeightDeprecated):
1851         (WebCore::FrameView::axObjectCache):
1852         * page/FrameView.h:
1853         * rendering/RenderObject.cpp:
1854         (WebCore::RenderObject::RenderObject):
1855         (WebCore::RenderObject::nextInPreOrderAfterChildren):
1856         (WebCore::RenderObject::previousInPreOrder):
1857         (WebCore::RenderObject::firstLeafChild):
1858         (WebCore::RenderObject::lastLeafChild):
1859         (WebCore::RenderObject::traverseNext):
1860         (WebCore::RenderObject::firstLineBlock):
1861         (WebCore::RenderObject::containerForRepaint):
1862         (WebCore::RenderObject::showRenderSubTreeAndMark):
1863         (WebCore::RenderObject::localToAbsolute):
1864         (WebCore::RenderObject::container):
1865         * rendering/RenderObject.h:
1866         (WebCore::RenderObject::virtualContinuation):
1867         (WebCore::RenderObject::node):
1868         (WebCore::RenderObject::nonPseudoNode):
1869         (WebCore::RenderObject::localToAbsoluteQuad):
1870         (WebCore::RenderObject::absoluteQuads):
1871         (WebCore::RenderObject::absoluteClippedOverflowRect):
1872         (WebCore::RenderObject::outlineBoundsForRepaint):
1873         (WebCore::RenderObject::computeAbsoluteRepaintRect):
1874         (WebCore::RenderObject::selectionRect):
1875         (WebCore::RenderObject::imageChanged):
1876         (WebCore::RenderObject::addFocusRingRects):
1877         (WebCore::RenderObject::absoluteOutlineBounds):
1878         * rendering/RenderView.cpp:
1879         (WebCore::SelectionIterator::next):
1880         (WebCore::RenderView::RenderView):
1881         (WebCore::RenderView::mapLocalToContainer):
1882         (WebCore::RenderView::pushMappingToContainer):
1883         (WebCore::RenderView::computeRectForRepaint):
1884         (WebCore::rendererAfterPosition):
1885         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1886         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
1887         * rendering/RenderView.h:
1888
1889 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1890
1891         REGRESSION(r179429): Can't type comments in Facebook
1892         https://bugs.webkit.org/show_bug.cgi?id=141859
1893
1894         Reviewed by Brent Fulgham.
1895
1896         Enable SymbolEnabled runtime flag in inspector context.
1897
1898         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
1899         * WebCore.order:
1900         * WebCore.vcxproj/WebCore.vcxproj:
1901         * WebCore.vcxproj/WebCore.vcxproj.filters:
1902         * bindings/js/JSDOMWindowBase.cpp:
1903         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
1904         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
1905         * bindings/js/JSDOMWindowBase.h:
1906         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1907         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
1908         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
1909         * bindings/js/JSWorkerGlobalScopeBase.h:
1910         * inspector/InspectorFrontendClientLocal.cpp:
1911         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
1912         * page/Settings.h:
1913         * page/Settings.in:
1914
1915 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
1916
1917         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
1918         https://bugs.webkit.org/show_bug.cgi?id=141748
1919
1920         Reviewed by Sergio Villar Senin.
1921
1922         The first step of grid item placement algorithm has been updated in
1923         order to support both "sparse" and "dense" modes. Current code is always
1924         doing a "dense" packing in this case.
1925
1926         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
1927
1928         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
1929
1930         * rendering/RenderGrid.cpp:
1931         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
1932         for each row/column and use it to place items in the right position.
1933
1934 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
1935
1936         [GTK] Layout Test accessibility/roles-exposed.html is failing
1937         https://bugs.webkit.org/show_bug.cgi?id=141960
1938
1939         Reviewed by Martin Robinson.
1940
1941         The test was failing because Gtk now uses GtkColorChooserDialog for the
1942         color input, making the input field a button which results in the color
1943         chooser dialog appearing. As a side effect of this change, the input now
1944         has an accessible role of ColorWell, which is currently mapped to
1945         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
1946         upon activating the button input field). Changed the Gtk platform mapping
1947         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
1948
1949         No new tests. Instead, updated and unskipped failing test.
1950
1951         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1952         (atkRole):
1953
1954 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1955
1956         [GTK] Fonts loaded via @font-face look bad
1957         https://bugs.webkit.org/show_bug.cgi?id=140994
1958
1959         Reviewed by Martin Robinson.
1960
1961         We've had several complaints that woff fonts look bad on some websites. This seems to be a
1962         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
1963         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
1964         use sane default settings from Fontconfig when loading a web font, rather than accepting the
1965         default settings from GTK+, which are normally overridden by Fontconfig when loading system
1966         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
1967         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
1968         issues when fonts with poor native hinting are only tested in browsers that do not use the
1969         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
1970         bytecode interpreter.
1971
1972         The net result of this is that there should be little noticable difference if you have GTK+
1973         set to use slight hinting (which forces use of the autohinter) unless you have customized
1974         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
1975         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
1976
1977         No new tests, since the affected fonts we've found are not freely redistributable.
1978
1979         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1980         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
1981         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1982         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
1983         (WebCore::getDefaultFontconfigOptions): Added.
1984         (WebCore::FontPlatformData::initializeWithFontFace): Always call
1985         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
1986         created with an FcPattern (e.g. because this is a web font), call
1987         getDefaultFontconfigOptions to get a sane default FcPattern.
1988         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
1989         (WebCore::getDefaultFontOptions): Deleted.
1990
1991 2015-02-24  Andreas Kling  <akling@apple.com>
1992
1993         [Cocoa] Break internal reference cycle in WebCore::Font.
1994         <https://webkit.org/b/141941>
1995         <rdar://problem/19650570>
1996
1997         Reviewed by Antti Koivisto.
1998
1999         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
2000         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
2001
2002         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
2003         variant (really "this") in Font::m_derivedData->smallCaps.
2004
2005         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
2006         This stops us from accumulating tons of abandoned Font objects over time.
2007
2008         * platform/graphics/Font.cpp:
2009         (WebCore::Font::verticalRightOrientationFont):
2010         (WebCore::Font::uprightOrientationFont):
2011         (WebCore::Font::smallCapsFont):
2012         (WebCore::Font::emphasisMarkFont):
2013         (WebCore::Font::brokenIdeographFont):
2014         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
2015
2016         * platform/graphics/cocoa/FontCocoa.mm:
2017         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
2018
2019 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2020
2021         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
2022         https://bugs.webkit.org/show_bug.cgi?id=141650
2023
2024         Reviewed by Benjamin Poulain.
2025
2026         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
2027         This patch stores them as private slots in JSReadableStream.
2028         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
2029
2030         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
2031         That may be the cleanest solution, especially if other APIs express the same need.
2032         Another alternative is to store DeferredWrapper in ReadableStream objects.
2033         But it is currently preferred to keep DeferredWrapper in bindings/js code.
2034
2035         Added new constructor for DeferredWrapper to use these stored values.
2036         Updated ready and closed methods to use that new constructor.
2037         Changes are covered by new test in streams/readablestream-constructor.html.
2038
2039         * bindings/js/JSDOMPromise.cpp:
2040         (WebCore::DeferredWrapper::DeferredWrapper):
2041         * bindings/js/JSDOMPromise.h:
2042         * bindings/js/JSReadableStreamCustom.cpp:
2043         (WebCore::closedPromiseSlotName):
2044         (WebCore::getOrCreatePromiseDeferredFromObject):
2045         (WebCore::readyPromiseSlotName):
2046         (WebCore::JSReadableStream::ready):
2047         (WebCore::JSReadableStream::closed):
2048         * bindings/js/ReadableStreamJSSource.cpp:
2049         (WebCore::setInternalSlotToObject):
2050         (WebCore::getInternalSlotFromObject):
2051         * bindings/js/ReadableStreamJSSource.h:
2052
2053 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
2054
2055         Always serialize :lang()'s arguments to strings
2056         https://bugs.webkit.org/show_bug.cgi?id=141944
2057
2058         Reviewed by Benjamin Poulain.
2059
2060         As specified in [1] :lang()'s arguments are always serialized to strings.
2061
2062         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
2063
2064         Related tests are updated.
2065
2066         * css/CSSGrammar.y.in:
2067         * css/CSSParserValues.cpp:
2068         (WebCore::CSSParserSelector::setLangArgumentList):
2069         * css/CSSParserValues.h:
2070         (WebCore::CSSParserString::init):
2071         (WebCore::CSSParserString::clear):
2072         (WebCore::CSSParserString::tokenType): Deleted.
2073         (WebCore::CSSParserString::setTokenType): Deleted.
2074         * css/CSSSelector.cpp:
2075         (WebCore::appendLangArgumentList):
2076         (WebCore::CSSSelector::setLangArgumentList):
2077         * css/CSSSelector.h:
2078         (WebCore::CSSSelector::langArgumentList):
2079         * css/SelectorCheckerTestFunctions.h:
2080         (WebCore::matchesLangPseudoClass):
2081         * cssjit/SelectorCompiler.cpp:
2082         (WebCore::SelectorCompiler::addPseudoClassType):
2083         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2084
2085 2015-02-24  Antti Koivisto  <antti@apple.com>
2086
2087        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
2088
2089         * css/StyleResolver.cpp:
2090         (WebCore::StyleResolver::loadPendingImages):
2091
2092 2015-02-23  Commit Queue  <commit-queue@webkit.org>
2093
2094         Unreviewed, rolling out r180547 and r180550.
2095         https://bugs.webkit.org/show_bug.cgi?id=141957
2096
2097         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
2098
2099         Reverted changesets:
2100
2101         "REGRESSION(r179429): Can't type comments in Facebook"
2102         https://bugs.webkit.org/show_bug.cgi?id=141859
2103         http://trac.webkit.org/changeset/180547
2104
2105         "Constructor returning null should construct an object instead
2106         of null"
2107         https://bugs.webkit.org/show_bug.cgi?id=141640
2108         http://trac.webkit.org/changeset/180550
2109
2110 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
2111
2112         Disable font loading events until our implementation gets updated to match the latest spec
2113         https://bugs.webkit.org/show_bug.cgi?id=141938
2114
2115         Reviewed by Andreas Kling.
2116
2117         Revert r173531 for now since our implementation is outdated.
2118
2119         * Configurations/FeatureDefines.xcconfig:
2120
2121 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
2122
2123         EventHandler references deleted Scrollbar
2124         https://bugs.webkit.org/show_bug.cgi?id=141931
2125         <rdar://problem/19915210>
2126
2127         Reviewed by Tim Horton.
2128
2129         Tested by scrollbars/overflow-custom-scrollbar-crash.html
2130
2131         Update the EventHandler class to use a WeakPtr to reference the
2132         last used Scrollbar, rather than retaining the Scrollbar and
2133         artificially extending its life. This keeps the EventHandler
2134         state in proper sync with the state of the render tree, and
2135         avoids cases where we have destroyed a ScrollableArea (and
2136         Scrollbar) but are still sending messages to a fake zombie
2137         version of the element.
2138
2139         * page/EventHandler.cpp:
2140         (WebCore::EventHandler::clear):
2141         (WebCore::EventHandler::handleMousePressEvent):
2142         (WebCore::EventHandler::updateMouseEventTargetNode):
2143         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
2144         * page/EventHandler.h:
2145         * platform/Scrollbar.cpp:
2146         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
2147         * platform/Scrollbar.h:
2148         (WebCore::Scrollbar::createWeakPtr): Added,
2149
2150 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2151
2152         REGRESSION(r179429): Can't type comments in Facebook
2153         https://bugs.webkit.org/show_bug.cgi?id=141859
2154
2155         Reviewed by Geoffrey Garen.
2156
2157         Enable SymbolEnabled runtime flag in inspector context.
2158
2159         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
2160         * WebCore.order:
2161         * WebCore.vcxproj/WebCore.vcxproj:
2162         * WebCore.vcxproj/WebCore.vcxproj.filters:
2163         * bindings/js/JSDOMWindowBase.cpp:
2164         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
2165         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
2166         * bindings/js/JSDOMWindowBase.h:
2167         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2168         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
2169         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
2170         * bindings/js/JSWorkerGlobalScopeBase.h:
2171         * inspector/InspectorFrontendClientLocal.cpp:
2172         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2173         * page/Settings.h:
2174         * page/Settings.in:
2175
2176 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
2177
2178         CSS JIT: add support for case-insensitive attribute matching
2179         https://bugs.webkit.org/show_bug.cgi?id=141880
2180
2181         Reviewed by Andreas Kling.
2182
2183         The value matching now has 3 cases:
2184         1) Case-sensitive.
2185         2) Case-insensitive.
2186         3) Legacy HTML Case-insensitive.
2187
2188         The information to determine the case is split over 2 source:
2189         -To know if explicit case-insensitive is needed, we need to ask the selector
2190          for attributeValueMatchingIsCaseInsensitive().
2191         -To know if the legacy HTML behavior is needed, we need to test the attribute
2192          name filter with HTMLDocument::isCaseSensitiveAttribute().
2193
2194         I decided to perform all those checks at the fragment creation step.
2195         This makes the register requirements and code generation more explicit.
2196
2197         From there, everything is easy: switch() on the type of matching needed,
2198         and generate the code. The new case-insensitive case is a simplified version
2199         of the legacy HTML behavior without runtime check for the element type.
2200
2201         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
2202                fast/selectors/case-insensitive-attribute-register-requirement-1.html
2203                fast/selectors/case-insensitive-attribute-register-requirement-2.html
2204                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
2205
2206         * cssjit/SelectorCompiler.cpp:
2207         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
2208         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
2209         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
2210         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
2211         (WebCore::SelectorCompiler::constructFragmentsInternal):
2212         Compute the type of value matching and store it on the AttributeMatchingInfo
2213         when creating the fragment.
2214
2215         (WebCore::SelectorCompiler::minimumRegisterRequirements):
2216         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
2217         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
2218         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
2219         register. I have made an exception for generateElementAttributeValueExactMatching()
2220         for simplicity. I use that register to load the StringImpl of the attribute
2221         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
2222
2223         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
2224         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
2225         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
2226         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
2227         the behavior is consistent between XML and HTML.
2228
2229 2015-02-23  Alex Christensen  <achristensen@webkit.org>
2230
2231         [WinCairo] Unreviewed build fix after r180532
2232
2233         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2234         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
2235         Fixed typo.
2236
2237 2015-02-23  Chris Dumez  <cdumez@apple.com>
2238
2239         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
2240         https://bugs.webkit.org/show_bug.cgi?id=141922
2241         <rdar://problem/19923085>
2242
2243         Reviewed by Andreas Kling.
2244
2245         Log using diagnostic logging which ActiveDOMObjects prevent using the
2246         PageCache.
2247
2248         * history/PageCache.cpp:
2249         (WebCore::logCanCacheFrameDecision):
2250         * page/DiagnosticLoggingKeys.cpp:
2251         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
2252         * page/DiagnosticLoggingKeys.h:
2253
2254 2015-02-23  Chris Dumez  <cdumez@apple.com>
2255
2256         Move GeoNotifier class to its own file
2257         https://bugs.webkit.org/show_bug.cgi?id=141918
2258
2259         Reviewed by Andreas Kling.
2260
2261         Move GeoNotifier class to its own file to make Geolocation class less
2262         crowded.
2263
2264 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2265
2266         Remove unnecessary PlatformTimeRanges::create()
2267         https://bugs.webkit.org/show_bug.cgi?id=141901
2268
2269         Reviewed by Filip Pizlo.
2270
2271         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
2272         This functionality can be replaced with std::make_unique<> use directly.
2273
2274         No new tests, no behavior changes.
2275
2276         * Modules/mediasource/MediaSource.cpp:
2277         (WebCore::MediaSource::buffered):
2278         * Modules/mediasource/SourceBuffer.cpp:
2279         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
2280         * platform/graphics/MediaPlayer.cpp:
2281         (WebCore::NullMediaPlayerPrivate::buffered):
2282         * platform/graphics/MediaPlayerPrivate.h:
2283         (WebCore::MediaPlayerPrivateInterface::seekable):
2284         * platform/graphics/PlatformTimeRanges.cpp:
2285         (WebCore::PlatformTimeRanges::create): Deleted.
2286         * platform/graphics/PlatformTimeRanges.h:
2287         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2288         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
2289         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2290         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
2291         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2292         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
2293         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2294         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
2295         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
2296         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2297         (WebCore::MediaPlayerPrivateGStreamer::buffered):
2298         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2299         (WebCore::MediaPlayerPrivateQTKit::buffered):
2300         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2301         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
2302         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2303         (WebCore::MockMediaPlayerMediaSource::buffered):
2304
2305 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2306
2307         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
2308         https://bugs.webkit.org/show_bug.cgi?id=141888
2309
2310         Reviewed by Filip Pizlo.
2311
2312         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
2313         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
2314
2315         No new tests, no behavior changes.
2316
2317         * platform/SharedBuffer.h:
2318         * platform/Supplementable.h:
2319         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
2320         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
2321         * platform/graphics/ImageBuffer.h:
2322         * platform/graphics/TiledBackingStoreBackend.h:
2323         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2324         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2325         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2326         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2327         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2328         * platform/gtk/GamepadsGtk.cpp:
2329
2330 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
2331
2332         Default value of HTMLSelectElement size IDL attribute should be 0.
2333         https://bugs.webkit.org/show_bug.cgi?id=141795
2334
2335         Reviewed by Andreas Kling.
2336
2337         Default value of HTMLSelectElement size IDL attribute should be 0. 
2338         As in spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element, also this matches the behavior of Chrome, IE and
2339         Gecko.
2340
2341         Test: fast/dom/select-size.html
2342
2343         * html/HTMLSelectElement.cpp:
2344         (WebCore::HTMLSelectElement::parseAttribute):
2345
2346 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
2347
2348         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
2349         https://bugs.webkit.org/show_bug.cgi?id=141729.
2350
2351         Reviewed by Daniel Bates.
2352
2353         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
2354         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
2355
2356         * platform/graphics/GraphicsContext.h:
2357         (WebCore::GraphicsContext::paintingDisabled):
2358         (WebCore::GraphicsContext::updatingControlTints):
2359
2360 2015-02-22  Dean Jackson  <dino@apple.com>
2361
2362         [iOS] Max canvas size is lower than expected
2363         https://bugs.webkit.org/show_bug.cgi?id=141886
2364         <rdar://problem/19729246>
2365
2366         Reviewed by Tim Horton.
2367
2368         Use the same maximum canvas area for all ports,
2369         which bumps the iOS limit up from 4580 * 1145
2370         to 16k * 16k.
2371
2372         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
2373
2374 2015-02-23  Chris Dumez  <cdumez@apple.com>
2375
2376         Add support for diagnostic logging messages sampling
2377         https://bugs.webkit.org/show_bug.cgi?id=141823
2378         <rdar://problem/19899030>
2379
2380         Reviewed by Andreas Kling.
2381
2382         Add support for diagnostic logging messages sampling to decrease the
2383         impact of diagnostic logging on CPU usage, while still getting useful
2384         overall results. This patch adds a ShouldSample argument to
2385         logDiagnosticMessage*() functions and logs 5% of the messages when
2386         sampling. Sampling is turned on for keys that are known to be verbose
2387         (e.g. per resource load logging).
2388
2389         On the page load test I am tracking, CPU usage caused by diagnostic
2390         logging went down to 0.3% of UIProcess from 2.8% with this change.
2391
2392         * history/PageCache.cpp:
2393         (WebCore::logPageCacheFailureDiagnosticMessage):
2394         (WebCore::logCanCachePageDecision):
2395         * html/HTMLMediaElement.cpp:
2396         (WebCore::HTMLMediaElement::parseAttribute):
2397         * loader/EmptyClients.h:
2398         * loader/FrameLoader.cpp:
2399         (WebCore::logNavigation):
2400         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2401         * loader/ResourceLoader.cpp:
2402         (WebCore::logResourceResponseSource):
2403         * loader/SubframeLoader.cpp:
2404         (WebCore::logPluginRequest):
2405         * loader/SubresourceLoader.cpp:
2406         (WebCore::SubresourceLoader::willSendRequest):
2407         (WebCore::SubresourceLoader::didReceiveResponse):
2408         (WebCore::logResourceLoaded):
2409         * loader/cache/CachedResource.cpp:
2410         (WebCore::logResourceRevalidationReason):
2411         * loader/cache/CachedResourceLoader.cpp:
2412         (WebCore::logMemoryCacheResourceRequest):
2413         * page/DiagnosticLoggingClient.h:
2414
2415 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
2416
2417         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
2418         https://bugs.webkit.org/show_bug.cgi?id=141729.
2419
2420         Reviewed by Simon Fraser.
2421
2422         When drawing an SVG image and the drawing context is set to be transparent,
2423         make sure this transparency is applied to the compositing layer.
2424
2425         Test: svg/canvas/canvas-global-alpha-svg.html
2426
2427         * platform/graphics/GraphicsContext.cpp:
2428         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
2429         function and sets 'm_state.alpha' to the input value.
2430
2431         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
2432         returns the value of the global alpha.
2433         
2434         * platform/graphics/GraphicsContext.h:
2435         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
2436         'alpha' to the context state since the getter function CGContextGetAlpha
2437         is defined only in a private header file. Also move single line functions
2438         from the source file to the header file.
2439     
2440         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2441         (WebCore::GraphicsContext::setPlatformAlpha):
2442         (WebCore::GraphicsContext::setAlpha): Deleted.
2443         * platform/graphics/cg/GraphicsContextCG.cpp:
2444         (WebCore::GraphicsContext::setPlatformAlpha):
2445         (WebCore::GraphicsContext::setAlpha): Deleted.
2446         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
2447         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
2448         setPlatformAlpha().
2449     
2450         * svg/graphics/SVGImage.cpp:
2451         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
2452         global alpha value to the compositing layer.
2453         
2454 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
2455
2456         Occasional crash in MediaPlayer::setPrivateBrowsingMode
2457         https://bugs.webkit.org/show_bug.cgi?id=141910
2458
2459         Reviewed by Jer Noble.
2460
2461         No new tests, I was unable to reproduce the crash.
2462
2463         * html/HTMLMediaElement.cpp:
2464         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
2465         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
2466             to NULL.
2467         * html/HTMLMediaElement.h: Define EveryDelayedAction.
2468
2469 2015-02-23  Philippe Normand  <pnormand@igalia.com>
2470
2471         [GStreamer] Redundant track language notifications
2472         https://bugs.webkit.org/show_bug.cgi?id=141908
2473
2474         Reviewed by Žan Doberšek.
2475
2476         Invoke languageChanged only if the language code actually
2477         changed.
2478
2479         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2480         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2481
2482 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
2483
2484         [WinCairo] Crash when media player is destroyed.
2485         https://bugs.webkit.org/show_bug.cgi?id=141248
2486
2487         Reviewed by Darin Adler.
2488
2489         A COM smart pointer is both released, and set to null.
2490         This means that the COM Release method is called twice, causing a crash.
2491
2492         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2493         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
2494
2495 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
2496
2497         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
2498         https://bugs.webkit.org/show_bug.cgi?id=141899
2499
2500         Reviewed by Sergio Villar Senin.
2501
2502         There was a FIXME about not re-resolving positions if the grid is grown during
2503         auto-placement. But as the spec has changed [1] and you can only refer to the
2504         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
2505         we can get rid of this FIXME as it's not a causing a problem anymore.
2506
2507         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
2508
2509         No new tests (no change in behavior).
2510
2511         * rendering/RenderGrid.cpp:
2512         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
2513
2514 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2515
2516         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
2517         https://bugs.webkit.org/show_bug.cgi?id=137877
2518
2519         Reviewed by Sam Weinig.
2520
2521         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
2522         change OwnPtr with std::unique_ptr<>|make_unique<>.
2523
2524         No new tests, no behavior changes.
2525
2526         * page/scrolling/AsyncScrollingCoordinator.h:
2527         * page/scrolling/ScrollingStateFixedNode.cpp:
2528         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2529         * page/scrolling/ScrollingStateNode.cpp:
2530         (WebCore::ScrollingStateNode::appendChild):
2531         * page/scrolling/ScrollingStateNode.h:
2532         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
2533         * page/scrolling/ScrollingStateScrollingNode.cpp:
2534         * page/scrolling/ScrollingStateStickyNode.cpp:
2535         * page/scrolling/ScrollingTree.h:
2536         * page/scrolling/ScrollingTreeNode.cpp:
2537         (WebCore::ScrollingTreeNode::appendChild):
2538         * page/scrolling/ScrollingTreeNode.h:
2539         * page/scrolling/ScrollingTreeScrollingNode.h:
2540
2541 2015-02-22  Dean Jackson  <dino@apple.com>
2542
2543         Print a console warning when HTMLCanvasElement exceeds the maximum size
2544         https://bugs.webkit.org/show_bug.cgi?id=141861
2545         <rdar://problem/19729145>
2546
2547         Reviewed by Simon Fraser.
2548
2549         Add a warning if we ever try to create a canvas that is
2550         too big.
2551
2552         No test because:
2553         1. We can't ref-test against console messages.
2554         2. The output is platform specific.
2555
2556         * html/HTMLCanvasElement.cpp:
2557         (WebCore::HTMLCanvasElement::createImageBuffer):
2558
2559 2015-02-21  Sam Weinig  <sam@webkit.org>
2560
2561         Convert the caps lock indicator to be implemented using the shadow DOM
2562         https://bugs.webkit.org/show_bug.cgi?id=141868
2563
2564         Reviewed by Dan Bernstein.
2565
2566         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
2567           in r74099 to work around a site bug, that should not be a problem anymore.
2568         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
2569           than a paint time effect. This gives the proper overflow behavior (it now clips) and
2570           behaves correctly in RTL.
2571
2572         * css/CSSParser.cpp:
2573         (WebCore::isValidKeywordPropertyAndValue):
2574         Make 'caps-lock-indicator' a valid -webkit-appearance value.
2575
2576         * css/CSSValueKeywords.in:
2577         Remove comment that indicated that caps-lock-indicator was not a valid
2578         -webkit-appearance value.
2579
2580         * css/html.css:
2581         (input::-webkit-caps-lock-indicator):
2582         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
2583         trick employed here is to use a content: image to both implement the painting of
2584         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
2585
2586         * html/HTMLInputElement.cpp:
2587         (WebCore::HTMLInputElement::capsLockIndicatorElement):
2588         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
2589         * html/HTMLInputElement.h:
2590         * html/InputType.cpp:
2591         (WebCore::InputType::capsLockStateMayHaveChanged):
2592         * html/InputType.h:
2593         (WebCore::InputType::capsLockIndicatorElement):
2594         Pipe notification of changes in the caps locks state to the <input> element
2595         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
2596         lock indicator element in the shadow DOM.
2597
2598         * html/TextFieldInputType.cpp:
2599         (WebCore::TextFieldInputType::forwardEvent):
2600         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
2601         (WebCore::TextFieldInputType::createShadowSubtree):
2602         (WebCore::TextFieldInputType::capsLockIndicatorElement):
2603         (WebCore::TextFieldInputType::destroyShadowSubtree):
2604         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
2605         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
2606         * html/TextFieldInputType.h:
2607         Add a new element to the text field shadow DOM to act as the caps lock indicator.
2608         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
2609         from CSS. The element is always in the DOM for a password field. It toggles between
2610         display: none and display: block depending on the state of the caps lock key.
2611
2612         * page/EventHandler.cpp:
2613         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2614         Pipe notification of changes in the caps locks state to the <input> element
2615         rather than the RenderTextControlSingleLine.
2616
2617         * rendering/RenderTextControlSingleLine.cpp:
2618         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2619         (WebCore::RenderTextControlSingleLine::paint): Deleted.
2620         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
2621         * rendering/RenderTextControlSingleLine.h:
2622         Remove logic for drawing the caps lock indicator.
2623
2624         * rendering/RenderTheme.cpp:
2625         (WebCore::RenderTheme::adjustStyle):
2626         (WebCore::RenderTheme::paint):
2627         (WebCore::RenderTheme::paintMeter):
2628         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
2629         (WebCore::RenderTheme::paintCapsLockIndicator):
2630         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
2631         * rendering/RenderTheme.h:
2632         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
2633         * rendering/RenderThemeIOS.h:
2634         * rendering/RenderThemeIOS.mm:
2635         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
2636         * rendering/RenderThemeMac.h:
2637         * rendering/RenderThemeMac.mm:
2638         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
2639         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
2640         Now that the caps lock indicator is implemented like other aspects of form controls,
2641         the theme code can be converted to be similar as well.
2642
2643 2015-02-21  David Kilzer  <ddkilzer@apple.com>
2644
2645         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
2646         <http://webkit.org/b/141816>
2647
2648         Attempt to fix the following build failure:
2649
2650             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
2651             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
2652             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2653             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2654             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2655             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
2656             <scratch space>:58:1: note: expanded from here
2657             CoreMediaLibrary
2658             ^~~~~~~~~~~~~~~~
2659             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2660             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
2661             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
2662             ^
2663             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2664             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2665             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
2666             <scratch space>:42:1: note: expanded from here
2667             CoreMediaLibrary
2668             ^
2669             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
2670             SOFT_LINK_FRAMEWORK(CoreMedia)
2671             ^
2672             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2673             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2674             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
2675             <scratch space>:51:1: note: expanded from here
2676             CoreMediaLibrary
2677             ^
2678
2679         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
2680         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
2681         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
2682         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
2683
2684 2015-02-21  David Kilzer  <ddkilzer@apple.com>
2685
2686         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
2687         <http://webkit.org/b/141816>
2688
2689         Reviewed by Alexey Proskuryakov.
2690
2691         * WebCore.vcxproj/WebCore.vcxproj:
2692         * WebCore.vcxproj/WebCore.vcxproj.filters:
2693         - Remove CoreMediaSoftLinking.h.
2694
2695         * platform/cf/CoreMediaSoftLink.cpp:
2696         - Add kCMTimeZero constant.
2697         * platform/cf/CoreMediaSoftLink.h:
2698         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
2699         - Add kCMTimeZero constant.
2700
2701         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
2702
2703         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2704         - Remove reference to CoreMediaSoftLinking.h and update comment.
2705         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
2706         - Switch to using new method to check if a framework is
2707           available.
2708
2709         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2710         - Remove all local soft-linking macros for CoreMedia.
2711           CoreMediaSoftLink.h handles everything now.
2712         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
2713         - Switch to using new method to check if a framework is
2714           available.
2715
2716         * platform/mac/SoftLinking.h:
2717         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
2718         is_Name_FrameworkAvailable() macro.
2719         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
2720         optional framework checks without a separate macro.
2721         (SOFT_LINK_CONSTANT_HEADER): Add.
2722         (SOFT_LINK_CONSTANT_SOURCE): Add.
2723         - Support soft-links to constants.
2724
2725         * platform/win/SoftLinking.h:
2726         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
2727         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
2728         non-static function.
2729         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
2730         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
2731         SOFT_LINK_DEBUG_LIBRARY.
2732         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
2733         is_Name_FrameworkAvailable() macro.
2734         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
2735         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
2736         (SOFT_LINK_CONSTANT_HEADER): Add.
2737         (SOFT_LINK_CONSTANT_SOURCE): Add.
2738         - Support soft-links to constants.
2739
2740 2015-02-20  David Kilzer  <ddkilzer@apple.com>
2741
2742         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
2743         <http://webkit.org/b/141849>
2744
2745         Reviewed by Brent Fulgham.
2746
2747         This patch does the following:
2748         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
2749           macros for reuse in other projects.
2750         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
2751           141816.
2752         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
2753           and includes framework name in generated function names.  This
2754           adds more entropy to the names in case there are two functions
2755           with the same name in different frameworks.
2756
2757         * platform/cf/CoreMediaSoftLink.cpp:
2758         - Add FIXME about USE(COREMEDIA).
2759         - Switch from SOFT_LINK_FRAMEWORK() to
2760           SOFT_LINK_FRAMEWORK_SOURCE().
2761         * platform/cf/CoreMediaSoftLink.h:
2762         - Add FIXME about USE(COREMEDIA).
2763         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
2764           macros.
2765
2766         * platform/mac/SoftLinking.h:
2767         - Add missing header guards.
2768         - Add pragmas for different macro groups.
2769         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
2770         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
2771         (SOFT_LINK_FUNCTION_SOURCE): Move.
2772         - Add framework name to generated function names.
2773         - Incorporates namespace so that it doesn't have to be listed in
2774           the *SoftLink.{cpp,h} file.
2775
2776         * platform/win/SoftLinking.h:
2777         - Add pragmas for different macro groups.
2778         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
2779         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
2780         (SOFT_LINK_FUNCTION_SOURCE): Move.
2781         - Add framework name to generated function names.
2782         - Incorporates namespace so that it doesn't have to be listed in
2783           the *SoftLink.{cpp,h} file.
2784
2785 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2786
2787         [Gtk] Unreviewed build fix.
2788
2789         * platform/ScrollAnimatorNone.cpp:
2790         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
2791         uses of ScrollableArea.
2792
2793 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2794
2795         Scrollbars and ScrollAnimators must always have a ScrollableArea
2796         https://bugs.webkit.org/show_bug.cgi?id=141855
2797
2798         Reviewed by Simon Fraser.
2799
2800         No change in functionality.
2801         
2802         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
2803         a number of unnecessary nullptr checks.
2804
2805         * accessibility/AccessibilityScrollbar.cpp:
2806         (WebCore::AccessibilityScrollbar::setValue):
2807         * css/SelectorCheckerTestFunctions.h:
2808         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
2809         * page/FrameView.cpp:
2810         (WebCore::FrameView::createScrollbar):
2811         (WebCore::FrameView::setFixedVisibleContentRect):
2812         * page/scrolling/ScrollingCoordinator.cpp:
2813         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
2814         * platform/PopupMenuClient.h:
2815         * platform/ScrollAnimator.cpp:
2816         (WebCore::ScrollAnimator::ScrollAnimator):
2817         (WebCore::ScrollAnimator::scroll):
2818         (WebCore::ScrollAnimator::handleWheelEvent):
2819         (WebCore::ScrollAnimator::notifyPositionChanged):
2820         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
2821         * platform/ScrollAnimator.h:
2822         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
2823         * platform/ScrollAnimatorNone.cpp:
2824         * platform/ScrollAnimatorNone.h:
2825         * platform/ScrollView.cpp:
2826         (WebCore::ScrollView::createScrollbar):
2827         * platform/ScrollableArea.cpp:
2828         (WebCore::ScrollableArea::scrollAnimator):
2829         (WebCore::ScrollableArea::scroll):
2830         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
2831         (WebCore::ScrollableArea::notifyScrollPositionChanged):
2832         (WebCore::ScrollableArea::scrollPositionChanged):
2833         (WebCore::ScrollableArea::handleWheelEvent):
2834         (WebCore::ScrollableArea::handleTouchEvent):
2835         (WebCore::ScrollableArea::mouseEnteredScrollbar):
2836         (WebCore::ScrollableArea::mouseExitedScrollbar):
2837         (WebCore::ScrollableArea::didAddScrollbar):
2838         (WebCore::ScrollableArea::willRemoveScrollbar):
2839         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
2840         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
2841         * platform/ScrollableArea.h:
2842         * platform/Scrollbar.cpp:
2843         (WebCore::Scrollbar::createNativeScrollbar):
2844         (WebCore::Scrollbar::Scrollbar):
2845         (WebCore::Scrollbar::scrollbarOverlayStyle):
2846         (WebCore::Scrollbar::isScrollableAreaActive):
2847         (WebCore::Scrollbar::offsetDidChange):
2848         (WebCore::Scrollbar::autoscrollPressedPart):
2849         (WebCore::Scrollbar::moveThumb):
2850         (WebCore::Scrollbar::mouseMoved):
2851         (WebCore::Scrollbar::mouseEntered):
2852         (WebCore::Scrollbar::mouseExited):
2853         (WebCore::Scrollbar::mouseUp):
2854         (WebCore::Scrollbar::shouldParticipateInHitTesting):
2855         (WebCore::Scrollbar::isWindowActive):
2856         (WebCore::Scrollbar::invalidateRect):
2857         (WebCore::Scrollbar::convertToContainingView):
2858         (WebCore::Scrollbar::convertFromContainingView):
2859         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2860         * platform/Scrollbar.h:
2861         (WebCore::Scrollbar::scrollableArea):
2862         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
2863         * platform/ios/ScrollAnimatorIOS.mm:
2864         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
2865         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
2866         * platform/mac/ScrollAnimatorMac.h:
2867         * platform/mac/ScrollAnimatorMac.mm:
2868         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
2869         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
2870         (-[WebScrollbarPainterDelegate scrollAnimator]):
2871         (-[WebScrollbarPainterDelegate layer]):
2872         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
2873         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
2874         (WebCore::ScrollAnimator::create):
2875         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2876         (WebCore::ScrollAnimatorMac::scroll):
2877         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2878         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
2879         (WebCore::ScrollAnimatorMac::immediateScrollTo):
2880         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2881         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2882         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2883         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2884         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2885         (WebCore::ScrollAnimatorMac::pinnedInDirection):
2886         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
2887         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
2888         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
2889         (WebCore::ScrollAnimatorMac::stretchAmount):
2890         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
2891         (WebCore::ScrollAnimatorMac::canScrollVertically):
2892         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
2893         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
2894         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2895         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
2896         * rendering/RenderLayer.cpp:
2897         (WebCore::RenderLayer::RenderLayer):
2898         (WebCore::RenderLayer::createScrollbar):
2899         (WebCore::RenderLayer::destroyScrollbar):
2900         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2901         * rendering/RenderListBox.cpp:
2902         (WebCore::RenderListBox::createScrollbar):
2903         (WebCore::RenderListBox::destroyScrollbar):
2904         * rendering/RenderMenuList.cpp:
2905         (RenderMenuList::createScrollbar):
2906         * rendering/RenderMenuList.h:
2907         * rendering/RenderScrollbar.cpp:
2908         (WebCore::RenderScrollbar::createCustomScrollbar):
2909         (WebCore::RenderScrollbar::RenderScrollbar):
2910         * rendering/RenderScrollbar.h:
2911         * rendering/RenderSearchField.cpp:
2912         (WebCore::RenderSearchField::createScrollbar):
2913         * rendering/RenderSearchField.h:
2914
2915 2015-02-20  Enrica Casucci  <enrica@apple.com>
2916
2917         [WK2] Add support for font panel on OS X.
2918         https://bugs.webkit.org/show_bug.cgi?id=141777
2919
2920         Reviewed by Tim Horton.
2921
2922         This patch adds the necessary hooks to the Editor class to support
2923         the font panel.
2924
2925         * editing/Editor.h:
2926         * editing/mac/EditorMac.mm:
2927         (WebCore::Editor::applyFontStyles):
2928
2929 2015-02-20  Zalan Bujtas  <zalan@apple.com>
2930
2931         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
2932         https://bugs.webkit.org/show_bug.cgi?id=141854
2933
2934         Reviewed by Ryosuke Niwa.
2935
2936         Inserting content before/after the body as the result of editing is a valid operation.
2937         This assert was originally introduced to cover cases where edited content would get moved
2938         out of body. However, asserting such operation properly is not possible atm.
2939
2940         Test: editing/inserting/insert-as-body-sibling.html
2941
2942         * editing/CompositeEditCommand.cpp:
2943         (WebCore::CompositeEditCommand::insertNodeBefore):
2944         (WebCore::CompositeEditCommand::insertNodeAfter):
2945
2946 2015-02-20  Chris Dumez  <cdumez@apple.com>
2947
2948         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
2949         https://bugs.webkit.org/show_bug.cgi?id=141803
2950         <rdar://problem/19632080>
2951
2952         Reviewed by Antti Koivisto.
2953
2954         Add more diagnostic logging keys for the network cache.
2955
2956         * page/DiagnosticLoggingKeys.cpp:
2957         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
2958         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
2959         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
2960         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
2961         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
2962         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
2963         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
2964         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
2965         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
2966         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
2967         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
2968         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
2969         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
2970         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
2971         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
2972         * page/DiagnosticLoggingKeys.h:
2973
2974 2015-02-20  Tim Horton  <timothy_horton@apple.com>
2975
2976         <attachment> turns the wrong blue when you highlight it
2977         https://bugs.webkit.org/show_bug.cgi?id=141853
2978
2979         Reviewed by Simon Fraser.
2980
2981         * rendering/RenderAttachment.h:
2982         * rendering/RenderReplaced.cpp:
2983         (WebCore::RenderReplaced::shouldDrawSelectionTint):
2984         (WebCore::RenderReplaced::paint):
2985         * rendering/RenderReplaced.h:
2986         Don't draw the selection tint for RenderAttachment.
2987
2988 2015-02-20  Tim Horton  <timothy_horton@apple.com>
2989
2990         Allow <attachment> elements to be focused
2991         https://bugs.webkit.org/show_bug.cgi?id=141847
2992
2993         Reviewed by Enrica Casucci.
2994
2995         * css/html.css:
2996         (attachment:focus):
2997         Disable focus rings for <attachment>.
2998
2999         * html/HTMLAttachmentElement.cpp:
3000         (WebCore::HTMLAttachmentElement::setFocus):
3001         * html/HTMLAttachmentElement.h:
3002         Allow HTMLAttachmentElement to get editing focus.
3003         Let RenderAttachment know when focus changes.
3004
3005         * rendering/RenderAttachment.cpp:
3006         (WebCore::RenderAttachment::paintReplaced):
3007         Paint the background in cyan when we are inside the selection or have focus.
3008         Otherwise, it will be gray.
3009
3010         (WebCore::RenderAttachment::focusChanged):
3011         When focus changes, repaint.
3012
3013         * rendering/RenderAttachment.h:
3014
3015 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3016
3017         Rename ScrollElasticityController to ScrollController
3018         https://bugs.webkit.org/show_bug.cgi?id=141842
3019
3020         Reviewed by Simon Fraser.
3021
3022         No change in functionality.
3023
3024         * PlatformMac.cmake:
3025         * WebCore.order:
3026         * WebCore.xcodeproj/project.pbxproj:
3027         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3028         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3029         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
3030         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
3031         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
3032         * platform/mac/ScrollAnimatorMac.h:
3033         * platform/mac/ScrollAnimatorMac.mm:
3034         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3035         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
3036         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3037         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
3038         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
3039         (WebCore::ScrollControllerClient::~ScrollControllerClient):
3040         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
3041         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
3042         (WebCore::ScrollController::ScrollController):
3043         (WebCore::ScrollController::handleWheelEvent):
3044         (WebCore::ScrollController::snapRubberBandTimerFired):
3045         (WebCore::ScrollController::isRubberBandInProgress):
3046         (WebCore::ScrollController::stopSnapRubberbandTimer):
3047         (WebCore::ScrollController::snapRubberBand):
3048         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
3049         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
3050         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
3051         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
3052         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
3053         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
3054         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
3055         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
3056         * platform/mac/ScrollElasticityController.h: Removed.
3057         * platform/mac/ScrollElasticityController.mm: Removed.
3058
3059 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
3060
3061         Remove svn:keywords property.
3062
3063         As far as I can tell, the property had no effect on any of these files, but also,
3064         when it has effect it's likely harmful.
3065
3066         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
3067         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
3068         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
3069         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
3070         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
3071         * css/CSSKeyframeRule.h: Removed property svn:keywords.
3072         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
3073         * css/CSSKeyframesRule.h: Removed property svn:keywords.
3074         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
3075         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
3076         * css/plugIns.css: Removed property svn:keywords.
3077         * dom/AnimationEvent.cpp: Removed property svn:keywords.
3078         * dom/AnimationEvent.h: Removed property svn:keywords.
3079         * dom/DeviceMotionClient.h: Removed property svn:keywords.
3080         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
3081         * dom/DeviceMotionController.h: Removed property svn:keywords.
3082         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
3083         * dom/DeviceMotionData.h: Removed property svn:keywords.
3084         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
3085         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
3086         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
3087         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
3088         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
3089         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
3090         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
3091         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
3092         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
3093         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
3094         * page/Frame.h: Removed property svn:keywords.
3095         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
3096         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
3097         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
3098         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
3099         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
3100         * platform/ControlStates.h: Removed property svn:keywords.
3101         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
3102         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
3103         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
3104         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
3105         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
3106         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
3107         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
3108         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
3109         * platform/ios/SystemMemory.h: Removed property svn:keywords.
3110         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
3111         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
3112         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
3113         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
3114         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
3115         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
3116         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
3117         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
3118         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
3119         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
3120         * rendering/TextAutoSizing.h: Removed property svn:keywords.
3121         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
3122
3123 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3124
3125         [Mac] REGRESSION: Scroll snap points broken after r180018
3126         https://bugs.webkit.org/show_bug.cgi?id=141821
3127         <rdar://problem/19898333>
3128
3129         Reviewed by Simon Fraser.
3130
3131         * page/EventHandler.cpp:
3132         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
3133         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
3134         to catch the 'ended wheel' gesture.
3135         * page/EventHandler.h:
3136         * page/mac/EventHandlerMac.mm:
3137         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
3138         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
3139         (i.e., trigger an animation)
3140         * platform/ScrollAnimator.cpp:
3141         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
3142         * platform/ScrollAnimator.h:
3143
3144 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
3145
3146         [iOS] cleanup AirPlay code
3147         https://bugs.webkit.org/show_bug.cgi?id=141811
3148
3149         Reviewed by Jer Noble.
3150
3151         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
3152
3153         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
3154         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
3155         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
3156
3157         * Modules/mediacontrols/MediaControlsHost.cpp:
3158         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
3159         (WebCore::MediaControlsHost::externalDeviceType):
3160
3161         * dom/EventNames.h: Ditto.
3162         * dom/EventNames.in:
3163
3164         * html/HTMLMediaElement.cpp:
3165         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
3166         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
3167         (WebCore::HTMLMediaElement::parseAttribute):
3168         * html/HTMLMediaElement.h:
3169         * html/HTMLMediaElement.idl:
3170
3171         * html/HTMLMediaSession.cpp:
3172         (WebCore::restrictionName): Ditto.
3173         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
3174         * html/HTMLMediaSession.h:
3175
3176         * html/HTMLVideoElement.cpp:
3177         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
3178         * html/HTMLVideoElement.h:
3179         * html/HTMLVideoElement.idl:
3180
3181         * page/Settings.in: Ditto.
3182
3183         * platform/audio/MediaSessionManager.h:
3184         * platform/audio/ios/MediaSessionManagerIOS.h:
3185         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
3186
3187         * platform/graphics/MediaPlayer.cpp:
3188         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
3189         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
3190         * platform/graphics/MediaPlayer.h:
3191         * platform/graphics/MediaPlayerPrivate.h:
3192         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
3193         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
3194         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3195         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
3196         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3197
3198         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3199         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3200         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3201         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
3202         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
3203         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
3204         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
3205         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
3206
3207 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
3208
3209         Language ranges containing asterisks must be quoted as strings
3210         https://bugs.webkit.org/show_bug.cgi?id=141659
3211
3212         Reviewed by Benjamin Poulain.
3213
3214         As specified in [1], the language ranges containing asterisks must be quoted as strings.
3215
3216         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
3217
3218         * css/CSSGrammar.y.in:
3219         * css/CSSParser.cpp:
3220         (WebCore::CSSParser::realLex):
3221
3222 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3223
3224         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
3225         https://bugs.webkit.org/show_bug.cgi?id=137765
3226
3227         Reviewed by Ryosuke Niwa.
3228
3229         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
3230         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
3231         used in registerMediaEngine().
3232
3233         No new tests, no behavior changes.
3234
3235         * WebCore.exp.in:
3236         * html/HTMLMediaElement.cpp:
3237         (WebCore::HTMLMediaElement::parseAttribute):
3238         * html/HTMLMediaElement.h:
3239         * platform/graphics/MediaPlayer.cpp:
3240         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
3241         (WebCore::MediaPlayer::MediaPlayer):
3242         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3243         (WebCore::createNullMediaPlayer): Deleted.
3244         * platform/graphics/MediaPlayer.h:
3245         (WebCore::MediaPlayer::create): Deleted.
3246         * platform/graphics/MediaPlayerPrivate.h:
3247         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3248         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3249         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
3250         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
3251         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3252         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3253         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3254         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
3255         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
3256         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3257         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3258         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
3259         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
3260         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3261         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
3262         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
3263         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3264         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3265         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3266         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
3267         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
3268         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3269         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
3270         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
3271         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3272         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3273         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
3274         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
3275         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3276
3277 2015-02-19  David Kilzer  <ddkilzer@apple.com>
3278
3279         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
3280
3281         Rubber-stamped by Brent Fulgham.
3282
3283         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
3284         Brent agreed when I talked to him in person.
3285
3286         * platform/cf/CoreMediaSoftLink.cpp:
3287         * platform/cf/CoreMediaSoftLink.h:
3288         * platform/mac/SoftLinking.h:
3289         * platform/win/SoftLinking.h:
3290         - Do the rename.
3291
3292 2015-02-19  David Kilzer  <ddkilzer@apple.com>
3293
3294         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
3295         <http://webkit.org/b/141791>
3296
3297         Reviewed by Alexey Proskuryakov.
3298
3299         * Configurations/WebCore.unexp:
3300         - Remove five more symbols.
3301
3302         * Modules/plugins/QuickTimePluginReplacement.mm:
3303         - Remove all local soft-links and include CoreMediaSoftLink.h.
3304           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
3305           used here since we didn't use the optional function soft-link
3306           method.
3307
3308         * WebCore.vcxproj/WebCore.vcxproj.filters:
3309         * WebCore.vcxproj/WebCoreCFNetwork.props:
3310         * WebCore.xcodeproj/project.pbxproj:
3311         - Add CoreMediaSPI.h to the project.
3312
3313         * platform/cf/CoreMediaSoftLink.cpp:
3314         * platform/cf/CoreMediaSoftLink.h:
3315         - Add three cross-platform symbols, five Cocoa-only symbols, and
3316           two Windows-only symbols (based on current usage, not
3317           availability on each platform).
3318         - Include CoreMediaSPI.h header.
3319         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
3320
3321         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3322         - Remove all CoreMedia soft-linked functions.  Constants remain.
3323
3324         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3325         - Remove one CoreMedia soft-linked method.
3326
3327         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
3328         - Remove all CoreMedia soft-linked funtions.  With this change,
3329           we are already realizing space savings for duplicate
3330           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
3331           generated for many unused functions included by
3332           CoreMediaSoftLinking.h.)
3333
3334         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
3335         - Remove all CoreMedia soft-linked funtions.  Constants remain.
3336
3337         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3338         - Remove duplicate header included by CoreMediaSoftLink.h.
3339
3340         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3341         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3342         - Remove all CoreMedia soft-linked funtions.  Constants remain.
3343
3344         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3345         - Remove three CoreMedia soft-linked methods.
3346
3347         * platform/mac/PlatformClockCM.mm:
3348         - Remove two CoreMedia soft-linked methods.
3349
3350         * platform/mac/SerializedPlatformRepresentationMac.mm:
3351         - Remove only CoreMedia soft-linked funtion.  It wasn't even
3352           used.
3353
3354         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3355         - Remove two CoreMedia soft-linked method.
3356
3357         * platform/spi/cf/CoreMediaSPI.h:
3358         - Add for SPI from CMNotificationCenter.h.
3359
3360 2015-02-19  David Hyatt  <hyatt@apple.com>
3361
3362         Columns are splitting unsplittable content.
3363         https://bugs.webkit.org/show_bug.cgi?id=141807
3364         <rdar://problem/18387659>
3365
3366         Reviewed by Dean Jackson.
3367
3368         Added inline-table-dynamic-movement.html
3369
3370         * rendering/RenderBlockFlow.cpp:
3371         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
3372         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
3373         Patch these functions to always check the layout state for a zero
3374         pageLogicalHeight, since that is actually our indicator that we're
3375         doing column balancing and don't have a height set yet.
3376
3377         * rendering/RenderMultiColumnFlowThread.cpp:
3378         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
3379         * rendering/RenderMultiColumnSet.cpp:
3380         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3381         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
3382         (WebCore::RenderMultiColumnSet::prepareForLayout):
3383         * rendering/RenderMultiColumnSet.h:
3384         The function for deciding whether the logical height of the columns was
3385         known was checking for a zero computedColumnHeight. However, a column set
3386         can legitimately compute a zero column height, and with the fix to examine
3387         the layout state, this bug was exposed.
3388
3389         The fix is to add a new variable that caches whether or not the column height
3390         has been computed, so that even if it computes to zero, we aren't fooled.
3391
3392 2015-02-19  Chris Dumez  <cdumez@apple.com>
3393
3394         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
3395         https://bugs.webkit.org/show_bug.cgi?id=141744
3396
3397         Reviewed by Alexey Proskuryakov.
3398
3399         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
3400         implementation, similarly to what was already done for Mac in:
3401         <http://trac.webkit.org/changeset/174717>
3402
3403         The following changes were made:
3404         - Add missing "initLevel == AllFields" check before initializing
3405           uncommon fields. This bug was causing us to initialize uncommon
3406           fields even if called with 'CommonFieldsOnly' initLevel.
3407         - Bypass the first pass populating common HTTP headers in
3408           m_httpHeaderFields if the initLevel is AllFields. If called
3409           with AllFields initLevel, we will end up populating all HTTP
3410           headers later on so this first pass is redundant.
3411         - Use C++11 range loop to iterator over commonHeaderFields array
3412           for readability.
3413         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
3414           for the CFDictionaryRef containing the headers instead of creating
3415           copies of keys and values using CFDictionaryGetKeysAndValues() and
3416           then iterating over those. This avoids allocating Vectors for keys /
3417           values and avoids unnecessary copying.
3418
3419
3420 2015-02-18  Dean Jackson  <dino@apple.com>
3421
3422         Sufficiently small media controls should remove toolbar elements
3423         https://bugs.webkit.org/show_bug.cgi?id=141780
3424         <rdar://problem/16548548>
3425         <rdar://problem/17598778>
3426         <rdar://problem/18351963>
3427
3428         Reviewed by Eric Carlson.
3429
3430         Implement some logic where elements on the media controls are
3431         hidden when there isn't enough room. We start by dropping
3432         the scrubber, then the various buttons on the right hand
3433         side.
3434
3435         This solution isn't perfect. If we had perfection, it would
3436         be because we get resize events and respond accordingly. Instead
3437         we check the size when the user has pinch-zoomed, or when
3438         we start/stop playing.
3439
3440         This is going to cause some extra layout, because we need
3441         to know the size of things before we can work out which
3442         bits to hide.
3443
3444         * Modules/mediacontrols/mediaControlsiOS.css:
3445         (::-webkit-media-controls): Remove the minimum width. This can
3446         cause the controls to get clipped.
3447         (audio::-webkit-media-controls-spacer): Add this empty element to
3448         replace the scrubber when it is hidden.
3449         (audio::-webkit-media-controls-timeline-container):
3450         * Modules/mediacontrols/mediaControlsiOS.js:
3451         (ControllerIOS): Remember our size so we don't churn.
3452         (ControllerIOS.prototype.createControls): Create a new spacer element.
3453         (ControllerIOS.prototype.configureInlineControls):
3454         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
3455         (ControllerIOS.prototype.updateControls):
3456         (ControllerIOS.prototype.setPlaying): Ditto.
3457         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
3458         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
3459         asap. In this case it's probably ok to be in a bad state for a frame, or
3460         we are inside setup and we know that we'll layout soon.
3461         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
3462         that hides elements.
3463
3464 2015-02-19  Tim Horton  <timothy_horton@apple.com>
3465
3466         Move the software-only ImageBuffer::m_context to ImageBufferData
3467         https://bugs.webkit.org/show_bug.cgi?id=141784
3468
3469         Reviewed by Simon Fraser.
3470
3471         * platform/graphics/ImageBuffer.h:
3472         * platform/graphics/cairo/ImageBufferCairo.cpp:
3473         (WebCore::ImageBuffer::ImageBuffer):
3474         (WebCore::ImageBuffer::context):
3475         * platform/graphics/cairo/ImageBufferDataCairo.h:
3476         * platform/graphics/cg/ImageBufferCG.cpp:
3477         (WebCore::ImageBuffer::ImageBuffer):
3478         (WebCore::ImageBuffer::context):
3479         * platform/graphics/cg/ImageBufferDataCG.h:
3480         Move m_context to ImageBufferData in the software-only section;
3481         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
3482         This will make it harder for ImageBuffer to make the mistake of using
3483         m_context blindly without thinking when it will often be null.
3484
3485 2015-02-18  Andreas Kling  <akling@apple.com>
3486
3487         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
3488         <https://webkit.org/b/141788>
3489
3490         Reviewed by Anders Carlsson.
3491
3492         Once again we've fallen into the TemporaryChange trap:
3493
3494             TemporaryChange<unsigned>(m_member, temporaryValue);
3495
3496         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
3497         it immediately goes out of scope and restores the original value of m_member.
3498
3499         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
3500         to catch bugs like this. Whatever we do will be done separately from this bug.
3501
3502         Test: fast/history/page-cache-clearing.html
3503
3504         * history/PageCache.cpp:
3505         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
3506
3507         * testing/Internals.cpp:
3508         (WebCore::Internals::clearPageCache):
3509         (WebCore::Internals::pageCacheSize):
3510         * testing/Internals.h:
3511         * testing/Internals.idl: Add a way to clear the page cache and query its size from
3512         window.internals to facilitate writing a simple test for this bug.
3513
3514 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
3515
3516         Roll out r180280.
3517
3518         Crashes under IDBDatabase::closeConnection.
3519         https://bugs.webkit.org/show_bug.cgi?id=141745
3520         rdar://problem/19816412
3521
3522         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
3523
3524 2015-02-18  Tim Horton  <timothy_horton@apple.com>
3525
3526         Fix the iOS Simulator build after r180308.
3527
3528         * platform/graphics/cg/ImageBufferDataCG.h:
3529
3530 2015-02-18  Zalan Bujtas  <zalan@apple.com>
3531
3532         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
3533         https://bugs.webkit.org/show_bug.cgi?id=138224
3534
3535         Reviewed by Dave Hyatt.
3536
3537         It's wrong to call flowThreadRelativeWillBeRemoved(child).
3538         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
3539         Should this introduce any regressions, we need to deal with those separately.
3540
3541         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
3542
3543         * rendering/RenderMultiColumnFlowThread.cpp:
3544         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
3545         * rendering/RenderMultiColumnFlowThread.h:
3546
3547 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
3548
3549         [Win] CFData leak in CDMSessionAVFoundationCF
3550         https://bugs.webkit.org/show_bug.cgi?id=141765
3551         <rdar://problem/141765>
3552
3553         Reviewed by Joseph Pecoraro.
3554
3555         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
3556         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
3557         so we don't double-increment the retain count.
3558
3559 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
3560
3561         Adopt WebCore::IOSurface in ImageBuffer
3562         https://bugs.webkit.org/show_bug.cgi?id=141751
3563
3564         Reviewed by Simon Fraser.
3565
3566         * platform/graphics/cg/ImageBufferCG.cpp:
3567         (WebCore::createIOSurface): Deleted.
3568         (WebCore::ImageBuffer::ImageBuffer):
3569         Make use of cachedCGColorSpace.
3570         Make use of WebCore::IOSurface.
3571         Remove the unused size argument from ImageBufferDataCG.
3572         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
3573         do this for us, unlike wkIOSurfaceContextCreate.
3574         Apply the flipping and scale factor to whichever context we made.
3575         We don't need to setIsAcceleratedContext anymore because it's always
3576         false for software contexts, and WebCore::IOSurface will set it for
3577         any accelerated contexts.
3578
3579         (WebCore::ImageBuffer::context):
3580         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
3581
3582         (WebCore::ImageBuffer::flushContext):
3583         Make use of context(); m_context is now null for accelerated ImageBuffers.
3584
3585         (WebCore::ImageBuffer::copyNativeImage):
3586         Adopt in-line with the Create functions for clarity. Make use of
3587         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
3588
3589         (WebCore::ImageBuffer::draw):
3590         (WebCore::ImageBuffer::drawPattern):
3591         (WebCore::ImageBuffer::getUnmultipliedImageData):
3592         (WebCore::ImageBuffer::getPremultipliedImageData):
3593         (WebCore::ImageBuffer::putByteArray):
3594         (WebCore::ImageBuffer::toDataURL):
3595         Make use of context(); m_context is now null for accelerated ImageBuffers.
3596
3597         * platform/graphics/cg/ImageBufferDataCG.cpp:
3598         (WebCore::ImageBufferData::ImageBufferData):
3599         Indentation fix, and use nullptr.
3600
3601         (WebCore::convertScanline):
3602         Grammar fix (is -> are).
3603
3604         (WebCore::ImageBufferData::getData):
3605         (WebCore::ImageBufferData::putData):
3606         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
3607         should be made more convenient by the wrapper.
3608
3609         * platform/graphics/cg/ImageBufferDataCG.h:
3610         Drop the unused size argument from the constructor.
3611         Reorganize and label the various members which are only used
3612         for a particular type of ImageBufferDataCG.
3613
3614         * platform/graphics/cocoa/IOSurface.mm:
3615         (IOSurface::ensureGraphicsContext):
3616         IOSurface-backed GraphicsContexts are always considered accelerated.
3617
3618         (IOSurface::create):
3619         (IOSurface::IOSurface):
3620         Add a constructor that take an extra size to use when making the CGContext;
3621         it can only be less than the actual backing IOSurface size.
3622         This is needed for r160121.
3623
3624         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3625         * platform/mac/WebCoreSystemInterface.h:
3626         * platform/mac/WebCoreSystemInterface.mm:
3627         Remove old WKSI IOSurface-related functions.
3628
3629 2015-02-18  Alex Christensen  <achristensen@webkit.org>
3630
3631         Prepare to use WEBCORE_EXPORT on Windows.
3632         https://bugs.webkit.org/show_bug.cgi?id=141735
3633
3634         Reviewed by Brent Fulgham.
3635
3636         * bindings/js/GCController.h:
3637         * bindings/js/JSDOMGlobalObject.h:
3638         * bindings/scripts/CodeGeneratorJS.pm:
3639         (GenerateHeader):
3640         (GenerateImplementation):
3641         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3642         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3643         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3644         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3645         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3646         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3647         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3648         * bindings/scripts/test/JS/JSTestEventTarget.h:
3649         * bindings/scripts/test/JS/JSTestException.cpp:
3650         * bindings/scripts/test/JS/JSTestException.h:
3651         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3652         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3653         * bindings/scripts/test/JS/JSTestInterface.cpp:
3654         * bindings/scripts/test/JS/JSTestInterface.h:
3655         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3656         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3657         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3658         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3659         * bindings/scripts/test/JS/JSTestNode.cpp:
3660         * bindings/scripts/test/JS/JSTestNode.h:
3661         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3662         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3663         * bindings/scripts/test/JS/JSTestObj.cpp:
3664         * bindings/scripts/test/JS/JSTestObj.h:
3665         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3666         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3667         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3668         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3669         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3670         * bindings/scripts/test/JS/JSTestTypedefs.h:
3671         * bindings/scripts/test/JS/JSattribute.cpp:
3672         * bindings/scripts/test/JS/JSattribute.h:
3673         * bindings/scripts/test/JS/JSreadonly.cpp:
3674         * bindings/scripts/test/JS/JSreadonly.h:
3675         * bridge/runtime_method.h:
3676         * bridge/runtime_object.h:
3677         * dom/make_names.pl:
3678         (printNamesHeaderFile):
3679         * history/HistoryItem.h:
3680         * loader/FrameLoader.h:
3681         * loader/LoaderStrategy.h:
3682         * loader/ResourceLoadScheduler.h:
3683         * loader/icon/IconDatabase.h:
3684         * loader/icon/IconDatabaseBase.h:
3685         * page/DatabaseProvider.h:
3686         * page/Page.h:
3687         * page/PageConsoleClient.h:
3688         * page/PageOverlay.h:
3689         * platform/FileSystem.h:
3690         * platform/MemoryPressureHandler.h:
3691         * platform/ThreadGlobalData.h:
3692         * platform/URL.h:
3693         * platform/graphics/ca/PlatformCALayer.h:
3694         * platform/network/BlobDataFileReference.h:
3695         * platform/network/BlobRegistry.h:
3696         * platform/network/BlobRegistryImpl.h:
3697         * platform/sql/SQLiteDatabase.h:
3698         * rendering/ScrollBehavior.h:
3699         * rendering/break_lines.h:
3700         Add and move some WEBCORE_EXPORT macros.
3701
3702 2015-02-18  Anders Carlsson  <andersca@apple.com>
3703
3704         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
3705         https://bugs.webkit.org/show_bug.cgi?id=141767
3706
3707         Reviewed by Tim Horton.
3708
3709         Also, move it to platform/cocoa instead of platform/mac.
3710
3711         * WebCore.xcodeproj/project.pbxproj:
3712         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
3713
3714 2015-02-18  Antti Koivisto  <antti@apple.com>
3715
3716         Rename FontGlyphs to FontCascadeFonts
3717         https://bugs.webkit.org/show_bug.cgi?id=141754
3718
3719         Reviewed by Andreas Kling.
3720
3721         "It is better than Impl."
3722
3723         The purpose of the class to own to create and own the realized Font instances and the associated caches
3724         for FontCascade instances.
3725
3726 2015-02-18  Commit Queue  <commit-queue@webkit.org>
3727
3728         Unreviewed, rolling out r180286.
3729         https://bugs.webkit.org/show_bug.cgi?id=141766
3730
3731         Caused >50 crashed LayoutTests (Requested by jernoble on
3732         #webkit).
3733
3734         Reverted changeset:
3735
3736         "Page::userContentController() should return a reference, not
3737         a pointer"
3738         https://bugs.webkit.org/show_bug.cgi?id=141764
3739         http://trac.webkit.org/changeset/180286
3740
3741 2015-02-18  David Kilzer  <ddkilzer@apple.com>
3742
3743         Consolidate soft-linked CMTimeMakeWithSeconds() function
3744         <http://webkit.org/b/141655>
3745
3746         Reviewed by Brent Fulgham.
3747
3748         * Configurations/WebCore.unexp: Remove workaround for
3749         CMTimeMakeWithSeconds() weak external.
3750
3751         * WebCore.vcxproj/WebCore.vcxproj:
3752         * WebCore.vcxproj/WebCore.vcxproj.filters:
3753         * WebCore.xcodeproj/project.pbxproj:
3754         - Add CoreMediaSoftLink.{cpp,h} to the project.
3755
3756         * platform/cf/CoreMediaSoftLink.cpp: Add.
3757         * platform/cf/CoreMediaSoftLink.h: Add.
3758         - Implement new strategy where code for soft-linking is only
3759           in one place, and the header can simply be included wherever a
3760           soft-linked method is needed.
3761
3762         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
3763         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
3764         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3765         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3766         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3767         * platform/mac/PlatformClockCM.mm:
3768         - Remove old soft-linking strategy and include
3769           CoreMediaSoftLink.h.
3770
3771         * platform/mac/SoftLinking.h:
3772         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
3773         header declaration.  Split out from SOFT_LINK() macro.  Also
3774         stop violating C++ standards by redeclaring an inline function
3775         with the exact same signature as an extern "C" function.  This
3776         now matches what we do on Windows (where Visual C++ already
3777         prevented these shenanigans).
3778         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
3779         source implementation.  Split out the from SOFT_LINK() macro.
3780
3781         * platform/win/SoftLinking.h:
3782         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
3783         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
3784         (SOFT_LINK_FUNCTION_DECL): Add.
3785         (SOFT_LINK_FUNCTION_IMPL): Add.
3786         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
3787           macro for header declaration and source implementation.
3788         - We assume the __cdecl calling convention because that's what
3789           all Apple libraries use, and so we are able to use the exact
3790           same macro function on both Mac and Windows to simplify
3791           CoreMediaSoftLink.{cpp,h}.
3792
3793 2015-02-18  Brady Eidson  <beidson@apple.com>
3794
3795         Page::userContentController() should return a reference, not a pointer
3796         https://bugs.webkit.org/show_bug.cgi?id=141764
3797
3798         Reviewed by Jer Noble.
3799
3800         No new tests (No behavior change)
3801
3802         * dom/DocumentStyleSheetCollection.cpp:
3803         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
3804         * loader/cache/CachedResourceLoader.cpp:
3805         (WebCore::CachedResourceLoader::requestResource):
3806         * page/CaptionUserPreferences.cpp:
3807         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
3808         * page/DOMWindow.cpp:
3809         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
3810         * page/Frame.cpp:
3811         (WebCore::Frame::injectUserScripts):
3812         * page/Page.cpp:
3813         (WebCore::Page::Page):
3814         (WebCore::Page::~Page):
3815         (WebCore::Page::setUserContentController):
3816         * page/Page.h:
3817         (WebCore::Page::userContentController):
3818         * page/UserMessageHandlersNamespace.cpp:
3819         (WebCore::UserMessageHandlersNamespace::handler):
3820
3821 2015-02-18  Roger Fong  <roger_fong@apple.com>
3822
3823         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
3824         https://bugs.webkit.org/show_bug.cgi?id=141446
3825         <rdar://problem/19633715>
3826
3827         Reviewed by Brent Fulham.
3828
3829         Tests covered by WebGL2 conformance tests.
3830
3831         This patch promotes the following WebGL1 extensions to core in WebGL2:
3832         OES_element_index_uint 
3833         EXT_sRGB 
3834         EXT_blend_minmax 
3835         EXT_frag_depth 
3836         EXT_shader_texture_lod
3837         OES_standard_derivatives 
3838         
3839         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
3840         for free when GLSL3 becomes available.
3841
3842         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
3843         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
3844         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
3845         * html/canvas/WebGL2RenderingContext.idl: Ditto.
3846
3847         * html/canvas/WebGL2RenderingContext.cpp:
3848         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
3849         It was not promoted to core as I originally thought it had been.
3850         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
3851         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
3852         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
3853         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
3854         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
3855         (WebCore::WebGL2RenderingContext::hint): Ditto.
3856         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
3857         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
3858         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
3859         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
3860         * html/canvas/WebGL2RenderingContext.h:
3861
3862         * html/canvas/WebGLRenderingContext.cpp:
3863         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
3864         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
3865         (WebCore::WebGLRenderingContext::hint): Ditto.
3866         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
3867         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
3868         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
3869         * html/canvas/WebGLRenderingContext.h:
3870
3871         * html/canvas/WebGLRenderingContextBase.cpp:
3872         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
3873         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
3874         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
3875         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
3876         (WebCore::WebGLRenderingContextBase::hint): Deleted.
3877         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
3878         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
3879         * html/canvas/WebGLRenderingContextBase.h:
3880
3881 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
3882
3883         Streamline unexported function build fixes
3884         https://bugs.webkit.org/show_bug.cgi?id=141761
3885
3886         Reviewed by Alex Christensen.
3887
3888         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
3889         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
3890
3891         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
3892         it's not only Xcode 5 that is affected.
3893
3894         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
3895         Node, NodeList needs an exactly the same one. Also updated the comments.
3896
3897 2015-02-18  Chris Dumez  <cdumez@apple.com>
3898
3899         Access FontCache global instance via singleton() static member function
3900         https://bugs.webkit.org/show_bug.cgi?id=141726
3901
3902         Reviewed by Daniel Bates.
3903
3904         Access FontCache global instance via singleton() static member function,
3905         as per coding style.
3906
3907 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
3908
3909         Crashes under IDBDatabase::closeConnection.
3910         https://bugs.webkit.org/show_bug.cgi?id=141745
3911         rdar://problem/19816412
3912
3913         Reviewed by David Kilzer.
3914
3915         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
3916         Add a missing protector.
3917
3918 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
3919
3920         Justified ruby can cause lines to grow beyond their container
3921         https://bugs.webkit.org/show_bug.cgi?id=141732
3922
3923         Reviewed by David Hyatt.
3924
3925         After we re-layout RenderRubyRuns, this can change the environment upon which
3926         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
3927         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
3928         effective width of the RenderRubyRun to change, which causes out subsequent
3929         justification calculations to be off.
3930
3931         Therefore, we have a cycle; the amount of ruby overhang can change the justification
3932         in a line, and the layout of the line affects the ruby overhang calculation. Instead
3933         of performing a layout in a loop until it converges, this patch simply observes that
3934         having a flush right edge is more valuable than having a perfectly correct overhang.
3935         It therefore simply removes the secondary overhang calculation.
3936
3937         Test: fast/text/ruby-justification-flush.html
3938
3939         * rendering/RenderBlockFlow.h:
3940         * rendering/RenderBlockLineLayout.cpp:
3941         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
3942         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
3943         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3944
3945 2015-02-18  Chris Dumez  <cdumez@apple.com>
3946
3947         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
3948         https://bugs.webkit.org/show_bug.cgi?id=141723
3949
3950         Reviewed by Andreas Kling.
3951
3952         Evict dead resources from the MemoryCache on non-critical memory
3953         pressure. On critical memory pressure, we already evict ALL resources
3954         from the MemoryCache. It is a good idea to start by evicting resources
3955         we care less about on non-critical warning to decrease the chances of
3956         getting a critical warning and thus having to clear the whole
3957         MemoryCache.
3958
3959         * loader/cache/MemoryCache.h:
3960         * platform/MemoryPressureHandler.cpp:
3961         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
3962         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
3963         (WebCore::MemoryPressureHandler::releaseMemory):
3964         Call releaseCriticalMemory() before releaseNoncriticalMemory()
3965         as releaseCriticalMemory() is more aggressive. Doing it the
3966         other way around would mean that on critical warning, we would
3967         first evict dead resources, then evict all resources. It is
3968         more efficient to evict all resources first, as it makes the
3969         non-critical operation (evict dead resources) a no-op.
3970
3971 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
3972
3973         [iOS] pause video when a tab moves to the background on some devices
3974         https://bugs.webkit.org/show_bug.cgi?id=141753
3975         <rdar://problem/19814562>
3976
3977         Reviewed by Jer Noble.
3978
3979         Test: media/video-background-tab-playback.html
3980
3981         * platform/audio/MediaSession.cpp:
3982         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
3983             hidden if the BackgroundTabPlaybackRestricted is set.
3984
3985         * platform/audio/MediaSessionManager.cpp:
3986         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
3987              to BackgroundProcessPlaybackRestricted.
3988         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
3989         * platform/audio/MediaSessionManager.h:
3990
3991         * platform/audio/ios/MediaSessionManagerIOS.mm:
3992         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
3993             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
3994
3995         * testing/Internals.cpp:
3996         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
3997             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
3998
3999 2015-02-16  David Hyatt  <hyatt@apple.com>
4000
4001         Wrong element's style is used for text-decoration-style.
4002         https://bugs.webkit.org/show_bug.cgi?id=141673
4003         <rdar://problem/19876774>
4004
4005         Reviewed by Dean Jackson.
4006
4007         Added fast/text/text-underline-style.html
4008
4009         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
4010         (AXAttributeStringSetStyle):
4011         Add arguments for fetching styles.
4012
4013         * rendering/InlineTextBox.cpp:
4014         (WebCore::InlineTextBox::paint):
4015         (WebCore::InlineTextBox::paintDecoration):
4016         * rendering/InlineTextBox.h:
4017         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
4018         way it fetches the colors.
4019
4020         * rendering/RenderObject.cpp:
4021         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
4022         (WebCore::Rend