bac057f97fb619cff03bdb17bd7d9cd8f85812ad
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-24  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r180599.
4         https://bugs.webkit.org/show_bug.cgi?id=141998
5
6         Lots of new test failures (Requested by smfr on #webkit).
7
8         Reverted changeset:
9
10         "Parsing support for -webkit-trailing-word"
11         https://bugs.webkit.org/show_bug.cgi?id=141939
12         http://trac.webkit.org/changeset/180599
13
14 2015-02-24  Sam Weinig  <sam@webkit.org>
15
16         [Attachment] Give <attachment> elements an underlying File
17         https://bugs.webkit.org/show_bug.cgi?id=141993
18
19         Reviewed by Tim Horton.
20
21         - Add a JS subclass for attachments so that <attachment>s are
22           instances of HTMLAttachmentElement rather than HTMLElement.
23         - Give HTMLAttachmentElements an underlying File that they
24           are the representation of. Expose it via a new 'file' property.
25         - Expose a new Internals function called window.internals.createFile(url)
26           that allows creating File objects for testing.
27
28         * CMakeLists.txt:
29         * DerivedSources.cpp:
30         * DerivedSources.make:
31         * WebCore.vcxproj/WebCore.vcxproj:
32         * WebCore.vcxproj/WebCore.vcxproj.filters:
33         * WebCore.xcodeproj/project.pbxproj:
34         * fileapi/File.h:
35         * html/HTMLAttachmentElement.cpp:
36         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
37         (WebCore::HTMLAttachmentElement::file):
38         (WebCore::HTMLAttachmentElement::setFile):
39         * html/HTMLAttachmentElement.h:
40         * html/HTMLAttachmentElement.idl: Added.
41         * html/HTMLTagNames.in:
42         * testing/Internals.cpp:
43         (WebCore::Internals::createFile):
44         * testing/Internals.h:
45         * testing/Internals.idl:
46
47 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
48
49         AX: Implement support for ARIA 1.1 'switch' role
50         https://bugs.webkit.org/show_bug.cgi?id=141986
51
52         Reviewed by Chris Fleizach.
53
54         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
55         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
56         widget to accessibility APIs (supports and emits notifications when
57         toggled, doesn't have children, exposes a name and description when
58         provided).
59
60         Tests: accessibility/aria-switch-checked.html
61                accessibility/aria-switch-sends-notification.html
62                accessibility/aria-switch-text.html
63
64         * accessibility/AccessibilityNodeObject.cpp:
65         (WebCore::AccessibilityNodeObject::canHaveChildren):
66         (WebCore::AccessibilityNodeObject::isChecked):
67         (WebCore::AccessibilityNodeObject::visibleText):
68         (WebCore::AccessibilityNodeObject::title):
69         * accessibility/AccessibilityObject.cpp:
70         (WebCore::AccessibilityObject::isARIAInput):
71         (WebCore::AccessibilityObject::actionVerb):
72         (WebCore::initializeRoleMap):
73         (WebCore::AccessibilityObject::supportsChecked):
74         (WebCore::AccessibilityObject::checkboxOrRadioValue):
75         * accessibility/AccessibilityObject.h:
76         (WebCore::AccessibilityObject::isSwitch):
77         * accessibility/atk/AXObjectCacheAtk.cpp:
78         (WebCore::AXObjectCache::postPlatformNotification):
79         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
80         (atkRole):
81         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
82         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
83         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
84         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
85         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
86         (createAccessibilityRoleMap):
87         (-[WebAccessibilityObjectWrapper subrole]):
88         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
89
90 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
91
92         [Mac] [iOS] Parsing support for -apple-trailing-word
93         https://bugs.webkit.org/show_bug.cgi?id=141939
94
95         Reviewed by Andreas Kling.
96
97         This patch implements initial parsing support for the -apple-trailing-word CSS property.
98         This property has two possible (mutually exclusive) values: auto and
99         -apple-partially-balanced. This property is inherited.
100
101         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
102
103         This is an internal property that will allow us to control line breaking behavior for
104         short paragraphs.
105
106         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
107         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
108         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
109         version.
110
111         Test: platform/mac/fast/text/trailing-word-parse.html
112
113         * Configurations/FeatureDefines.xcconfig:
114         * css/CSSComputedStyleDeclaration.cpp:
115         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
116         CSS value.
117         * css/CSSParser.cpp:
118         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
119         pair.
120         (WebCore::isKeywordPropertyID): New property is a keyword property.
121         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
122         * css/CSSPrimitiveValueMappings.h:
123         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
124         representation and CSS values.
125         (WebCore::CSSPrimitiveValue::operator TrailingWord):
126         * css/CSSPropertyNames.in: New property.
127         * css/CSSValueKeywords.in: New value.
128         * rendering/SimpleLineLayout.cpp:
129         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
130         * rendering/style/RenderStyle.h: Getter, setter and initial value.
131         * rendering/style/RenderStyleConstants.h: Internal data type.
132         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
133
134 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
135
136         Remove DecodingTask::create and DatabaseOpenTask::create
137         https://bugs.webkit.org/show_bug.cgi?id=141966
138
139         Reviewed by Anders Carlsson.
140
141         These create() factory functions are redundant. We can use std::make_unique<> directly.
142
143         No new tests, no behavior changes.
144
145         * Modules/webaudio/AsyncAudioDecoder.cpp:
146         (WebCore::AsyncAudioDecoder::decodeAsync):
147         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
148         * Modules/webaudio/AsyncAudioDecoder.h:
149         * Modules/webdatabase/Database.cpp:
150         (WebCore::Database::openAndVerifyVersion):
151         * Modules/webdatabase/DatabaseTask.h:
152         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
153
154 2015-02-24  Commit Queue  <commit-queue@webkit.org>
155
156         Unreviewed, rolling out r180578.
157         https://bugs.webkit.org/show_bug.cgi?id=141992
158
159         Broke scrolling in Inspector Console. (Requested by JoePeck on
160         #webkit).
161
162         Reverted changeset:
163
164         "[Mac] WebKit abandons overlay scrollbar CALayers."
165         https://bugs.webkit.org/show_bug.cgi?id=141943
166         http://trac.webkit.org/changeset/180578
167
168 2015-02-24  Dean Jackson  <dino@apple.com>
169
170         [ios Media] the inline controls are visible after pressing Done on iPhone
171         https://bugs.webkit.org/show_bug.cgi?id=141987
172         <rdar://problem/19944110>
173
174         Reviewed by Beth Dakin.
175
176         When exiting out of a playing video, we should show the
177         start playback button if we don't allow inline media
178         (such as on iPhone).
179
180         * Modules/mediacontrols/mediaControlsiOS.js:
181         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
182         allowsInline as well.
183
184 2015-02-24  Zalan Bujtas  <zalan@apple.com>
185
186         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
187         https://bugs.webkit.org/show_bug.cgi?id=141982
188
189         Reviewed by Simon Fraser.
190
191         There should always be a valid FillLayer.
192
193         No change in functionality.
194
195         * rendering/RenderBox.cpp:
196         (WebCore::RenderBox::getBackgroundPaintedExtent):
197         (WebCore::RenderBox::maskClipRect):
198         (WebCore::RenderBox::repaintLayerRectsForImage):
199         * rendering/RenderBoxModelObject.cpp:
200         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
201         (WebCore::RenderBoxModelObject::calculateFillTileSize):
202         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
203         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
204         * rendering/RenderBoxModelObject.h:
205
206 2015-02-24  Dean Jackson  <dino@apple.com>
207
208         [iOS Media] Be specific about which document to use for the timeline background canvas
209         https://bugs.webkit.org/show_bug.cgi?id=141981
210
211         Reviewed by Eric Carlson.
212
213         In some cases, especially with nested iframes, the document
214         reference for the shadow DOM might not be the one used
215         to create a -webkit-canvas context for rendering via CSS.
216         Explicitly get the context from the video's owner
217         document.
218
219         There is still a bug here:
220         https://bugs.webkit.org/show_bug.cgi?id=141983
221
222         * Modules/mediacontrols/mediaControlsiOS.js:
223         (ControllerIOS.prototype.drawTimelineBackground):
224
225 2015-02-24  Zalan Bujtas  <zalan@apple.com>
226
227         Remove unused BackgroundImageGeometry::m_destOrigin
228         https://bugs.webkit.org/show_bug.cgi?id=141980
229
230         Reviewed by Simon Fraser.
231
232         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
233         They are not used at all.
234
235         No change in functionality.
236
237         * rendering/RenderBoxModelObject.cpp:
238         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
239         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
240         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
241         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
242         * rendering/RenderBoxModelObject.h:
243         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
244         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
245         * rendering/svg/RenderSVGResourceMasker.cpp:
246         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
247
248 2015-02-24  Zalan Bujtas  <zalan@apple.com>
249
250         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
251         https://bugs.webkit.org/show_bug.cgi?id=141979
252
253         Reviewed by Simon Fraser.
254
255         No change in functionality.
256
257         * rendering/RenderBox.cpp:
258         (WebCore::RenderBox::getBackgroundPaintedExtent):
259         (WebCore::RenderBox::maskClipRect):
260         (WebCore::RenderBox::repaintLayerRectsForImage):
261         * rendering/RenderBoxModelObject.cpp:
262         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
263         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
264         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
265         * rendering/RenderBoxModelObject.h:
266
267 2015-02-24  Zalan Bujtas  <zalan@apple.com>
268
269         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
270         https://bugs.webkit.org/show_bug.cgi?id=141972
271
272         Reviewed by Simon Fraser.
273
274         Image geometry's phase represents distance.
275
276         No change in functionality.
277
278         * WebCore.order:
279         * platform/graphics/GraphicsLayer.h:
280         (WebCore::GraphicsLayer::setContentsTilePhase):
281         (WebCore::GraphicsLayer::contentsTilePhase):
282         * platform/graphics/texmap/TextureMapperLayer.cpp:
283         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
284         (WebCore::TextureMapperLayer::setContentsTilePhase):
285         * platform/graphics/texmap/TextureMapperLayer.h:
286         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
287         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
288         * rendering/RenderBoxModelObject.cpp:
289         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
290         (WebCore::BackgroundImageGeometry::setNoRepeatX):
291         (WebCore::BackgroundImageGeometry::setNoRepeatY):
292         (WebCore::BackgroundImageGeometry::useFixedAttachment):
293         (WebCore::BackgroundImageGeometry::relativePhase):
294         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
295         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
296         * rendering/RenderBoxModelObject.h:
297         (WebCore::BackgroundImageGeometry::phase):
298         (WebCore::BackgroundImageGeometry::setPhase):
299         (WebCore::BackgroundImageGeometry::setPhaseX):
300         (WebCore::BackgroundImageGeometry::setPhaseY):
301         * rendering/RenderLayerBacking.cpp:
302         (WebCore::RenderLayerBacking::resetContentsRect):
303         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
304         * rendering/svg/RenderSVGResourceMasker.cpp:
305         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
306
307 2015-02-24  Andreas Kling  <akling@apple.com>
308
309         [Mac] WebKit abandons overlay scrollbar CALayers.
310         <https://webkit.org/b/141943>
311         <rdar://problem/19932199>
312
313         Reviewed by Beth Dakin.
314
315         * platform/mac/ScrollAnimatorMac.mm:
316         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
317         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
318         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
319         amounts of abandoned memory to accumulate over time.
320
321 2015-02-24  Anders Carlsson  <andersca@apple.com>
322
323         Implement more of the data fetching API
324         https://bugs.webkit.org/show_bug.cgi?id=141975
325
326         Reviewed by Andreas Kling.
327
328         Add API for getting origins in a given session that has cached data.
329
330         * loader/cache/MemoryCache.cpp:
331         (WebCore::MemoryCache::originsWithCache):
332
333 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
334
335         Use nullptr in more places in FrameView, RenderView, RenderObject
336         https://bugs.webkit.org/show_bug.cgi?id=141974
337
338         Reviewed by Zalan Bujtas.
339
340         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
341         
342         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
343         to make it more clear that it's a count.
344
345         * page/FrameView.cpp:
346         (WebCore::FrameView::FrameView):
347         (WebCore::FrameView::reset):
348         (WebCore::FrameView::setContentsSize):
349         (WebCore::FrameView::calculateScrollbarModesForLayout):
350         (WebCore::FrameView::layerForScrolling):
351         (WebCore::FrameView::layerForHorizontalScrollbar):
352         (WebCore::FrameView::layerForVerticalScrollbar):
353         (WebCore::FrameView::layerForScrollCorner):
354         (WebCore::FrameView::tiledBacking):
355         (WebCore::FrameView::scrollLayerID):
356         (WebCore::FrameView::layerForOverhangAreas):
357         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
358         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
359         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
360         (WebCore::FrameView::layoutRoot):
361         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
362         (WebCore::FrameView::layout):
363         (WebCore::FrameView::hostWindow):
364         (WebCore::FrameView::scheduleRelayout):
365         (WebCore::FrameView::scheduleRelayoutOfSubtree):
366         (WebCore::FrameView::needsLayout):
367         (WebCore::FrameView::setNeedsLayout):
368         (WebCore::FrameView::enclosingScrollableArea):
369         (WebCore::FrameView::parentFrameView):
370         (WebCore::FrameView::paintControlTints):
371         (WebCore::FrameView::adjustPageHeightDeprecated):
372         (WebCore::FrameView::axObjectCache):
373         * page/FrameView.h:
374         * rendering/RenderObject.cpp:
375         (WebCore::RenderObject::RenderObject):
376         (WebCore::RenderObject::nextInPreOrderAfterChildren):
377         (WebCore::RenderObject::previousInPreOrder):
378         (WebCore::RenderObject::firstLeafChild):
379         (WebCore::RenderObject::lastLeafChild):
380         (WebCore::RenderObject::traverseNext):
381         (WebCore::RenderObject::firstLineBlock):
382         (WebCore::RenderObject::containerForRepaint):
383         (WebCore::RenderObject::showRenderSubTreeAndMark):
384         (WebCore::RenderObject::localToAbsolute):
385         (WebCore::RenderObject::container):
386         * rendering/RenderObject.h:
387         (WebCore::RenderObject::virtualContinuation):
388         (WebCore::RenderObject::node):
389         (WebCore::RenderObject::nonPseudoNode):
390         (WebCore::RenderObject::localToAbsoluteQuad):
391         (WebCore::RenderObject::absoluteQuads):
392         (WebCore::RenderObject::absoluteClippedOverflowRect):
393         (WebCore::RenderObject::outlineBoundsForRepaint):
394         (WebCore::RenderObject::computeAbsoluteRepaintRect):
395         (WebCore::RenderObject::selectionRect):
396         (WebCore::RenderObject::imageChanged):
397         (WebCore::RenderObject::addFocusRingRects):
398         (WebCore::RenderObject::absoluteOutlineBounds):
399         * rendering/RenderView.cpp:
400         (WebCore::SelectionIterator::next):
401         (WebCore::RenderView::RenderView):
402         (WebCore::RenderView::mapLocalToContainer):
403         (WebCore::RenderView::pushMappingToContainer):
404         (WebCore::RenderView::computeRectForRepaint):
405         (WebCore::rendererAfterPosition):
406         (WebCore::RenderView::splitSelectionBetweenSubtrees):
407         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
408         * rendering/RenderView.h:
409
410 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
411
412         REGRESSION(r179429): Can't type comments in Facebook
413         https://bugs.webkit.org/show_bug.cgi?id=141859
414
415         Reviewed by Brent Fulgham.
416
417         Enable SymbolEnabled runtime flag in inspector context.
418
419         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
420         * WebCore.order:
421         * WebCore.vcxproj/WebCore.vcxproj:
422         * WebCore.vcxproj/WebCore.vcxproj.filters:
423         * bindings/js/JSDOMWindowBase.cpp:
424         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
425         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
426         * bindings/js/JSDOMWindowBase.h:
427         * bindings/js/JSWorkerGlobalScopeBase.cpp:
428         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
429         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
430         * bindings/js/JSWorkerGlobalScopeBase.h:
431         * inspector/InspectorFrontendClientLocal.cpp:
432         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
433         * page/Settings.h:
434         * page/Settings.in:
435
436 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
437
438         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
439         https://bugs.webkit.org/show_bug.cgi?id=141748
440
441         Reviewed by Sergio Villar Senin.
442
443         The first step of grid item placement algorithm has been updated in
444         order to support both "sparse" and "dense" modes. Current code is always
445         doing a "dense" packing in this case.
446
447         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
448
449         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
450
451         * rendering/RenderGrid.cpp:
452         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
453         for each row/column and use it to place items in the right position.
454
455 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
456
457         [GTK] Layout Test accessibility/roles-exposed.html is failing
458         https://bugs.webkit.org/show_bug.cgi?id=141960
459
460         Reviewed by Martin Robinson.
461
462         The test was failing because Gtk now uses GtkColorChooserDialog for the
463         color input, making the input field a button which results in the color
464         chooser dialog appearing. As a side effect of this change, the input now
465         has an accessible role of ColorWell, which is currently mapped to
466         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
467         upon activating the button input field). Changed the Gtk platform mapping
468         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
469
470         No new tests. Instead, updated and unskipped failing test.
471
472         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
473         (atkRole):
474
475 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
476
477         [GTK] Fonts loaded via @font-face look bad
478         https://bugs.webkit.org/show_bug.cgi?id=140994
479
480         Reviewed by Martin Robinson.
481
482         We've had several complaints that woff fonts look bad on some websites. This seems to be a
483         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
484         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
485         use sane default settings from Fontconfig when loading a web font, rather than accepting the
486         default settings from GTK+, which are normally overridden by Fontconfig when loading system
487         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
488         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
489         issues when fonts with poor native hinting are only tested in browsers that do not use the
490         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
491         bytecode interpreter.
492
493         The net result of this is that there should be little noticable difference if you have GTK+
494         set to use slight hinting (which forces use of the autohinter) unless you have customized
495         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
496         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
497
498         No new tests, since the affected fonts we've found are not freely redistributable.
499
500         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
501         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
502         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
503         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
504         (WebCore::getDefaultFontconfigOptions): Added.
505         (WebCore::FontPlatformData::initializeWithFontFace): Always call
506         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
507         created with an FcPattern (e.g. because this is a web font), call
508         getDefaultFontconfigOptions to get a sane default FcPattern.
509         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
510         (WebCore::getDefaultFontOptions): Deleted.
511
512 2015-02-24  Andreas Kling  <akling@apple.com>
513
514         [Cocoa] Break internal reference cycle in WebCore::Font.
515         <https://webkit.org/b/141941>
516         <rdar://problem/19650570>
517
518         Reviewed by Antti Koivisto.
519
520         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
521         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
522
523         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
524         variant (really "this") in Font::m_derivedData->smallCaps.
525
526         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
527         This stops us from accumulating tons of abandoned Font objects over time.
528
529         * platform/graphics/Font.cpp:
530         (WebCore::Font::verticalRightOrientationFont):
531         (WebCore::Font::uprightOrientationFont):
532         (WebCore::Font::smallCapsFont):
533         (WebCore::Font::emphasisMarkFont):
534         (WebCore::Font::brokenIdeographFont):
535         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
536
537         * platform/graphics/cocoa/FontCocoa.mm:
538         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
539
540 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
541
542         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
543         https://bugs.webkit.org/show_bug.cgi?id=141650
544
545         Reviewed by Benjamin Poulain.
546
547         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
548         This patch stores them as private slots in JSReadableStream.
549         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
550
551         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
552         That may be the cleanest solution, especially if other APIs express the same need.
553         Another alternative is to store DeferredWrapper in ReadableStream objects.
554         But it is currently preferred to keep DeferredWrapper in bindings/js code.
555
556         Added new constructor for DeferredWrapper to use these stored values.
557         Updated ready and closed methods to use that new constructor.
558         Changes are covered by new test in streams/readablestream-constructor.html.
559
560         * bindings/js/JSDOMPromise.cpp:
561         (WebCore::DeferredWrapper::DeferredWrapper):
562         * bindings/js/JSDOMPromise.h:
563         * bindings/js/JSReadableStreamCustom.cpp:
564         (WebCore::closedPromiseSlotName):
565         (WebCore::getOrCreatePromiseDeferredFromObject):
566         (WebCore::readyPromiseSlotName):
567         (WebCore::JSReadableStream::ready):
568         (WebCore::JSReadableStream::closed):
569         * bindings/js/ReadableStreamJSSource.cpp:
570         (WebCore::setInternalSlotToObject):
571         (WebCore::getInternalSlotFromObject):
572         * bindings/js/ReadableStreamJSSource.h:
573
574 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
575
576         Always serialize :lang()'s arguments to strings
577         https://bugs.webkit.org/show_bug.cgi?id=141944
578
579         Reviewed by Benjamin Poulain.
580
581         As specified in [1] :lang()'s arguments are always serialized to strings.
582
583         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
584
585         Related tests are updated.
586
587         * css/CSSGrammar.y.in:
588         * css/CSSParserValues.cpp:
589         (WebCore::CSSParserSelector::setLangArgumentList):
590         * css/CSSParserValues.h:
591         (WebCore::CSSParserString::init):
592         (WebCore::CSSParserString::clear):
593         (WebCore::CSSParserString::tokenType): Deleted.
594         (WebCore::CSSParserString::setTokenType): Deleted.
595         * css/CSSSelector.cpp:
596         (WebCore::appendLangArgumentList):
597         (WebCore::CSSSelector::setLangArgumentList):
598         * css/CSSSelector.h:
599         (WebCore::CSSSelector::langArgumentList):
600         * css/SelectorCheckerTestFunctions.h:
601         (WebCore::matchesLangPseudoClass):
602         * cssjit/SelectorCompiler.cpp:
603         (WebCore::SelectorCompiler::addPseudoClassType):
604         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
605
606 2015-02-24  Antti Koivisto  <antti@apple.com>
607
608        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
609
610         * css/StyleResolver.cpp:
611         (WebCore::StyleResolver::loadPendingImages):
612
613 2015-02-23  Commit Queue  <commit-queue@webkit.org>
614
615         Unreviewed, rolling out r180547 and r180550.
616         https://bugs.webkit.org/show_bug.cgi?id=141957
617
618         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
619
620         Reverted changesets:
621
622         "REGRESSION(r179429): Can't type comments in Facebook"
623         https://bugs.webkit.org/show_bug.cgi?id=141859
624         http://trac.webkit.org/changeset/180547
625
626         "Constructor returning null should construct an object instead
627         of null"
628         https://bugs.webkit.org/show_bug.cgi?id=141640
629         http://trac.webkit.org/changeset/180550
630
631 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
632
633         Disable font loading events until our implementation gets updated to match the latest spec
634         https://bugs.webkit.org/show_bug.cgi?id=141938
635
636         Reviewed by Andreas Kling.
637
638         Revert r173531 for now since our implementation is outdated.
639
640         * Configurations/FeatureDefines.xcconfig:
641
642 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
643
644         EventHandler references deleted Scrollbar
645         https://bugs.webkit.org/show_bug.cgi?id=141931
646         <rdar://problem/19915210>
647
648         Reviewed by Tim Horton.
649
650         Tested by scrollbars/overflow-custom-scrollbar-crash.html
651
652         Update the EventHandler class to use a WeakPtr to reference the
653         last used Scrollbar, rather than retaining the Scrollbar and
654         artificially extending its life. This keeps the EventHandler
655         state in proper sync with the state of the render tree, and
656         avoids cases where we have destroyed a ScrollableArea (and
657         Scrollbar) but are still sending messages to a fake zombie
658         version of the element.
659
660         * page/EventHandler.cpp:
661         (WebCore::EventHandler::clear):
662         (WebCore::EventHandler::handleMousePressEvent):
663         (WebCore::EventHandler::updateMouseEventTargetNode):
664         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
665         * page/EventHandler.h:
666         * platform/Scrollbar.cpp:
667         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
668         * platform/Scrollbar.h:
669         (WebCore::Scrollbar::createWeakPtr): Added,
670
671 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
672
673         REGRESSION(r179429): Can't type comments in Facebook
674         https://bugs.webkit.org/show_bug.cgi?id=141859
675
676         Reviewed by Geoffrey Garen.
677
678         Enable SymbolEnabled runtime flag in inspector context.
679
680         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
681         * WebCore.order:
682         * WebCore.vcxproj/WebCore.vcxproj:
683         * WebCore.vcxproj/WebCore.vcxproj.filters:
684         * bindings/js/JSDOMWindowBase.cpp:
685         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
686         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
687         * bindings/js/JSDOMWindowBase.h:
688         * bindings/js/JSWorkerGlobalScopeBase.cpp:
689         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
690         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
691         * bindings/js/JSWorkerGlobalScopeBase.h:
692         * inspector/InspectorFrontendClientLocal.cpp:
693         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
694         * page/Settings.h:
695         * page/Settings.in:
696
697 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
698
699         CSS JIT: add support for case-insensitive attribute matching
700         https://bugs.webkit.org/show_bug.cgi?id=141880
701
702         Reviewed by Andreas Kling.
703
704         The value matching now has 3 cases:
705         1) Case-sensitive.
706         2) Case-insensitive.
707         3) Legacy HTML Case-insensitive.
708
709         The information to determine the case is split over 2 source:
710         -To know if explicit case-insensitive is needed, we need to ask the selector
711          for attributeValueMatchingIsCaseInsensitive().
712         -To know if the legacy HTML behavior is needed, we need to test the attribute
713          name filter with HTMLDocument::isCaseSensitiveAttribute().
714
715         I decided to perform all those checks at the fragment creation step.
716         This makes the register requirements and code generation more explicit.
717
718         From there, everything is easy: switch() on the type of matching needed,
719         and generate the code. The new case-insensitive case is a simplified version
720         of the legacy HTML behavior without runtime check for the element type.
721
722         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
723                fast/selectors/case-insensitive-attribute-register-requirement-1.html
724                fast/selectors/case-insensitive-attribute-register-requirement-2.html
725                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
726
727         * cssjit/SelectorCompiler.cpp:
728         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
729         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
730         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
731         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
732         (WebCore::SelectorCompiler::constructFragmentsInternal):
733         Compute the type of value matching and store it on the AttributeMatchingInfo
734         when creating the fragment.
735
736         (WebCore::SelectorCompiler::minimumRegisterRequirements):
737         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
738         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
739         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
740         register. I have made an exception for generateElementAttributeValueExactMatching()
741         for simplicity. I use that register to load the StringImpl of the attribute
742         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
743
744         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
745         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
746         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
747         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
748         the behavior is consistent between XML and HTML.
749
750 2015-02-23  Alex Christensen  <achristensen@webkit.org>
751
752         [WinCairo] Unreviewed build fix after r180532
753
754         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
755         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
756         Fixed typo.
757
758 2015-02-23  Chris Dumez  <cdumez@apple.com>
759
760         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
761         https://bugs.webkit.org/show_bug.cgi?id=141922
762         <rdar://problem/19923085>
763
764         Reviewed by Andreas Kling.
765
766         Log using diagnostic logging which ActiveDOMObjects prevent using the
767         PageCache.
768
769         * history/PageCache.cpp:
770         (WebCore::logCanCacheFrameDecision):
771         * page/DiagnosticLoggingKeys.cpp:
772         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
773         * page/DiagnosticLoggingKeys.h:
774
775 2015-02-23  Chris Dumez  <cdumez@apple.com>
776
777         Move GeoNotifier class to its own file
778         https://bugs.webkit.org/show_bug.cgi?id=141918
779
780         Reviewed by Andreas Kling.
781
782         Move GeoNotifier class to its own file to make Geolocation class less
783         crowded.
784
785 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
786
787         Remove unnecessary PlatformTimeRanges::create()
788         https://bugs.webkit.org/show_bug.cgi?id=141901
789
790         Reviewed by Filip Pizlo.
791
792         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
793         This functionality can be replaced with std::make_unique<> use directly.
794
795         No new tests, no behavior changes.
796
797         * Modules/mediasource/MediaSource.cpp:
798         (WebCore::MediaSource::buffered):
799         * Modules/mediasource/SourceBuffer.cpp:
800         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
801         * platform/graphics/MediaPlayer.cpp:
802         (WebCore::NullMediaPlayerPrivate::buffered):
803         * platform/graphics/MediaPlayerPrivate.h:
804         (WebCore::MediaPlayerPrivateInterface::seekable):
805         * platform/graphics/PlatformTimeRanges.cpp:
806         (WebCore::PlatformTimeRanges::create): Deleted.
807         * platform/graphics/PlatformTimeRanges.h:
808         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
809         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
810         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
811         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
812         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
813         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
814         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
815         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
816         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
817         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
818         (WebCore::MediaPlayerPrivateGStreamer::buffered):
819         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
820         (WebCore::MediaPlayerPrivateQTKit::buffered):
821         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
822         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
823         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
824         (WebCore::MockMediaPlayerMediaSource::buffered):
825
826 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
827
828         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
829         https://bugs.webkit.org/show_bug.cgi?id=141888
830
831         Reviewed by Filip Pizlo.
832
833         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
834         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
835
836         No new tests, no behavior changes.
837
838         * platform/SharedBuffer.h:
839         * platform/Supplementable.h:
840         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
841         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
842         * platform/graphics/ImageBuffer.h:
843         * platform/graphics/TiledBackingStoreBackend.h:
844         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
845         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
846         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
847         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
848         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
849         * platform/gtk/GamepadsGtk.cpp:
850
851 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
852
853         Default value of HTMLSelectElement size IDL attribute should be 0.
854         https://bugs.webkit.org/show_bug.cgi?id=141795
855
856         Reviewed by Andreas Kling.
857
858         Default value of HTMLSelectElement size IDL attribute should be 0. 
859         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
860         Gecko.
861
862         Test: fast/dom/select-size.html
863
864         * html/HTMLSelectElement.cpp:
865         (WebCore::HTMLSelectElement::parseAttribute):
866
867 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
868
869         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
870         https://bugs.webkit.org/show_bug.cgi?id=141729.
871
872         Reviewed by Daniel Bates.
873
874         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
875         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
876
877         * platform/graphics/GraphicsContext.h:
878         (WebCore::GraphicsContext::paintingDisabled):
879         (WebCore::GraphicsContext::updatingControlTints):
880
881 2015-02-22  Dean Jackson  <dino@apple.com>
882
883         [iOS] Max canvas size is lower than expected
884         https://bugs.webkit.org/show_bug.cgi?id=141886
885         <rdar://problem/19729246>
886
887         Reviewed by Tim Horton.
888
889         Use the same maximum canvas area for all ports,
890         which bumps the iOS limit up from 4580 * 1145
891         to 16k * 16k.
892
893         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
894
895 2015-02-23  Chris Dumez  <cdumez@apple.com>
896
897         Add support for diagnostic logging messages sampling
898         https://bugs.webkit.org/show_bug.cgi?id=141823
899         <rdar://problem/19899030>
900
901         Reviewed by Andreas Kling.
902
903         Add support for diagnostic logging messages sampling to decrease the
904         impact of diagnostic logging on CPU usage, while still getting useful
905         overall results. This patch adds a ShouldSample argument to
906         logDiagnosticMessage*() functions and logs 5% of the messages when
907         sampling. Sampling is turned on for keys that are known to be verbose
908         (e.g. per resource load logging).
909
910         On the page load test I am tracking, CPU usage caused by diagnostic
911         logging went down to 0.3% of UIProcess from 2.8% with this change.
912
913         * history/PageCache.cpp:
914         (WebCore::logPageCacheFailureDiagnosticMessage):
915         (WebCore::logCanCachePageDecision):
916         * html/HTMLMediaElement.cpp:
917         (WebCore::HTMLMediaElement::parseAttribute):
918         * loader/EmptyClients.h:
919         * loader/FrameLoader.cpp:
920         (WebCore::logNavigation):
921         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
922         * loader/ResourceLoader.cpp:
923         (WebCore::logResourceResponseSource):
924         * loader/SubframeLoader.cpp:
925         (WebCore::logPluginRequest):
926         * loader/SubresourceLoader.cpp:
927         (WebCore::SubresourceLoader::willSendRequest):
928         (WebCore::SubresourceLoader::didReceiveResponse):
929         (WebCore::logResourceLoaded):
930         * loader/cache/CachedResource.cpp:
931         (WebCore::logResourceRevalidationReason):
932         * loader/cache/CachedResourceLoader.cpp:
933         (WebCore::logMemoryCacheResourceRequest):
934         * page/DiagnosticLoggingClient.h:
935
936 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
937
938         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
939         https://bugs.webkit.org/show_bug.cgi?id=141729.
940
941         Reviewed by Simon Fraser.
942
943         When drawing an SVG image and the drawing context is set to be transparent,
944         make sure this transparency is applied to the compositing layer.
945
946         Test: svg/canvas/canvas-global-alpha-svg.html
947
948         * platform/graphics/GraphicsContext.cpp:
949         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
950         function and sets 'm_state.alpha' to the input value.
951
952         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
953         returns the value of the global alpha.
954         
955         * platform/graphics/GraphicsContext.h:
956         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
957         'alpha' to the context state since the getter function CGContextGetAlpha
958         is defined only in a private header file. Also move single line functions
959         from the source file to the header file.
960     
961         * platform/graphics/cairo/GraphicsContextCairo.cpp:
962         (WebCore::GraphicsContext::setPlatformAlpha):
963         (WebCore::GraphicsContext::setAlpha): Deleted.
964         * platform/graphics/cg/GraphicsContextCG.cpp:
965         (WebCore::GraphicsContext::setPlatformAlpha):
966         (WebCore::GraphicsContext::setAlpha): Deleted.
967         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
968         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
969         setPlatformAlpha().
970     
971         * svg/graphics/SVGImage.cpp:
972         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
973         global alpha value to the compositing layer.
974         
975 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
976
977         Occasional crash in MediaPlayer::setPrivateBrowsingMode
978         https://bugs.webkit.org/show_bug.cgi?id=141910
979
980         Reviewed by Jer Noble.
981
982         No new tests, I was unable to reproduce the crash.
983
984         * html/HTMLMediaElement.cpp:
985         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
986         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
987             to NULL.
988         * html/HTMLMediaElement.h: Define EveryDelayedAction.
989
990 2015-02-23  Philippe Normand  <pnormand@igalia.com>
991
992         [GStreamer] Redundant track language notifications
993         https://bugs.webkit.org/show_bug.cgi?id=141908
994
995         Reviewed by Žan Doberšek.
996
997         Invoke languageChanged only if the language code actually
998         changed.
999
1000         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1001         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1002
1003 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
1004
1005         [WinCairo] Crash when media player is destroyed.
1006         https://bugs.webkit.org/show_bug.cgi?id=141248
1007
1008         Reviewed by Darin Adler.
1009
1010         A COM smart pointer is both released, and set to null.
1011         This means that the COM Release method is called twice, causing a crash.
1012
1013         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1014         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1015
1016 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
1017
1018         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
1019         https://bugs.webkit.org/show_bug.cgi?id=141899
1020
1021         Reviewed by Sergio Villar Senin.
1022
1023         There was a FIXME about not re-resolving positions if the grid is grown during
1024         auto-placement. But as the spec has changed [1] and you can only refer to the
1025         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
1026         we can get rid of this FIXME as it's not a causing a problem anymore.
1027
1028         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
1029
1030         No new tests (no change in behavior).
1031
1032         * rendering/RenderGrid.cpp:
1033         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
1034
1035 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1036
1037         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
1038         https://bugs.webkit.org/show_bug.cgi?id=137877
1039
1040         Reviewed by Sam Weinig.
1041
1042         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
1043         change OwnPtr with std::unique_ptr<>|make_unique<>.
1044
1045         No new tests, no behavior changes.
1046
1047         * page/scrolling/AsyncScrollingCoordinator.h:
1048         * page/scrolling/ScrollingStateFixedNode.cpp:
1049         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1050         * page/scrolling/ScrollingStateNode.cpp:
1051         (WebCore::ScrollingStateNode::appendChild):
1052         * page/scrolling/ScrollingStateNode.h:
1053         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1054         * page/scrolling/ScrollingStateScrollingNode.cpp:
1055         * page/scrolling/ScrollingStateStickyNode.cpp:
1056         * page/scrolling/ScrollingTree.h:
1057         * page/scrolling/ScrollingTreeNode.cpp:
1058         (WebCore::ScrollingTreeNode::appendChild):
1059         * page/scrolling/ScrollingTreeNode.h:
1060         * page/scrolling/ScrollingTreeScrollingNode.h:
1061
1062 2015-02-22  Dean Jackson  <dino@apple.com>
1063
1064         Print a console warning when HTMLCanvasElement exceeds the maximum size
1065         https://bugs.webkit.org/show_bug.cgi?id=141861
1066         <rdar://problem/19729145>
1067
1068         Reviewed by Simon Fraser.
1069
1070         Add a warning if we ever try to create a canvas that is
1071         too big.
1072
1073         No test because:
1074         1. We can't ref-test against console messages.
1075         2. The output is platform specific.
1076
1077         * html/HTMLCanvasElement.cpp:
1078         (WebCore::HTMLCanvasElement::createImageBuffer):
1079
1080 2015-02-21  Sam Weinig  <sam@webkit.org>
1081
1082         Convert the caps lock indicator to be implemented using the shadow DOM
1083         https://bugs.webkit.org/show_bug.cgi?id=141868
1084
1085         Reviewed by Dan Bernstein.
1086
1087         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
1088           in r74099 to work around a site bug, that should not be a problem anymore.
1089         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
1090           than a paint time effect. This gives the proper overflow behavior (it now clips) and
1091           behaves correctly in RTL.
1092
1093         * css/CSSParser.cpp:
1094         (WebCore::isValidKeywordPropertyAndValue):
1095         Make 'caps-lock-indicator' a valid -webkit-appearance value.
1096
1097         * css/CSSValueKeywords.in:
1098         Remove comment that indicated that caps-lock-indicator was not a valid
1099         -webkit-appearance value.
1100
1101         * css/html.css:
1102         (input::-webkit-caps-lock-indicator):
1103         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
1104         trick employed here is to use a content: image to both implement the painting of
1105         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
1106
1107         * html/HTMLInputElement.cpp:
1108         (WebCore::HTMLInputElement::capsLockIndicatorElement):
1109         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
1110         * html/HTMLInputElement.h:
1111         * html/InputType.cpp:
1112         (WebCore::InputType::capsLockStateMayHaveChanged):
1113         * html/InputType.h:
1114         (WebCore::InputType::capsLockIndicatorElement):
1115         Pipe notification of changes in the caps locks state to the <input> element
1116         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
1117         lock indicator element in the shadow DOM.
1118
1119         * html/TextFieldInputType.cpp:
1120         (WebCore::TextFieldInputType::forwardEvent):
1121         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
1122         (WebCore::TextFieldInputType::createShadowSubtree):
1123         (WebCore::TextFieldInputType::capsLockIndicatorElement):
1124         (WebCore::TextFieldInputType::destroyShadowSubtree):
1125         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
1126         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
1127         * html/TextFieldInputType.h:
1128         Add a new element to the text field shadow DOM to act as the caps lock indicator.
1129         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
1130         from CSS. The element is always in the DOM for a password field. It toggles between
1131         display: none and display: block depending on the state of the caps lock key.
1132
1133         * page/EventHandler.cpp:
1134         (WebCore::EventHandler::capsLockStateMayHaveChanged):
1135         Pipe notification of changes in the caps locks state to the <input> element
1136         rather than the RenderTextControlSingleLine.
1137
1138         * rendering/RenderTextControlSingleLine.cpp:
1139         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1140         (WebCore::RenderTextControlSingleLine::paint): Deleted.
1141         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
1142         * rendering/RenderTextControlSingleLine.h:
1143         Remove logic for drawing the caps lock indicator.
1144
1145         * rendering/RenderTheme.cpp:
1146         (WebCore::RenderTheme::adjustStyle):
1147         (WebCore::RenderTheme::paint):
1148         (WebCore::RenderTheme::paintMeter):
1149         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
1150         (WebCore::RenderTheme::paintCapsLockIndicator):
1151         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
1152         * rendering/RenderTheme.h:
1153         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
1154         * rendering/RenderThemeIOS.h:
1155         * rendering/RenderThemeIOS.mm:
1156         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
1157         * rendering/RenderThemeMac.h:
1158         * rendering/RenderThemeMac.mm:
1159         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
1160         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
1161         Now that the caps lock indicator is implemented like other aspects of form controls,
1162         the theme code can be converted to be similar as well.
1163
1164 2015-02-21  David Kilzer  <ddkilzer@apple.com>
1165
1166         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
1167         <http://webkit.org/b/141816>
1168
1169         Attempt to fix the following build failure:
1170
1171             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
1172             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
1173             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1174             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1175             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1176             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
1177             <scratch space>:58:1: note: expanded from here
1178             CoreMediaLibrary
1179             ^~~~~~~~~~~~~~~~
1180             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1181             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
1182             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
1183             ^
1184             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1185             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1186             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
1187             <scratch space>:42:1: note: expanded from here
1188             CoreMediaLibrary
1189             ^
1190             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
1191             SOFT_LINK_FRAMEWORK(CoreMedia)
1192             ^
1193             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1194             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1195             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
1196             <scratch space>:51:1: note: expanded from here
1197             CoreMediaLibrary
1198             ^
1199
1200         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
1201         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
1202         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
1203         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
1204
1205 2015-02-21  David Kilzer  <ddkilzer@apple.com>
1206
1207         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
1208         <http://webkit.org/b/141816>
1209
1210         Reviewed by Alexey Proskuryakov.
1211
1212         * WebCore.vcxproj/WebCore.vcxproj:
1213         * WebCore.vcxproj/WebCore.vcxproj.filters:
1214         - Remove CoreMediaSoftLinking.h.
1215
1216         * platform/cf/CoreMediaSoftLink.cpp:
1217         - Add kCMTimeZero constant.
1218         * platform/cf/CoreMediaSoftLink.h:
1219         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
1220         - Add kCMTimeZero constant.
1221
1222         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
1223
1224         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1225         - Remove reference to CoreMediaSoftLinking.h and update comment.
1226         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
1227         - Switch to using new method to check if a framework is
1228           available.
1229
1230         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1231         - Remove all local soft-linking macros for CoreMedia.
1232           CoreMediaSoftLink.h handles everything now.
1233         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
1234         - Switch to using new method to check if a framework is
1235           available.
1236
1237         * platform/mac/SoftLinking.h:
1238         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
1239         is_Name_FrameworkAvailable() macro.
1240         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
1241         optional framework checks without a separate macro.
1242         (SOFT_LINK_CONSTANT_HEADER): Add.
1243         (SOFT_LINK_CONSTANT_SOURCE): Add.
1244         - Support soft-links to constants.
1245
1246         * platform/win/SoftLinking.h:
1247         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
1248         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
1249         non-static function.
1250         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
1251         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
1252         SOFT_LINK_DEBUG_LIBRARY.
1253         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
1254         is_Name_FrameworkAvailable() macro.
1255         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
1256         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
1257         (SOFT_LINK_CONSTANT_HEADER): Add.
1258         (SOFT_LINK_CONSTANT_SOURCE): Add.
1259         - Support soft-links to constants.
1260
1261 2015-02-20  David Kilzer  <ddkilzer@apple.com>
1262
1263         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
1264         <http://webkit.org/b/141849>
1265
1266         Reviewed by Brent Fulgham.
1267
1268         This patch does the following:
1269         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
1270           macros for reuse in other projects.
1271         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
1272           141816.
1273         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
1274           and includes framework name in generated function names.  This
1275           adds more entropy to the names in case there are two functions
1276           with the same name in different frameworks.
1277
1278         * platform/cf/CoreMediaSoftLink.cpp:
1279         - Add FIXME about USE(COREMEDIA).
1280         - Switch from SOFT_LINK_FRAMEWORK() to
1281           SOFT_LINK_FRAMEWORK_SOURCE().
1282         * platform/cf/CoreMediaSoftLink.h:
1283         - Add FIXME about USE(COREMEDIA).
1284         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
1285           macros.
1286
1287         * platform/mac/SoftLinking.h:
1288         - Add missing header guards.
1289         - Add pragmas for different macro groups.
1290         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
1291         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
1292         (SOFT_LINK_FUNCTION_SOURCE): Move.
1293         - Add framework name to generated function names.
1294         - Incorporates namespace so that it doesn't have to be listed in
1295           the *SoftLink.{cpp,h} file.
1296
1297         * platform/win/SoftLinking.h:
1298         - Add pragmas for different macro groups.
1299         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
1300         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
1301         (SOFT_LINK_FUNCTION_SOURCE): Move.
1302         - Add framework name to generated function names.
1303         - Incorporates namespace so that it doesn't have to be listed in
1304           the *SoftLink.{cpp,h} file.
1305
1306 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1307
1308         [Gtk] Unreviewed build fix.
1309
1310         * platform/ScrollAnimatorNone.cpp:
1311         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
1312         uses of ScrollableArea.
1313
1314 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1315
1316         Scrollbars and ScrollAnimators must always have a ScrollableArea
1317         https://bugs.webkit.org/show_bug.cgi?id=141855
1318
1319         Reviewed by Simon Fraser.
1320
1321         No change in functionality.
1322         
1323         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
1324         a number of unnecessary nullptr checks.
1325
1326         * accessibility/AccessibilityScrollbar.cpp:
1327         (WebCore::AccessibilityScrollbar::setValue):
1328         * css/SelectorCheckerTestFunctions.h:
1329         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
1330         * page/FrameView.cpp:
1331         (WebCore::FrameView::createScrollbar):
1332         (WebCore::FrameView::setFixedVisibleContentRect):
1333         * page/scrolling/ScrollingCoordinator.cpp:
1334         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
1335         * platform/PopupMenuClient.h:
1336         * platform/ScrollAnimator.cpp:
1337         (WebCore::ScrollAnimator::ScrollAnimator):
1338         (WebCore::ScrollAnimator::scroll):
1339         (WebCore::ScrollAnimator::handleWheelEvent):
1340         (WebCore::ScrollAnimator::notifyPositionChanged):
1341         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
1342         * platform/ScrollAnimator.h:
1343         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
1344         * platform/ScrollAnimatorNone.cpp:
1345         * platform/ScrollAnimatorNone.h:
1346         * platform/ScrollView.cpp:
1347         (WebCore::ScrollView::createScrollbar):
1348         * platform/ScrollableArea.cpp:
1349         (WebCore::ScrollableArea::scrollAnimator):
1350         (WebCore::ScrollableArea::scroll):
1351         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
1352         (WebCore::ScrollableArea::notifyScrollPositionChanged):
1353         (WebCore::ScrollableArea::scrollPositionChanged):
1354         (WebCore::ScrollableArea::handleWheelEvent):
1355         (WebCore::ScrollableArea::handleTouchEvent):
1356         (WebCore::ScrollableArea::mouseEnteredScrollbar):
1357         (WebCore::ScrollableArea::mouseExitedScrollbar):
1358         (WebCore::ScrollableArea::didAddScrollbar):
1359         (WebCore::ScrollableArea::willRemoveScrollbar):
1360         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
1361         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
1362         * platform/ScrollableArea.h:
1363         * platform/Scrollbar.cpp:
1364         (WebCore::Scrollbar::createNativeScrollbar):
1365         (WebCore::Scrollbar::Scrollbar):
1366         (WebCore::Scrollbar::scrollbarOverlayStyle):
1367         (WebCore::Scrollbar::isScrollableAreaActive):
1368         (WebCore::Scrollbar::offsetDidChange):
1369         (WebCore::Scrollbar::autoscrollPressedPart):
1370         (WebCore::Scrollbar::moveThumb):
1371         (WebCore::Scrollbar::mouseMoved):
1372         (WebCore::Scrollbar::mouseEntered):
1373         (WebCore::Scrollbar::mouseExited):
1374         (WebCore::Scrollbar::mouseUp):
1375         (WebCore::Scrollbar::shouldParticipateInHitTesting):
1376         (WebCore::Scrollbar::isWindowActive):
1377         (WebCore::Scrollbar::invalidateRect):
1378         (WebCore::Scrollbar::convertToContainingView):
1379         (WebCore::Scrollbar::convertFromContainingView):
1380         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1381         * platform/Scrollbar.h:
1382         (WebCore::Scrollbar::scrollableArea):
1383         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
1384         * platform/ios/ScrollAnimatorIOS.mm:
1385         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
1386         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
1387         * platform/mac/ScrollAnimatorMac.h:
1388         * platform/mac/ScrollAnimatorMac.mm:
1389         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1390         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1391         (-[WebScrollbarPainterDelegate scrollAnimator]):
1392         (-[WebScrollbarPainterDelegate layer]):
1393         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
1394         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
1395         (WebCore::ScrollAnimator::create):
1396         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1397         (WebCore::ScrollAnimatorMac::scroll):
1398         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
1399         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
1400         (WebCore::ScrollAnimatorMac::immediateScrollTo):
1401         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1402         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1403         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
1404         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
1405         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
1406         (WebCore::ScrollAnimatorMac::pinnedInDirection):
1407         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
1408         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
1409         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
1410         (WebCore::ScrollAnimatorMac::stretchAmount):
1411         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
1412         (WebCore::ScrollAnimatorMac::canScrollVertically):
1413         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
1414         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
1415         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1416         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
1417         * rendering/RenderLayer.cpp:
1418         (WebCore::RenderLayer::RenderLayer):
1419         (WebCore::RenderLayer::createScrollbar):
1420         (WebCore::RenderLayer::destroyScrollbar):
1421         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1422         * rendering/RenderListBox.cpp:
1423         (WebCore::RenderListBox::createScrollbar):
1424         (WebCore::RenderListBox::destroyScrollbar):
1425         * rendering/RenderMenuList.cpp:
1426         (RenderMenuList::createScrollbar):
1427         * rendering/RenderMenuList.h:
1428         * rendering/RenderScrollbar.cpp:
1429         (WebCore::RenderScrollbar::createCustomScrollbar):
1430         (WebCore::RenderScrollbar::RenderScrollbar):
1431         * rendering/RenderScrollbar.h:
1432         * rendering/RenderSearchField.cpp:
1433         (WebCore::RenderSearchField::createScrollbar):
1434         * rendering/RenderSearchField.h:
1435
1436 2015-02-20  Enrica Casucci  <enrica@apple.com>
1437
1438         [WK2] Add support for font panel on OS X.
1439         https://bugs.webkit.org/show_bug.cgi?id=141777
1440
1441         Reviewed by Tim Horton.
1442
1443         This patch adds the necessary hooks to the Editor class to support
1444         the font panel.
1445
1446         * editing/Editor.h:
1447         * editing/mac/EditorMac.mm:
1448         (WebCore::Editor::applyFontStyles):
1449
1450 2015-02-20  Zalan Bujtas  <zalan@apple.com>
1451
1452         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
1453         https://bugs.webkit.org/show_bug.cgi?id=141854
1454
1455         Reviewed by Ryosuke Niwa.
1456
1457         Inserting content before/after the body as the result of editing is a valid operation.
1458         This assert was originally introduced to cover cases where edited content would get moved
1459         out of body. However, asserting such operation properly is not possible atm.
1460
1461         Test: editing/inserting/insert-as-body-sibling.html
1462
1463         * editing/CompositeEditCommand.cpp:
1464         (WebCore::CompositeEditCommand::insertNodeBefore):
1465         (WebCore::CompositeEditCommand::insertNodeAfter):
1466
1467 2015-02-20  Chris Dumez  <cdumez@apple.com>
1468
1469         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
1470         https://bugs.webkit.org/show_bug.cgi?id=141803
1471         <rdar://problem/19632080>
1472
1473         Reviewed by Antti Koivisto.
1474
1475         Add more diagnostic logging keys for the network cache.
1476
1477         * page/DiagnosticLoggingKeys.cpp:
1478         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
1479         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
1480         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
1481         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
1482         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
1483         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
1484         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
1485         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
1486         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
1487         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
1488         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
1489         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
1490         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
1491         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
1492         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
1493         * page/DiagnosticLoggingKeys.h:
1494
1495 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1496
1497         <attachment> turns the wrong blue when you highlight it
1498         https://bugs.webkit.org/show_bug.cgi?id=141853
1499
1500         Reviewed by Simon Fraser.
1501
1502         * rendering/RenderAttachment.h:
1503         * rendering/RenderReplaced.cpp:
1504         (WebCore::RenderReplaced::shouldDrawSelectionTint):
1505         (WebCore::RenderReplaced::paint):
1506         * rendering/RenderReplaced.h:
1507         Don't draw the selection tint for RenderAttachment.
1508
1509 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1510
1511         Allow <attachment> elements to be focused
1512         https://bugs.webkit.org/show_bug.cgi?id=141847
1513
1514         Reviewed by Enrica Casucci.
1515
1516         * css/html.css:
1517         (attachment:focus):
1518         Disable focus rings for <attachment>.
1519
1520         * html/HTMLAttachmentElement.cpp:
1521         (WebCore::HTMLAttachmentElement::setFocus):
1522         * html/HTMLAttachmentElement.h:
1523         Allow HTMLAttachmentElement to get editing focus.
1524         Let RenderAttachment know when focus changes.
1525
1526         * rendering/RenderAttachment.cpp:
1527         (WebCore::RenderAttachment::paintReplaced):
1528         Paint the background in cyan when we are inside the selection or have focus.
1529         Otherwise, it will be gray.
1530
1531         (WebCore::RenderAttachment::focusChanged):
1532         When focus changes, repaint.
1533
1534         * rendering/RenderAttachment.h:
1535
1536 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1537
1538         Rename ScrollElasticityController to ScrollController
1539         https://bugs.webkit.org/show_bug.cgi?id=141842
1540
1541         Reviewed by Simon Fraser.
1542
1543         No change in functionality.
1544
1545         * PlatformMac.cmake:
1546         * WebCore.order:
1547         * WebCore.xcodeproj/project.pbxproj:
1548         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1549         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1550         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1551         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
1552         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
1553         * platform/mac/ScrollAnimatorMac.h:
1554         * platform/mac/ScrollAnimatorMac.mm:
1555         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1556         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
1557         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1558         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
1559         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
1560         (WebCore::ScrollControllerClient::~ScrollControllerClient):
1561         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
1562         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
1563         (WebCore::ScrollController::ScrollController):
1564         (WebCore::ScrollController::handleWheelEvent):
1565         (WebCore::ScrollController::snapRubberBandTimerFired):
1566         (WebCore::ScrollController::isRubberBandInProgress):
1567         (WebCore::ScrollController::stopSnapRubberbandTimer):
1568         (WebCore::ScrollController::snapRubberBand):
1569         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
1570         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
1571         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
1572         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
1573         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
1574         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
1575         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
1576         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
1577         * platform/mac/ScrollElasticityController.h: Removed.
1578         * platform/mac/ScrollElasticityController.mm: Removed.
1579
1580 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
1581
1582         Remove svn:keywords property.
1583
1584         As far as I can tell, the property had no effect on any of these files, but also,
1585         when it has effect it's likely harmful.
1586
1587         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
1588         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
1589         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
1590         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
1591         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
1592         * css/CSSKeyframeRule.h: Removed property svn:keywords.
1593         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
1594         * css/CSSKeyframesRule.h: Removed property svn:keywords.
1595         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
1596         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
1597         * css/plugIns.css: Removed property svn:keywords.
1598         * dom/AnimationEvent.cpp: Removed property svn:keywords.
1599         * dom/AnimationEvent.h: Removed property svn:keywords.
1600         * dom/DeviceMotionClient.h: Removed property svn:keywords.
1601         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
1602         * dom/DeviceMotionController.h: Removed property svn:keywords.
1603         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
1604         * dom/DeviceMotionData.h: Removed property svn:keywords.
1605         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
1606         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
1607         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
1608         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
1609         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
1610         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
1611         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
1612         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
1613         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
1614         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
1615         * page/Frame.h: Removed property svn:keywords.
1616         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
1617         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
1618         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
1619         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
1620         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
1621         * platform/ControlStates.h: Removed property svn:keywords.
1622         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
1623         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
1624         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
1625         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
1626         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
1627         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
1628         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
1629         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
1630         * platform/ios/SystemMemory.h: Removed property svn:keywords.
1631         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
1632         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
1633         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
1634         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
1635         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
1636         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
1637         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
1638         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
1639         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
1640         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
1641         * rendering/TextAutoSizing.h: Removed property svn:keywords.
1642         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
1643
1644 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1645
1646         [Mac] REGRESSION: Scroll snap points broken after r180018
1647         https://bugs.webkit.org/show_bug.cgi?id=141821
1648         <rdar://problem/19898333>
1649
1650         Reviewed by Simon Fraser.
1651
1652         * page/EventHandler.cpp:
1653         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
1654         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
1655         to catch the 'ended wheel' gesture.
1656         * page/EventHandler.h:
1657         * page/mac/EventHandlerMac.mm:
1658         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
1659         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
1660         (i.e., trigger an animation)
1661         * platform/ScrollAnimator.cpp:
1662         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
1663         * platform/ScrollAnimator.h:
1664
1665 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
1666
1667         [iOS] cleanup AirPlay code
1668         https://bugs.webkit.org/show_bug.cgi?id=141811
1669
1670         Reviewed by Jer Noble.
1671
1672         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1673
1674         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
1675         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
1676         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
1677
1678         * Modules/mediacontrols/MediaControlsHost.cpp:
1679         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
1680         (WebCore::MediaControlsHost::externalDeviceType):
1681
1682         * dom/EventNames.h: Ditto.
1683         * dom/EventNames.in:
1684
1685         * html/HTMLMediaElement.cpp:
1686         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
1687         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
1688         (WebCore::HTMLMediaElement::parseAttribute):
1689         * html/HTMLMediaElement.h:
1690         * html/HTMLMediaElement.idl:
1691
1692         * html/HTMLMediaSession.cpp:
1693         (WebCore::restrictionName): Ditto.
1694         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
1695         * html/HTMLMediaSession.h:
1696
1697         * html/HTMLVideoElement.cpp:
1698         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
1699         * html/HTMLVideoElement.h:
1700         * html/HTMLVideoElement.idl:
1701
1702         * page/Settings.in: Ditto.
1703
1704         * platform/audio/MediaSessionManager.h:
1705         * platform/audio/ios/MediaSessionManagerIOS.h:
1706         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
1707
1708         * platform/graphics/MediaPlayer.cpp:
1709         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
1710         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
1711         * platform/graphics/MediaPlayer.h:
1712         * platform/graphics/MediaPlayerPrivate.h:
1713         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
1714         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
1715         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1716         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
1717         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1718
1719         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1720         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1721         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1722         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1723         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
1724         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
1725         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
1726         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
1727
1728 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
1729
1730         Language ranges containing asterisks must be quoted as strings
1731         https://bugs.webkit.org/show_bug.cgi?id=141659
1732
1733         Reviewed by Benjamin Poulain.
1734
1735         As specified in [1], the language ranges containing asterisks must be quoted as strings.
1736
1737         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
1738
1739         * css/CSSGrammar.y.in:
1740         * css/CSSParser.cpp:
1741         (WebCore::CSSParser::realLex):
1742
1743 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1744
1745         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
1746         https://bugs.webkit.org/show_bug.cgi?id=137765
1747
1748         Reviewed by Ryosuke Niwa.
1749
1750         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
1751         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
1752         used in registerMediaEngine().
1753
1754         No new tests, no behavior changes.
1755
1756         * WebCore.exp.in:
1757         * html/HTMLMediaElement.cpp:
1758         (WebCore::HTMLMediaElement::parseAttribute):
1759         * html/HTMLMediaElement.h:
1760         * platform/graphics/MediaPlayer.cpp:
1761         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
1762         (WebCore::MediaPlayer::MediaPlayer):
1763         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1764         (WebCore::createNullMediaPlayer): Deleted.
1765         * platform/graphics/MediaPlayer.h:
1766         (WebCore::MediaPlayer::create): Deleted.
1767         * platform/graphics/MediaPlayerPrivate.h:
1768         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1769         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1770         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
1771         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
1772         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1773         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1774         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1775         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
1776         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
1777         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1778         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1779         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
1780         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
1781         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1782         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
1783         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
1784         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1785         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1786         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1787         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
1788         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
1789         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1790         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
1791         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
1792         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1793         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1794         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
1795         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
1796         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1797
1798 2015-02-19  David Kilzer  <ddkilzer@apple.com>
1799
1800         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
1801
1802         Rubber-stamped by Brent Fulgham.
1803
1804         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
1805         Brent agreed when I talked to him in person.
1806
1807         * platform/cf/CoreMediaSoftLink.cpp:
1808         * platform/cf/CoreMediaSoftLink.h:
1809         * platform/mac/SoftLinking.h:
1810         * platform/win/SoftLinking.h:
1811         - Do the rename.
1812
1813 2015-02-19  David Kilzer  <ddkilzer@apple.com>
1814
1815         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
1816         <http://webkit.org/b/141791>
1817
1818         Reviewed by Alexey Proskuryakov.
1819
1820         * Configurations/WebCore.unexp:
1821         - Remove five more symbols.
1822
1823         * Modules/plugins/QuickTimePluginReplacement.mm:
1824         - Remove all local soft-links and include CoreMediaSoftLink.h.
1825           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
1826           used here since we didn't use the optional function soft-link
1827           method.
1828
1829         * WebCore.vcxproj/WebCore.vcxproj.filters:
1830         * WebCore.vcxproj/WebCoreCFNetwork.props:
1831         * WebCore.xcodeproj/project.pbxproj:
1832         - Add CoreMediaSPI.h to the project.
1833
1834         * platform/cf/CoreMediaSoftLink.cpp:
1835         * platform/cf/CoreMediaSoftLink.h:
1836         - Add three cross-platform symbols, five Cocoa-only symbols, and
1837           two Windows-only symbols (based on current usage, not
1838           availability on each platform).
1839         - Include CoreMediaSPI.h header.
1840         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
1841
1842         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1843         - Remove all CoreMedia soft-linked functions.  Constants remain.
1844
1845         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1846         - Remove one CoreMedia soft-linked method.
1847
1848         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
1849         - Remove all CoreMedia soft-linked funtions.  With this change,
1850           we are already realizing space savings for duplicate
1851           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
1852           generated for many unused functions included by
1853           CoreMediaSoftLinking.h.)
1854
1855         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
1856         - Remove all CoreMedia soft-linked funtions.  Constants remain.
1857
1858         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1859         - Remove duplicate header included by CoreMediaSoftLink.h.
1860
1861         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1862         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1863         - Remove all CoreMedia soft-linked funtions.  Constants remain.
1864
1865         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1866         - Remove three CoreMedia soft-linked methods.
1867
1868         * platform/mac/PlatformClockCM.mm:
1869         - Remove two CoreMedia soft-linked methods.
1870
1871         * platform/mac/SerializedPlatformRepresentationMac.mm:
1872         - Remove only CoreMedia soft-linked funtion.  It wasn't even
1873           used.
1874
1875         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1876         - Remove two CoreMedia soft-linked method.
1877
1878         * platform/spi/cf/CoreMediaSPI.h:
1879         - Add for SPI from CMNotificationCenter.h.
1880
1881 2015-02-19  David Hyatt  <hyatt@apple.com>
1882
1883         Columns are splitting unsplittable content.
1884         https://bugs.webkit.org/show_bug.cgi?id=141807
1885         <rdar://problem/18387659>
1886
1887         Reviewed by Dean Jackson.
1888
1889         Added inline-table-dynamic-movement.html
1890
1891         * rendering/RenderBlockFlow.cpp:
1892         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
1893         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
1894         Patch these functions to always check the layout state for a zero
1895         pageLogicalHeight, since that is actually our indicator that we're
1896         doing column balancing and don't have a height set yet.
1897
1898         * rendering/RenderMultiColumnFlowThread.cpp:
1899         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
1900         * rendering/RenderMultiColumnSet.cpp:
1901         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1902         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
1903         (WebCore::RenderMultiColumnSet::prepareForLayout):
1904         * rendering/RenderMultiColumnSet.h:
1905         The function for deciding whether the logical height of the columns was
1906         known was checking for a zero computedColumnHeight. However, a column set
1907         can legitimately compute a zero column height, and with the fix to examine
1908         the layout state, this bug was exposed.
1909
1910         The fix is to add a new variable that caches whether or not the column height
1911         has been computed, so that even if it computes to zero, we aren't fooled.
1912
1913 2015-02-19  Chris Dumez  <cdumez@apple.com>
1914
1915         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
1916         https://bugs.webkit.org/show_bug.cgi?id=141744
1917
1918         Reviewed by Alexey Proskuryakov.
1919
1920         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
1921         implementation, similarly to what was already done for Mac in:
1922         <http://trac.webkit.org/changeset/174717>
1923
1924         The following changes were made:
1925         - Add missing "initLevel == AllFields" check before initializing
1926           uncommon fields. This bug was causing us to initialize uncommon
1927           fields even if called with 'CommonFieldsOnly' initLevel.
1928         - Bypass the first pass populating common HTTP headers in
1929           m_httpHeaderFields if the initLevel is AllFields. If called
1930           with AllFields initLevel, we will end up populating all HTTP
1931           headers later on so this first pass is redundant.
1932         - Use C++11 range loop to iterator over commonHeaderFields array
1933           for readability.
1934         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
1935           for the CFDictionaryRef containing the headers instead of creating
1936           copies of keys and values using CFDictionaryGetKeysAndValues() and
1937           then iterating over those. This avoids allocating Vectors for keys /
1938           values and avoids unnecessary copying.
1939
1940
1941 2015-02-18  Dean Jackson  <dino@apple.com>
1942
1943         Sufficiently small media controls should remove toolbar elements
1944         https://bugs.webkit.org/show_bug.cgi?id=141780
1945         <rdar://problem/16548548>
1946         <rdar://problem/17598778>
1947         <rdar://problem/18351963>
1948
1949         Reviewed by Eric Carlson.
1950
1951         Implement some logic where elements on the media controls are
1952         hidden when there isn't enough room. We start by dropping
1953         the scrubber, then the various buttons on the right hand
1954         side.
1955
1956         This solution isn't perfect. If we had perfection, it would
1957         be because we get resize events and respond accordingly. Instead
1958         we check the size when the user has pinch-zoomed, or when
1959         we start/stop playing.
1960
1961         This is going to cause some extra layout, because we need
1962         to know the size of things before we can work out which
1963         bits to hide.
1964
1965         * Modules/mediacontrols/mediaControlsiOS.css:
1966         (::-webkit-media-controls): Remove the minimum width. This can
1967         cause the controls to get clipped.
1968         (audio::-webkit-media-controls-spacer): Add this empty element to
1969         replace the scrubber when it is hidden.
1970         (audio::-webkit-media-controls-timeline-container):
1971         * Modules/mediacontrols/mediaControlsiOS.js:
1972         (ControllerIOS): Remember our size so we don't churn.
1973         (ControllerIOS.prototype.createControls): Create a new spacer element.
1974         (ControllerIOS.prototype.configureInlineControls):
1975         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
1976         (ControllerIOS.prototype.updateControls):
1977         (ControllerIOS.prototype.setPlaying): Ditto.
1978         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
1979         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
1980         asap. In this case it's probably ok to be in a bad state for a frame, or
1981         we are inside setup and we know that we'll layout soon.
1982         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
1983         that hides elements.
1984
1985 2015-02-19  Tim Horton  <timothy_horton@apple.com>
1986
1987         Move the software-only ImageBuffer::m_context to ImageBufferData
1988         https://bugs.webkit.org/show_bug.cgi?id=141784
1989
1990         Reviewed by Simon Fraser.
1991
1992         * platform/graphics/ImageBuffer.h:
1993         * platform/graphics/cairo/ImageBufferCairo.cpp:
1994         (WebCore::ImageBuffer::ImageBuffer):
1995         (WebCore::ImageBuffer::context):
1996         * platform/graphics/cairo/ImageBufferDataCairo.h:
1997         * platform/graphics/cg/ImageBufferCG.cpp:
1998         (WebCore::ImageBuffer::ImageBuffer):
1999         (WebCore::ImageBuffer::context):
2000         * platform/graphics/cg/ImageBufferDataCG.h:
2001         Move m_context to ImageBufferData in the software-only section;
2002         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
2003         This will make it harder for ImageBuffer to make the mistake of using
2004         m_context blindly without thinking when it will often be null.
2005
2006 2015-02-18  Andreas Kling  <akling@apple.com>
2007
2008         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
2009         <https://webkit.org/b/141788>
2010
2011         Reviewed by Anders Carlsson.
2012
2013         Once again we've fallen into the TemporaryChange trap:
2014
2015             TemporaryChange<unsigned>(m_member, temporaryValue);
2016
2017         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
2018         it immediately goes out of scope and restores the original value of m_member.
2019
2020         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
2021         to catch bugs like this. Whatever we do will be done separately from this bug.
2022
2023         Test: fast/history/page-cache-clearing.html
2024
2025         * history/PageCache.cpp:
2026         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
2027
2028         * testing/Internals.cpp:
2029         (WebCore::Internals::clearPageCache):
2030         (WebCore::Internals::pageCacheSize):
2031         * testing/Internals.h:
2032         * testing/Internals.idl: Add a way to clear the page cache and query its size from
2033         window.internals to facilitate writing a simple test for this bug.
2034
2035 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2036
2037         Roll out r180280.
2038
2039         Crashes under IDBDatabase::closeConnection.
2040         https://bugs.webkit.org/show_bug.cgi?id=141745
2041         rdar://problem/19816412
2042
2043         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
2044
2045 2015-02-18  Tim Horton  <timothy_horton@apple.com>
2046
2047         Fix the iOS Simulator build after r180308.
2048
2049         * platform/graphics/cg/ImageBufferDataCG.h:
2050
2051 2015-02-18  Zalan Bujtas  <zalan@apple.com>
2052
2053         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
2054         https://bugs.webkit.org/show_bug.cgi?id=138224
2055
2056         Reviewed by Dave Hyatt.
2057
2058         It's wrong to call flowThreadRelativeWillBeRemoved(child).
2059         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
2060         Should this introduce any regressions, we need to deal with those separately.
2061
2062         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
2063
2064         * rendering/RenderMultiColumnFlowThread.cpp:
2065         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
2066         * rendering/RenderMultiColumnFlowThread.h:
2067
2068 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
2069
2070         [Win] CFData leak in CDMSessionAVFoundationCF
2071         https://bugs.webkit.org/show_bug.cgi?id=141765
2072         <rdar://problem/141765>
2073
2074         Reviewed by Joseph Pecoraro.
2075
2076         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2077         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
2078         so we don't double-increment the retain count.
2079
2080 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2081
2082         Adopt WebCore::IOSurface in ImageBuffer
2083         https://bugs.webkit.org/show_bug.cgi?id=141751
2084
2085         Reviewed by Simon Fraser.
2086
2087         * platform/graphics/cg/ImageBufferCG.cpp:
2088         (WebCore::createIOSurface): Deleted.
2089         (WebCore::ImageBuffer::ImageBuffer):
2090         Make use of cachedCGColorSpace.
2091         Make use of WebCore::IOSurface.
2092         Remove the unused size argument from ImageBufferDataCG.
2093         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
2094         do this for us, unlike wkIOSurfaceContextCreate.
2095         Apply the flipping and scale factor to whichever context we made.
2096         We don't need to setIsAcceleratedContext anymore because it's always
2097         false for software contexts, and WebCore::IOSurface will set it for
2098         any accelerated contexts.
2099
2100         (WebCore::ImageBuffer::context):
2101         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
2102
2103         (WebCore::ImageBuffer::flushContext):
2104         Make use of context(); m_context is now null for accelerated ImageBuffers.
2105
2106         (WebCore::ImageBuffer::copyNativeImage):
2107         Adopt in-line with the Create functions for clarity. Make use of
2108         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
2109
2110         (WebCore::ImageBuffer::draw):
2111         (WebCore::ImageBuffer::drawPattern):
2112         (WebCore::ImageBuffer::getUnmultipliedImageData):
2113         (WebCore::ImageBuffer::getPremultipliedImageData):
2114         (WebCore::ImageBuffer::putByteArray):
2115         (WebCore::ImageBuffer::toDataURL):
2116         Make use of context(); m_context is now null for accelerated ImageBuffers.
2117
2118         * platform/graphics/cg/ImageBufferDataCG.cpp:
2119         (WebCore::ImageBufferData::ImageBufferData):
2120         Indentation fix, and use nullptr.
2121
2122         (WebCore::convertScanline):
2123         Grammar fix (is -> are).
2124
2125         (WebCore::ImageBufferData::getData):
2126         (WebCore::ImageBufferData::putData):
2127         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
2128         should be made more convenient by the wrapper.
2129
2130         * platform/graphics/cg/ImageBufferDataCG.h:
2131         Drop the unused size argument from the constructor.
2132         Reorganize and label the various members which are only used
2133         for a particular type of ImageBufferDataCG.
2134
2135         * platform/graphics/cocoa/IOSurface.mm:
2136         (IOSurface::ensureGraphicsContext):
2137         IOSurface-backed GraphicsContexts are always considered accelerated.
2138
2139         (IOSurface::create):
2140         (IOSurface::IOSurface):
2141         Add a constructor that take an extra size to use when making the CGContext;
2142         it can only be less than the actual backing IOSurface size.
2143         This is needed for r160121.
2144
2145         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2146         * platform/mac/WebCoreSystemInterface.h:
2147         * platform/mac/WebCoreSystemInterface.mm:
2148         Remove old WKSI IOSurface-related functions.
2149
2150 2015-02-18  Alex Christensen  <achristensen@webkit.org>
2151
2152         Prepare to use WEBCORE_EXPORT on Windows.
2153         https://bugs.webkit.org/show_bug.cgi?id=141735
2154
2155         Reviewed by Brent Fulgham.
2156
2157         * bindings/js/GCController.h:
2158         * bindings/js/JSDOMGlobalObject.h:
2159         * bindings/scripts/CodeGeneratorJS.pm:
2160         (GenerateHeader):
2161         (GenerateImplementation):
2162         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2163         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2164         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2165         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2166         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2167         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2168         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2169         * bindings/scripts/test/JS/JSTestEventTarget.h:
2170         * bindings/scripts/test/JS/JSTestException.cpp:
2171         * bindings/scripts/test/JS/JSTestException.h:
2172         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2173         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2174         * bindings/scripts/test/JS/JSTestInterface.cpp:
2175         * bindings/scripts/test/JS/JSTestInterface.h:
2176         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2177         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2178         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2179         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2180         * bindings/scripts/test/JS/JSTestNode.cpp:
2181         * bindings/scripts/test/JS/JSTestNode.h:
2182         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2183         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2184         * bindings/scripts/test/JS/JSTestObj.cpp:
2185         * bindings/scripts/test/JS/JSTestObj.h:
2186         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2187         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2188         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2189         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2190         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2191         * bindings/scripts/test/JS/JSTestTypedefs.h:
2192         * bindings/scripts/test/JS/JSattribute.cpp:
2193         * bindings/scripts/test/JS/JSattribute.h:
2194         * bindings/scripts/test/JS/JSreadonly.cpp:
2195         * bindings/scripts/test/JS/JSreadonly.h:
2196         * bridge/runtime_method.h:
2197         * bridge/runtime_object.h:
2198         * dom/make_names.pl:
2199         (printNamesHeaderFile):
2200         * history/HistoryItem.h:
2201         * loader/FrameLoader.h:
2202         * loader/LoaderStrategy.h:
2203         * loader/ResourceLoadScheduler.h:
2204         * loader/icon/IconDatabase.h:
2205         * loader/icon/IconDatabaseBase.h:
2206         * page/DatabaseProvider.h:
2207         * page/Page.h:
2208         * page/PageConsoleClient.h:
2209         * page/PageOverlay.h:
2210         * platform/FileSystem.h:
2211         * platform/MemoryPressureHandler.h:
2212         * platform/ThreadGlobalData.h:
2213         * platform/URL.h:
2214         * platform/graphics/ca/PlatformCALayer.h:
2215         * platform/network/BlobDataFileReference.h:
2216         * platform/network/BlobRegistry.h:
2217         * platform/network/BlobRegistryImpl.h:
2218         * platform/sql/SQLiteDatabase.h:
2219         * rendering/ScrollBehavior.h:
2220         * rendering/break_lines.h:
2221         Add and move some WEBCORE_EXPORT macros.
2222
2223 2015-02-18  Anders Carlsson  <andersca@apple.com>
2224
2225         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
2226         https://bugs.webkit.org/show_bug.cgi?id=141767
2227
2228         Reviewed by Tim Horton.
2229
2230         Also, move it to platform/cocoa instead of platform/mac.
2231
2232         * WebCore.xcodeproj/project.pbxproj:
2233         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
2234
2235 2015-02-18  Antti Koivisto  <antti@apple.com>
2236
2237         Rename FontGlyphs to FontCascadeFonts
2238         https://bugs.webkit.org/show_bug.cgi?id=141754
2239
2240         Reviewed by Andreas Kling.
2241
2242         "It is better than Impl."
2243
2244         The purpose of the class to own to create and own the realized Font instances and the associated caches
2245         for FontCascade instances.
2246
2247 2015-02-18  Commit Queue  <commit-queue@webkit.org>
2248
2249         Unreviewed, rolling out r180286.
2250         https://bugs.webkit.org/show_bug.cgi?id=141766
2251
2252         Caused >50 crashed LayoutTests (Requested by jernoble on
2253         #webkit).
2254
2255         Reverted changeset:
2256
2257         "Page::userContentController() should return a reference, not
2258         a pointer"
2259         https://bugs.webkit.org/show_bug.cgi?id=141764
2260         http://trac.webkit.org/changeset/180286
2261
2262 2015-02-18  David Kilzer  <ddkilzer@apple.com>
2263
2264         Consolidate soft-linked CMTimeMakeWithSeconds() function
2265         <http://webkit.org/b/141655>
2266
2267         Reviewed by Brent Fulgham.
2268
2269         * Configurations/WebCore.unexp: Remove workaround for
2270         CMTimeMakeWithSeconds() weak external.
2271
2272         * WebCore.vcxproj/WebCore.vcxproj:
2273         * WebCore.vcxproj/WebCore.vcxproj.filters:
2274         * WebCore.xcodeproj/project.pbxproj:
2275         - Add CoreMediaSoftLink.{cpp,h} to the project.
2276
2277         * platform/cf/CoreMediaSoftLink.cpp: Add.
2278         * platform/cf/CoreMediaSoftLink.h: Add.
2279         - Implement new strategy where code for soft-linking is only
2280           in one place, and the header can simply be included wherever a
2281           soft-linked method is needed.
2282
2283         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
2284         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
2285         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2286         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2287         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2288         * platform/mac/PlatformClockCM.mm:
2289         - Remove old soft-linking strategy and include
2290           CoreMediaSoftLink.h.
2291
2292         * platform/mac/SoftLinking.h:
2293         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
2294         header declaration.  Split out from SOFT_LINK() macro.  Also
2295         stop violating C++ standards by redeclaring an inline function
2296         with the exact same signature as an extern "C" function.  This
2297         now matches what we do on Windows (where Visual C++ already
2298         prevented these shenanigans).
2299         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
2300         source implementation.  Split out the from SOFT_LINK() macro.
2301
2302         * platform/win/SoftLinking.h:
2303         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
2304         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
2305         (SOFT_LINK_FUNCTION_DECL): Add.
2306         (SOFT_LINK_FUNCTION_IMPL): Add.
2307         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
2308           macro for header declaration and source implementation.
2309         - We assume the __cdecl calling convention because that's what
2310           all Apple libraries use, and so we are able to use the exact
2311           same macro function on both Mac and Windows to simplify
2312           CoreMediaSoftLink.{cpp,h}.
2313
2314 2015-02-18  Brady Eidson  <beidson@apple.com>
2315
2316         Page::userContentController() should return a reference, not a pointer
2317         https://bugs.webkit.org/show_bug.cgi?id=141764
2318
2319         Reviewed by Jer Noble.
2320
2321         No new tests (No behavior change)
2322
2323         * dom/DocumentStyleSheetCollection.cpp:
2324         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
2325         * loader/cache/CachedResourceLoader.cpp:
2326         (WebCore::CachedResourceLoader::requestResource):
2327         * page/CaptionUserPreferences.cpp:
2328         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
2329         * page/DOMWindow.cpp:
2330         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
2331         * page/Frame.cpp:
2332         (WebCore::Frame::injectUserScripts):
2333         * page/Page.cpp:
2334         (WebCore::Page::Page):
2335         (WebCore::Page::~Page):
2336         (WebCore::Page::setUserContentController):
2337         * page/Page.h:
2338         (WebCore::Page::userContentController):
2339         * page/UserMessageHandlersNamespace.cpp:
2340         (WebCore::UserMessageHandlersNamespace::handler):
2341
2342 2015-02-18  Roger Fong  <roger_fong@apple.com>
2343
2344         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
2345         https://bugs.webkit.org/show_bug.cgi?id=141446
2346         <rdar://problem/19633715>
2347
2348         Reviewed by Brent Fulham.
2349
2350         Tests covered by WebGL2 conformance tests.
2351
2352         This patch promotes the following WebGL1 extensions to core in WebGL2:
2353         OES_element_index_uint 
2354         EXT_sRGB 
2355         EXT_blend_minmax 
2356         EXT_frag_depth 
2357         EXT_shader_texture_lod
2358         OES_standard_derivatives 
2359         
2360         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
2361         for free when GLSL3 becomes available.
2362
2363         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
2364         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
2365         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
2366         * html/canvas/WebGL2RenderingContext.idl: Ditto.
2367
2368         * html/canvas/WebGL2RenderingContext.cpp:
2369         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
2370         It was not promoted to core as I originally thought it had been.
2371         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
2372         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
2373         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
2374         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
2375         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
2376         (WebCore::WebGL2RenderingContext::hint): Ditto.
2377         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
2378         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
2379         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
2380         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
2381         * html/canvas/WebGL2RenderingContext.h:
2382
2383         * html/canvas/WebGLRenderingContext.cpp:
2384         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
2385         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
2386         (WebCore::WebGLRenderingContext::hint): Ditto.
2387         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
2388         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
2389         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
2390         * html/canvas/WebGLRenderingContext.h:
2391
2392         * html/canvas/WebGLRenderingContextBase.cpp:
2393         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
2394         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
2395         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
2396         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
2397         (WebCore::WebGLRenderingContextBase::hint): Deleted.
2398         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
2399         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
2400         * html/canvas/WebGLRenderingContextBase.h:
2401
2402 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2403
2404         Streamline unexported function build fixes
2405         https://bugs.webkit.org/show_bug.cgi?id=141761
2406
2407         Reviewed by Alex Christensen.
2408
2409         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
2410         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
2411
2412         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
2413         it's not only Xcode 5 that is affected.
2414
2415         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
2416         Node, NodeList needs an exactly the same one. Also updated the comments.
2417
2418 2015-02-18  Chris Dumez  <cdumez@apple.com>
2419
2420         Access FontCache global instance via singleton() static member function
2421         https://bugs.webkit.org/show_bug.cgi?id=141726
2422
2423         Reviewed by Daniel Bates.
2424
2425         Access FontCache global instance via singleton() static member function,
2426         as per coding style.
2427
2428 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2429
2430         Crashes under IDBDatabase::closeConnection.
2431         https://bugs.webkit.org/show_bug.cgi?id=141745
2432         rdar://problem/19816412
2433
2434         Reviewed by David Kilzer.
2435
2436         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
2437         Add a missing protector.
2438
2439 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
2440
2441         Justified ruby can cause lines to grow beyond their container
2442         https://bugs.webkit.org/show_bug.cgi?id=141732
2443
2444         Reviewed by David Hyatt.
2445
2446         After we re-layout RenderRubyRuns, this can change the environment upon which
2447         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
2448         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
2449         effective width of the RenderRubyRun to change, which causes out subsequent
2450         justification calculations to be off.
2451
2452         Therefore, we have a cycle; the amount of ruby overhang can change the justification
2453         in a line, and the layout of the line affects the ruby overhang calculation. Instead
2454         of performing a layout in a loop until it converges, this patch simply observes that
2455         having a flush right edge is more valuable than having a perfectly correct overhang.
2456         It therefore simply removes the secondary overhang calculation.
2457
2458         Test: fast/text/ruby-justification-flush.html
2459
2460         * rendering/RenderBlockFlow.h:
2461         * rendering/RenderBlockLineLayout.cpp:
2462         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
2463         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
2464         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2465
2466 2015-02-18  Chris Dumez  <cdumez@apple.com>
2467
2468         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
2469         https://bugs.webkit.org/show_bug.cgi?id=141723
2470
2471         Reviewed by Andreas Kling.
2472
2473         Evict dead resources from the MemoryCache on non-critical memory
2474         pressure. On critical memory pressure, we already evict ALL resources
2475         from the MemoryCache. It is a good idea to start by evicting resources
2476         we care less about on non-critical warning to decrease the chances of
2477         getting a critical warning and thus having to clear the whole
2478         MemoryCache.
2479
2480         * loader/cache/MemoryCache.h:
2481         * platform/MemoryPressureHandler.cpp:
2482         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
2483         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2484         (WebCore::MemoryPressureHandler::releaseMemory):
2485         Call releaseCriticalMemory() before releaseNoncriticalMemory()
2486         as releaseCriticalMemory() is more aggressive. Doing it the
2487         other way around would mean that on critical warning, we would
2488         first evict dead resources, then evict all resources. It is
2489         more efficient to evict all resources first, as it makes the
2490         non-critical operation (evict dead resources) a no-op.
2491
2492 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
2493
2494         [iOS] pause video when a tab moves to the background on some devices
2495         https://bugs.webkit.org/show_bug.cgi?id=141753
2496         <rdar://problem/19814562>
2497
2498         Reviewed by Jer Noble.
2499
2500         Test: media/video-background-tab-playback.html
2501
2502         * platform/audio/MediaSession.cpp:
2503         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
2504             hidden if the BackgroundTabPlaybackRestricted is set.
2505
2506         * platform/audio/MediaSessionManager.cpp:
2507         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
2508              to BackgroundProcessPlaybackRestricted.
2509         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
2510         * platform/audio/MediaSessionManager.h:
2511
2512         * platform/audio/ios/MediaSessionManagerIOS.mm:
2513         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
2514             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2515
2516         * testing/Internals.cpp:
2517         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
2518             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2519
2520 2015-02-16  David Hyatt  <hyatt@apple.com>
2521
2522         Wrong element's style is used for text-decoration-style.
2523         https://bugs.webkit.org/show_bug.cgi?id=141673
2524         <rdar://problem/19876774>
2525
2526         Reviewed by Dean Jackson.
2527
2528         Added fast/text/text-underline-style.html
2529
2530         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2531         (AXAttributeStringSetStyle):
2532         Add arguments for fetching styles.
2533
2534         * rendering/InlineTextBox.cpp:
2535         (WebCore::InlineTextBox::paint):
2536         (WebCore::InlineTextBox::paintDecoration):
2537         * rendering/InlineTextBox.h:
2538         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
2539         way it fetches the colors.
2540
2541         * rendering/RenderObject.cpp:
2542         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
2543         (WebCore::RenderObject::getTextDecorationColors): Deleted.
2544         * rendering/RenderObject.h:
2545         Add style fetching to the same function that fetches colors and rename it.
2546
2547 2015-02-18  David Kilzer  <ddkilzer@apple.com>
2548
2549         REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
2550
2551         Attempt to fix this linker error by making a non-coding change:
2552
2553             Undefined symbols for architecture i386:
2554               "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
2555                   __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
2556             ld: symbol(s) not found for architecture i386
2557
2558         This should have been fixed by r180266, but perhaps Xcode didn't
2559         recognize that it needed to rebuild this source file.
2560
2561         * page/UserContentController.cpp: Update copyright.
2562
2563 2015-02-18  Andreas Kling  <akling@apple.com>
2564
2565         Purge PassRefPtr from CanvasRenderingContext2D.
2566         <https://webkit.org/b/141749>
2567
2568         Reviewed by Gyuyoung Kim.
2569
2570         Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
2571
2572         * html/TextMetrics.h:
2573         (WebCore::TextMetrics::create): Changed create() helper to return Ref.
2574
2575         * html/canvas/CanvasRenderingContext2D.h:
2576         * html/canvas/CanvasRenderingContext2D.cpp:
2577         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
2578
2579         (WebCore::CanvasRenderingContext2D::createLinearGradient):
2580         (WebCore::CanvasRenderingContext2D::createRadialGradient):
2581         (WebCore::CanvasRenderingContext2D::createPattern):
2582         (WebCore::createEmptyImageData):
2583         (WebCore::CanvasRenderingContext2D::createImageData):
2584         (WebCore::CanvasRenderingContext2D::getImageData):
2585         (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
2586         a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
2587         and changed a PassRefPtr argument to RefPtr&&.
2588
2589         (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
2590
2591 2015-02-18  Commit Queue  <commit-queue@webkit.org>
2592
2593         Unreviewed, rolling out r180260.
2594         https://bugs.webkit.org/show_bug.cgi?id=141757
2595
2596         Broke the 32-bit builders (Requested by jessieberlin on
2597         #webkit).
2598
2599         Reverted changeset:
2600
2601         "Add a trivial code generator for the DFA"
2602         https://bugs.webkit.org/show_bug.cgi?id=141017
2603         http://trac.webkit.org/changeset/180260
2604
2605 2015-02-17  Anders Carlsson  <andersca@apple.com>
2606
2607         Add API for clearing in-memory caches to WKWebsiteDataStore
2608         https://bugs.webkit.org/show_bug.cgi?id=141724
2609
2610         Reviewed by Tim Horton.
2611
2612         Add a version of evictResources that takes a session id.
2613
2614         * loader/cache/MemoryCache.cpp:
2615         (WebCore::MemoryCache::evictResources):
2616
2617 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2618
2619         Remove more references to WebCore.exp.in
2620         https://bugs.webkit.org/show_bug.cgi?id=141747
2621
2622         Reviewed by Alexey Proskuryakov.
2623
2624         * WebCore.xcodeproj/project.pbxproj:
2625
2626 2015-02-17  Benjamin Poulain  <benjamin@webkit.org>
2627
2628         Add a trivial code generator for the DFA
2629         https://bugs.webkit.org/show_bug.cgi?id=141017
2630
2631         Reviewed by Andreas Kling.
2632
2633         Nothing fancy yet, this is just doing a literal translation from the DFA
2634         to machine code. It is extremely inefficient at the moment.
2635
2636         * WebCore.xcodeproj/project.pbxproj:
2637         * contentextensions/ContentExtensionsBackend.cpp:
2638         (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
2639         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2640         (WebCore::ContentExtensions::addActionToHashSet):
2641         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2642         * contentextensions/ContentExtensionsBackend.h:
2643         * contentextensions/DFA.cpp:
2644         (WebCore::ContentExtensions::DFA::nextState): Deleted.
2645         (WebCore::ContentExtensions::DFA::actions): Deleted.
2646         * contentextensions/DFA.h:
2647         (WebCore::ContentExtensions::DFA::size):
2648         (WebCore::ContentExtensions::DFA::nodeAt):
2649         * contentextensions/DFACompiler.cpp: Added.
2650         (WebCore::ContentExtensions::compileDFA):
2651         (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
2652         (WebCore::ContentExtensions::DFACodeGenerator::compile):
2653         (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
2654         (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
2655         (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
2656         (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
2657         * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
2658
2659 2015-02-17  Chris Dumez  <cdumez@apple.com>
2660
2661         Rename ScopedEventQueue::instance() to singleton()
2662         https://bugs.webkit.org/show_bug.cgi?id=141738
2663
2664         Reviewed by Daniel Bates.
2665
2666         Rename ScopedEventQueue::instance() to singleton(), as per coding
2667         style. Also modernize the code a little bit.
2668
2669         * dom/EventDispatcher.cpp:
2670         (WebCore::EventDispatcher::dispatchScopedEvent):
2671         * dom/ScopedEventQueue.cpp:
2672         (WebCore::ScopedEventQueue::singleton):
2673         (WebCore::ScopedEventQueue::dispatchAllEvents):
2674         (WebCore::ScopedEventQueue::incrementScopingLevel):
2675         (WebCore::ScopedEventQueue::decrementScopingLevel):
2676         (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
2677         (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
2678         (WebCore::ScopedEventQueue::instance): Deleted.
2679         * dom/ScopedEventQueue.h:
2680         (WebCore::EventQueueScope::EventQueueScope):
2681         (WebCore::EventQueueScope::~EventQueueScope):
2682
2683 2015-02-17  Chris Dumez  <cdumez@apple.com>
2684
2685         Remove dead code from FontCache
2686         https://bugs.webkit.org/show_bug.cgi?id=141741
2687
2688         Reviewed by Daniel Bates.
2689
2690         Remove dead code from FontCache:
2691         - getFontFamilyForCharacters() has no implementation.
2692         - SimpleFontFamily is unused.
2693
2694         * platform/graphics/FontCache.h:
2695
2696 2015-02-17  Chris Dumez  <cdumez@apple.com>
2697
2698         Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
2699         https://bugs.webkit.org/show_bug.cgi?id=141739
2700
2701         Reviewed by Simon Fraser.
2702
2703         Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
2704         per coding style.
2705
2706         * page/animation/CSSPropertyAnimation.cpp:
2707         (WebCore::CSSPropertyAnimationWrapperMap::singleton):
2708         (WebCore::CSSPropertyAnimation::blendProperties):
2709         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
2710         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
2711         (WebCore::CSSPropertyAnimation::propertiesEqual):
2712         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
2713         (WebCore::CSSPropertyAnimation::getNumProperties):
2714         (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
2715
2716 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2717
2718         REGRESSION (r180224): Remove unused generate-export-file script
2719         <http://webkit.org/b/141491>
2720
2721         * generate-export-file: Removed.  This was the script used to
2722         create WebCore.exp files for iOS since we couldn't compile a
2723         host-side tool to run like we did on Mac OS X.  Dont't tell
2724         anyone, but this was an epic hack I created while merging open
2725         source changes to the internal iOS WebKit repository around the
2726         time that the WebCore.exp.in file was created.  End of an era.
2727
2728 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2729
2730         SoftLinking.h: Update copyright and license; clean up whitespace
2731
2732         * platform/win/SoftLinking.h:
2733
2734 2015-02-17  Chris Dumez  <cdumez@apple.com>
2735
2736         Slight CachedPage class clean up
2737         https://bugs.webkit.org/show_bug.cgi?id=141693
2738
2739         Reviewed by Andreas Kling.
2740
2741         Slight CachedPage class clean up:
2742         - Drop unnecessary m_timeStamp data member
2743         - Protect m_needsCaptionPreferencesChanged data member with
2744           #if ENABLE(VIDEO_TRACK)
2745         - Merge destroy() method into the destructor as this is the
2746           only caller
2747         - Update clear() to reset 2 data members that were missing
2748
2749 2015-02-17  Anders Carlsson  <andersca@apple.com>
2750
2751         Silence two -Wcast-qual warnings.
2752         rdar://problem/19758266
2753
2754         * platform/ios/wak/WKUtilities.c:
2755         (WKRetain):
2756         (WKRelease):
2757
2758 2015-02-17  Zalan Bujtas  <zalan@apple.com>
2759
2760         Minor RenderTable* class cleanups.
2761         https://bugs.webkit.org/show_bug.cgi?id=141707
2762
2763         Reviewed by Andreas Kling.
2764
2765         Use in-class initializer where possible.
2766         Remove redundant code.
2767         Move multiline implementations out of class declaration.
2768
2769         No change in functionality.
2770
2771         * rendering/RenderTableCaption.cpp:
2772         (WebCore::RenderTableCaption::insertedIntoTree):
2773         (WebCore::RenderTableCaption::willBeRemovedFromTree):
2774         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
2775         * rendering/RenderTableCaption.h:
2776         * rendering/RenderTableCell.cpp:
2777         (WebCore::RenderTableCell::RenderTableCell):
2778         * rendering/RenderTableCell.h:
2779         (WebCore::RenderTableCell::colSpan):
2780         (WebCore::RenderTableCell::rowSpan):
2781         (WebCore::RenderTableCell::setCol):
2782         (WebCore::RenderTableCell::col):
2783         (WebCore::RenderTableCell::section):
2784         (WebCore::RenderTableCell::table):
2785         (WebCore::RenderTableCell::rowIndex):
2786         (WebCore::RenderTableCell::styleOrColLogicalWidth):
2787         (WebCore::RenderTableCell::logicalHeightForRowSizing):
2788         (WebCore::RenderTableCell::isBaselineAligned):
2789         (WebCore::RenderTableCell::borderAdjoiningTableStart):
2790         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
2791         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
2792         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
2793         * rendering/RenderTableCol.cpp:
2794         (WebCore::RenderTableCol::RenderTableCol):
2795         * rendering/RenderTableCol.h:
2796         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
2797         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
2798         * rendering/RenderTableRow.h:
2799         (WebCore::RenderTableRow::setRowIndex):
2800         (WebCore::RenderTableRow::rowIndex):
2801         (WebCore::RenderTableRow::borderAdjoiningTableStart):
2802         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
2803         (WebCore::RenderTableRow::table):
2804         (WebCore::RenderTableSection::firstRow):
2805         (WebCore::RenderTableSection::lastRow):
2806         * rendering/RenderTableSection.cpp:
2807         (WebCore::RenderTableSection::RenderTableSection):
2808         (WebCore::RenderTableSection::dirtiedRows):
2809         (WebCore::RenderTableSection::dirtiedColumns):
2810         (WebCore::RenderTableSection::paintObject):
2811         (WebCore::RenderTableSection::nodeAtPoint):
2812         * rendering/RenderTableSection.h:
2813         (WebCore::CellSpan::CellSpan):
2814         (WebCore::RenderTableSection::borderAdjoiningTableStart):
2815         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
2816         (WebCore::RenderTableSection::cellAt):
2817         (WebCore::RenderTableSection::primaryCellAt):
2818         (WebCore::RenderTableSection::rowRendererAt):
2819         (WebCore::RenderTableSection::outerBorderLeft):
2820         (WebCore::RenderTableSection::outerBorderRight):
2821         (WebCore::RenderTableSection::outerBorderTop):
2822         (WebCore::RenderTableSection::outerBorderBottom):
2823         (WebCore::RenderTableSection::numRows):
2824         (WebCore::RenderTableSection::recalcCellsIfNeeded):
2825         (WebCore::RenderTableSection::rowBaseline):
2826         (WebCore::RenderTableSection::fullTableRowSpan):
2827         (WebCore::CellSpan::start): Deleted.
2828         (WebCore::CellSpan::end): Deleted.
2829
2830 2015-02-16  Dean Jackson  <dino@apple.com>
2831
2832         REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
2833         https://bugs.webkit.org/show_bug.cgi?id=141689
2834         <rdar://problem/19689286>
2835
2836         Reviewed by Eric Carlson.
2837
2838         The iBooks app turns off the requirement for a user gesture
2839         before triggering playback. When we moved to script-based
2840         media controls there were a few regressions in this setup.
2841         This makes them behave a lot more like iOS 7.
2842
2843         * Modules/mediacontrols/mediaControlsApple.js:
2844         (Controller.prototype.setPlaying): We don't want to hide the controls
2845         yet, just start a hiding timer.
2846         * Modules/mediacontrols/mediaControlsiOS.js:
2847         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
2848         played before, we don't want to show the big start button. If we
2849         are in the middle of construction, we do want to show it. We no
2850         longer care about the case where you're not in setup and have
2851         the relaxed restrictions (we still want to show the start button
2852         in that case).
2853         (ControllerIOS.prototype.showControls): When we show the controls,
2854         make sure our timeline is up to date. This is necessary for the
2855         cases where we automatically show the controls, such as when we hit
2856         the end of a video.
2857         (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
2858         parameter on to the super-method.
2859         (ControllerIOS.prototype.setPlaying):
2860         (ControllerIOS.prototype.progressFillStyle): Deleted.
2861
2862 2015-02-17  Chris Dumez  <cdumez@apple.com>
2863
2864         Access MemoryPressureHandler global instance via a singleton() static member function
2865         https://bugs.webkit.org/show_bug.cgi?id=141691
2866
2867         Reviewed by Andreas Kling.
2868
2869         Access MemoryPressureHandler global instance via a singleton() static
2870         member function as per coding style. Also make all other member
2871         functions non-static as callers can just use singleton() to get the
2872         instance and access methods. This avoid having to call
2873         MemoryPressureHandler::singleton() from member functions.
2874
2875         * bindings/js/ScriptController.cpp:
2876         (WebCore::collectGarbageAfterWindowShellDestruction):
2877         * history/PageCache.cpp:
2878         (WebCore::PageCache::canCache):
2879         * loader/FrameLoader.cpp:
2880         (WebCore::FrameLoader::commitProvisionalLoad):
2881         * page/FrameView.cpp:
2882         (WebCore::FrameView::willPaintContents):
2883         (WebCore::FrameView::didPaintContents):
2884         (WebCore::FrameView::computeCoverageRect):
2885         * platform/MemoryPressureHandler.cpp:
2886         (WebCore::MemoryPressureHandler::singleton):
2887         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2888         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2889         (WebCore::memoryPressureHandler): Deleted.
2890         * platform/MemoryPressureHandler.h:
2891         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2892         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2893         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2894         (WebCore::MemoryPressureHandler::install):
2895         (WebCore::MemoryPressureHandler::holdOff):
2896         (WebCore::respondToMemoryPressureCallback):
2897         * platform/graphics/FontCache.cpp:
2898         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
2899         * platform/ios/LegacyTileCache.mm:
2900         (WebCore::LegacyTileCache::createTilesInActiveGrid):
2901         * platform/ios/LegacyTileGrid.mm:
2902         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
2903         * platform/ios/LegacyTileLayerPool.mm:
2904         (WebCore::LegacyTileLayerPool::addLayer):
2905         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
2906         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
2907         * platform/linux/MemoryPressureHandlerLinux.cpp:
2908         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
2909
2910 2015-02-17  Alex Christensen  <achristensen@webkit.org>
2911
2912         Remove WebCore.exp.in and clean up.
2913         https://bugs.webkit.org/show_bug.cgi?id=141491
2914
2915         Reviewed by Andreas Kling.
2916
2917         * Configurations/WebCore.xcconfig:
2918         Don't use exported symbols files.
2919         * DerivedSources.make:
2920         Don't generate export files.
2921         * WebCore.exp.in: Removed.
2922         * WebCore.xcodeproj/project.pbxproj:
2923         Removed WebCoreExportFileGenerator targets.
2924         * make-export-file-generator: Removed.
2925
2926 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2927
2928         Use HashMap::add instead of get/contains + set in DOMObjectCache
2929         https://bugs.webkit.org/show_bug.cgi?id=141558
2930
2931         Rubber-stamped by Žan Doberšek.
2932
2933         * bindings/gobject/DOMObjectCache.cpp:
2934         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
2935         (WebKit::DOMObjectCache::put):
2936
2937 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2938
2939         [GTK] GObject DOM bindings object are cached forever
2940         https://bugs.webkit.org/show_bug.cgi?id=141558
2941
2942         Reviewed by Sergio Villar Senin.
2943
2944         Rework the DOMObjectCache to avoid having to manually clear the
2945         objects when the frame is destroyed, using a FrameDestructionObserver
2946         instead. When a new object associated to a Frame is added to the
2947         cache, a FrameDestructionObserver is created for the frame if
2948         needed, and the DOM object is tracked by the observer too. When
2949         the frame is detached from the page all its objects are cleared,
2950         and if the aren't additional references, the object is finalized
2951         and removed from the cache normally.
2952         This patch also simplifies and modernizes the code to make it
2953         easier to read an maintain.
2954
2955         * bindings/gobject/DOMObjectCache.cpp:
2956         (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
2957         to initialize its members and simplify the callers.
2958         (WebKit::DOMObjectCacheData::clearObject): Remove the references
2959         added by the cache, ensuring the GObject is not finalized until
2960         the method returns.
2961         (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
2962         the cache.
2963         (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
2964         (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
2965         FrameDestructionObserver for the given Frame or return the
2966         existing one.
2967         (WebKit::domObjects): Map wrapped object to wrapper object.
2968         (WebKit::DOMObjectCache::forget): Remove the wrapped object from
2969         the cache.
2970         (WebKit::DOMObjectCache::get): Return the wrapped object if it is
2971         in the cache, increasing the cache references.
2972         (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
2973         for the given wrapped object. If it's a Node and has a frame add
2974         the node to the FrameDestructionObserver corresponding to the frame.
2975         (WebKit::getFrameFromHandle): Deleted.
2976         (WebKit::weakRefNotify): Deleted.
2977         (WebKit::DOMObjectCache::clearByFrame): Deleted.
2978         (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
2979         * bindings/gobject/DOMObjectCache.h:
2980
2981 2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
2982
2983         REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
2984         https://bugs.webkit.org/show_bug.cgi?id=141647
2985
2986         Reviewed by Csaba Osztrogonác.
2987
2988         No new tests since this just fixes a build break.
2989
2990         * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
2991         (WebCore::Position::isCandidate):
2992
2993 2015-02-16  Chris Dumez  <cdumez@apple.com>
2994
2995         Keep all memory cache resources in ListHashSets
2996         https://bugs.webkit.org/show_bug.cgi?id=141667
2997
2998         Reviewed by Andreas Kling.
2999
3000         Keep all memory cache resources in ListHashSets instead of manual linked
3001         lists. This simplifies the code a lot and is also more efficient for
3002         retrieving / removing particular CachedResources.
3003
3004         * loader/cache/CachedResource.cpp:
3005         (WebCore::CachedResource::CachedResource):
3006         * loader/cache/CachedResource.h:
3007         * loader/cache/MemoryCache.cpp:
3008         (WebCore::MemoryCache::pruneDeadResourcesToSize):
3009         (WebCore::MemoryCache::removeFromLRUList):
3010         (WebCore::MemoryCache::insertInLRUList):
3011         (WebCore::MemoryCache::dumpLRULists):
3012         (WebCore::MemoryCache::lruListFor): Deleted.
3013         * loader/cache/MemoryCache.h:
3014
3015 2015-02-16  Benjamin Poulain  <benjamin@webkit.org>
3016
3017         CSS JIT: finish :nth-last-child()
3018         https://bugs.webkit.org/show_bug.cgi?id=141629
3019
3020         Reviewed by Andreas Kling.
3021
3022         This patch adds the matcher for :nth-child(An+B of selector list) and
3023         fix a small bug I discovered while working on it.
3024
3025         The matcher is straightforward: count the next siblings matching the selector,
3026         nothing fancy.
3027
3028         While working on it I noticed I forgot the test for IsParsingChildrenFinished
3029         on the simple version of :nth-last-child(). I add it in both matcher, write
3030         a couple of tests, the first part of the tests now succeed, but the second part
3031         fails...
3032
3033         What happened is:
3034         1) We interupt the parsing to execute the JavaScript.
3035            From there, we force the style resolution to get the computed style.
3036         2) When resolving the style, the early check for isFinishedParsingChildren()
3037            quits the function early. This is done *before* we marked the parent
3038            for :nth-last-child() style resolution.
3039         3) After the script, parsing resume and the following elements are added.
3040         4) When resolving the style, only the new elements are marked dirty,
3041            the elements pending their :nth-last-child() style never get udpated.
3042
3043         To fix the problem, I moved the test for FinishedParsingChildren after
3044         the parent marking.
3045
3046         Honestly, those early return for FinishedParsingChildren need to be refined
3047         and they should be tested properly. We should not do this kind of things
3048         for Query for example.
3049
3050         Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
3051                fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
3052                fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
3053                fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
3054                fast/selectors/nth-last-child-of-register-requirement.html
3055
3056         * css/SelectorChecker.cpp:
3057         (WebCore::SelectorChecker::checkOne):
3058         Fix the tree marking.
3059
3060         * cssjit/SelectorCompiler.cpp:
3061         (WebCore::SelectorCompiler::addPseudoClassType):
3062         The fragment creation was already done, all I had to do was
3063         accept the compile.
3064
3065         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3066         :nth-child() and :nth-last-child() with a selector list are heavier than :not()
3067         and :matches(), move them accordingly.
3068
3069         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
3070         More the early return after the tree marking.
3071
3072         (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
3073         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
3074         New matcher, nothing optimized yet.
3075
3076 2015-02-16  Tim Horton  <timothy_horton@apple.com>
3077
3078         Adopt CAMachPort-as-layer-contents
3079         https://bugs.webkit.org/show_bug.cgi?id=141687
3080         <rdar://problem/19393233>
3081
3082         Reviewed by Simon Fraser.
3083
3084         No new tests, just a performance bump.
3085
3086         * platform/cocoa/MachSendRight.h:
3087         (WebCore::MachSendRight::operator bool):
3088         Add an operator bool() that checks if the underlying port is nonnull.
3089
3090         * platform/spi/cocoa/QuartzCoreSPI.h:
3091         Add some SPI.
3092
3093 2015-02-15  Sam Weinig  <sam@webkit.org>
3094
3095         Add experimental <attachment> element support
3096         https://bugs.webkit.org/show_bug.cgi?id=141626
3097
3098         Reviewed by Tim Horton.
3099
3100         Adds scaffolding for an experimental implementation of an <attachment> element
3101         which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
3102         parlance).
3103
3104         The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and 
3105         a setting (Settings::attachmentElementEnabled()).
3106
3107         Tests: fast/attachment/attachment-disabled-dom.html
3108                fast/attachment/attachment-disabled-rendering.html
3109                fast/attachment/attachment-dom.html
3110                fast/attachment/attachment-rendering.html
3111
3112         * Configurations/FeatureDefines.xcconfig:
3113         Add new ENABLE_ATTACHMENT_ELEMENT macro.
3114
3115         * CMakeLists.txt:
3116         * WebCore.vcxproj/WebCore.vcxproj:
3117         * WebCore.xcodeproj/project.pbxproj:
3118         Add new files.
3119
3120         * dom/make_names.pl:
3121         Add support for checking a setting to determine if a particular tag should be exposed.
3122
3123         * html/HTMLAttachmentElement.cpp: Added.
3124         * html/HTMLAttachmentElement.h: Added.
3125         Stub out the basics of the new element.
3126
3127         * html/HTMLElementsAllInOne.cpp:
3128         Add HTMLAttachmentElement.cpp.
3129
3130         * html/HTMLTagNames.in:
3131         Add 'attachment'.
3132
3133         * page/Settings.in:
3134         Add attachmentElementEnabled setting.
3135
3136         * rendering/RenderAttachment.cpp: Added.
3137         * rendering/RenderAttachment.h: Added.
3138         Stub out the basics of the new render. We will probably want to replace this with
3139         a non-replaced render, but this will do as a placeholder for now.
3140
3141         * rendering/RenderObject.h:
3142         (WebCore::RenderObject::isAttachment):
3143         Add predicate for type casting.
3144
3145         * rendering/RenderingAllInOne.cpp:
3146         Add RenderAttachment.cpp.
3147
3148 2015-02-16  Andreas Kling  <akling@apple.com>
3149
3150         GC (almost) immediately when navigating under memory pressure.
3151         <https://webkit.org/b/141663>
3152
3153         Reviewed by Geoffrey Garen.
3154
3155         Since the PageCache is already disabled in memory pressure situations,
3156         we know that detaching the old window shell on navigation is basically
3157         guaranteed to generate a bunch of garbage, we can soften the memory
3158         peak a bit by doing a GC right away instead of scheduling one for soon(tm).
3159
3160         * bindings/js/GCController.cpp:
3161         (WebCore::GCController::GCController):
3162         (WebCore::GCController::garbageCollectSoon):
3163         (WebCore::GCController::garbageCollectOnNextRunLoop):
3164         (WebCore::GCController::gcTimerFired):
3165         * bindings/js/GCController.h:
3166
3167             Add a GCController::garbageCollectOnNextRunLoop() complement to the
3168             "soon" and "now" options. There was already a zero timer in here for
3169             non-CF builds, so I just used that same timer to implement this
3170             and have the non-CF code path call garbageCollectOnNextRunLoop().
3171
3172         * bindings/js/ScriptController.cpp:
3173         (WebCore::collectGarbageAfterWindowShellDestruction):
3174         (WebCore::ScriptController::~ScriptController):
3175         (WebCore::ScriptController::clearWindowShell):
3176
3177             Under system memory pressure conditions, schedule a full GC on next
3178             runloop iteration instead of just asking for it to happen soon.
3179             We do it on next runloop to ensure that there's no pointer to the
3180             window object on the stack.
3181
3182 2015-02-16  Enrica Casucci  <enrica@apple.com>
3183
3184         Emoji sequences do not render properly.
3185         https://bugs.webkit.org/show_bug.cgi?id=141661
3186         rdar://problem/19820463
3187
3188         Reviewed by Sam Weinig.
3189
3190         Emoji sequences and emoji with variations should be rendered
3191         using the Complex code path and should be treated as graphemes.
3192         This change modifies advanceByCombiningCharacterSequence to add
3193         this logic.
3194
3195         Test: fast/text/emoji.html
3196
3197         * WebCore.xcodeproj/project.pbxproj:
3198         * platform/graphics/FontCascade.cpp:
3199         (WebCore::FontCascade::characterRangeCodePath):
3200         * platform/graphics/mac/ComplexTextController.cpp:
3201         (WebCore::advanceByCombiningCharacterSequence): Implements a simple
3202         logic to treat emoji sequences and emoji with variations as graphemes.
3203         * platform/text/CharacterProperties.h: Added.
3204         (WebCore::isEmojiGroupCandidate):
3205         (WebCore::isEmojiModifier):
3206         (WebCore::isVariationSelector):
3207         * rendering/RenderText.cpp:
3208         (WebCore::isEmojiGroupCandidate): Deleted.
3209         (WebCore::isEmojiModifier): Deleted.
3210
3211 2015-02-16  Zalan Bujtas  <zalan@apple.com>
3212
3213         RenderTableRow should check if it has access to its ancestor chain.
3214         https://bugs.webkit.org/show_bug.cgi?id=141668
3215
3216         Reviewed by Andreas Kling.
3217
3218         Preventive fix.
3219
3220         * rendering/RenderTableRow.cpp:
3221         (WebCore::RenderTableRow::styleDidChange):
3222         (WebCore::RenderTableRow::addChild):
3223         * rendering/RenderTableRow.h:
3224
3225 2015-02-16  Jer Noble  <jer.noble@apple.com>
3226
3227         [iOS] Build fix: declare undeclared identifier 'credential'.
3228
3229         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3230         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):
3231
3232 2015-02-16  Jer Noble  <jer.noble@apple.com>
3233
3234         [iOS] Unable to play .mp4 file over http with basic http authentication
3235         https://bugs.webkit.org/show_bug.cgi?id=141503
3236         rdar://problem/15799844
3237
3238         Reviewed by Alexey Proskuryakov.
3239
3240         On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
3241         provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
3242         object by way of CFURLAuthChallengeRef.
3243
3244         Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
3245         is to take AuthenticationChallengeClient callbacks and pass them along to a
3246         NSURLAuthenticationChallenge sender.
3247
3248         Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
3249         that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
3250         them into that same header.
3251
3252         * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
3253         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3254         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
3255         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
3256         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
3257         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
3258         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
3259         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
3260         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
3261         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
3262             Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
3263             to the HTMLMediaElement.
3264         * platform/network/mac/AuthenticationMac.mm:
3265         * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
3266
3267 2015-02-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
3268
3269         Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing <https://bugs.webkit.org/show_bug.cgi?id=119626>.
3270         https://bugs.webkit.org/show_bug.cgi?id=138439
3271
3272         Reviewed by Darin Adler.
3273
3274         The change http://trac.webkit.org/changeset/164861 was ported from Blink
3275         but it was was revert later because it broke Chrome SVG rendering. It also
3276         broke the WebKit SVG text search highlighting.
3277         
3278         Tests: svg/transforms/svg-geometry-crash.html: This test was added by the
3279         blamed change. A new but correct solution is required to fix the assertion.
3280
3281         * rendering/svg/SVGRenderSupport.h:
3282         * rendering/svg/SVGRenderSupport.cpp:
3283         Notice that TransformState.applyTransform() does matrix-left-multiplication,
3284         i.e. state = transform * state. But operator*() of AffineTransform and
3285         MatrixTransform  does right multiply, i.e. this = this * transform.
3286         
3287         (WebCore::SVGRenderSupport::localToParentTransform): Have the calculation
3288         of the SVG localToParentTransform in one shared function.
3289         
3290         (WebCore::SVGRenderSupport::mapLocalToContainer): Revert the Blink change.
3291         If the parent is the SVG root, the transform state should be equal to
3292         transform = svg_to_css_mapping * local_to_parent_mapping * transform.
3293         
3294         (WebCore::SVGRenderSupport::pushMappingToContainer): Get the localToParent
3295         transform to be pushed in the geometryMap. If the parent is the SVG root,
3296         localToParent = svg_to_css_mapping * local_to_parent_mapping. The original
3297         code was doing the opposite and this is the cause of the assertion which 
3298         was fixed wrongly by reversing the correct multiplication order in 
3299         SVGRenderSupport::mapLocalToContainer().
3300
3301 2015-02-16  Zalan Bujtas  <zalan@apple.com>
3302
3303         RenderTableCell can't access its parent while in detached state.
3304         https://bugs.webkit.org/show_bug.cgi?id=141639
3305         rdar://problem/19850760
3306
3307         Reviewed by Simon Fraser.
3308
3309         Null check against ancestor chain so that certain methods in RenderTableCell can
3310         be called even if the renderer is not yet attached.
3311
3312         Test: fast/table/table-cell-crash-when-detached-state.html
3313
3314         * rendering/RenderTableCell.cpp:
3315         (WebCore::RenderTableCell::borderLeft):
3316         (WebCore::RenderTableCell::borderRight):
3317         (WebCore::RenderTableCell::borderTop):
3318         (WebCore::RenderTableCell::borderBottom):
3319         (WebCore::RenderTableCell::borderStart):
3320         (WebCore::RenderTableCell::borderEnd):
3321         (WebCore::RenderTableCell::borderBefore):
3322         (WebCore::RenderTableCell::borderAfter):
3323         * rendering/RenderTableCell.h:
3324
3325 2015-02-16  David Hyatt  <hyatt@apple.com>
3326
3327         Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
3328         https://bugs.webkit.org/show_bug.cgi?id=141651
3329         <rdar://problem/19182526>
3330         
3331         Reviewed by Simon Fraser.
3332
3333         * rendering/RootInlineBox.cpp:
3334         (WebCore::RootInlineBox::selectionTop):
3335         (WebCore::RootInlineBox::selectionBottom):
3336
3337 2015-02-16  David Kilzer  <ddkilzer@apple.com>
3338
3339         SoftLinking.h: Update copyright and license; clean up whitespace
3340
3341         * platform/mac/SoftLinking.h:
3342
3343 2015-02-12  David Hyatt  <hyatt@apple.com>
3344
3345         text-underline-position:under has multiple correctness issues
3346         https://bugs.webkit.org/show_bug.cgi?id=141528
3347
3348         Reviewed by Dean Jackson.
3349
3350         Added a bunch of new tests in fast/text
3351
3352         * rendering/InlineFlowBox.cpp:
3353         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
3354         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
3355         (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
3356         * rendering/InlineFlowBox.h:
3357         These functions have been re-written to take an enclosing renderer that specified the
3358         decoration. This way they can properly limit the bottom/top computation to only line boxes
3359         that are contained inside the renderer.
3360
3361         * rendering/InlineTextBox.cpp:
3362         (WebCore::InlineTextBox::paintDecoration):
3363         Tweak the call to get the decoration colors now that quirks mode has been removed.
3364
3365         * rendering/RenderElement.cpp:
3366         (WebCore::RenderElement::enclosingRendererWithTextDecoration):
3367         * rendering/RenderElement.h:
3368         New function that finds the enclosing renderer that specified a text decoration. For now
3369         this is only used in the "under" position computation, but soon we'll be using it
3370         everywhere.
3371
3372         * rendering/RenderObject.cpp:
3373         (WebCore::RenderObject::getTextDecorationColors):
3374         * rendering/RenderObject.h:
3375         Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
3376
3377         * rendering/RootInlineBox.cpp:
3378         (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
3379         * rendering/RootInlineBox.h:
3380         Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
3381         the InlineFlowBox functions directly.
3382
3383         * style/InlineTextBoxStyle.cpp:
3384         (WebCore::computeUnderlineOffset):
3385         Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
3386         computation to limit which line boxes get included.
3387
3388 2015-02-16  Brent Fulgham  <bfulgham@apple.com>
3389
3390         FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
3391         https://bugs.webkit.org/show_bug.cgi?id=141596
3392         <rdar://problem/19837103>
3393
3394         Reviewed by Zalan Bujtas.
3395
3396         No new tests. Covered by css3/filters/huge-blur-value.html
3397
3398         Avoid overflowing the signed integer values by not converting from unsigned
3399         until the maximum size has been clamped to the expected max.
3400
3401         * platform/graphics/filters/FEGaussianBlur.cpp:
3402         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
3403
3404 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
3405
3406         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
3407         https://bugs.webkit.org/show_bug.cgi?id=140763
3408
3409         Reviewed by Antti Koivisto.
3410
3411         Content sized tracks with non-spanning grid items were not
3412         properly sized because the growth limit was sometimes infinity
3413         (-1) after calling resolveContentBasedTrackSizingFunctions() when
3414         it should not. This patch adds an special initialization phase for
3415         non-spanning grid items as the new track sizing algorithm
3416         describes.
3417
3418         Granted, that was handled in the old algorithm in
3419         distributeSpaceToTracks() as a special case. The problem is that
3420         it regressed after the optimization added in r173868 because that
3421         method is no longer called when the space to distribute is 0.
3422
3423         That's why we could fix this by allowing calls to
3424         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
3425         it with an explicit initialization our implementation becomes
3426         closer to the new algorithm and the initialization is now explicit
3427         in the code instead of a side effect of calling
3428         distributeSpaceToTracks() with no space to be distributed. It also
3429         brings a slight performance improvement as we save sorts and hash
3430         lookups.
3431
3432         I also took the change to add caching to several GridTrackSize
3433         methods that were hot on the profiler (each one accounted for ~1%
3434         of the total time, now they account for ~0.3% each).
3435
3436         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
3437
3438         * rendering/RenderGrid.cpp:
3439         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
3440         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3441         Exclude non spanning grid items from the calls to
3442         resolveContentBasedTrackSizingFunctionsForItems().
3443         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
3444         New method to resolve track sizes only using non-spanning grid
3445         items.
3446         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3447         Ensure that it isn't called for non-spanning grid items.
3448         * rendering/RenderGrid.h:
3449         * rendering/style/GridTrackSize.h:
3450         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
3451         (WebCore::GridTrackSize::setLength): Ditto.
3452         (WebCore::GridTrackSize::setMinMax): Ditto.
3453         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
3454         that caches the return values for hasXXXTrackBreadth() methods.
3455         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
3456         the cached return value.
3457         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
3458         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
3459         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
3460         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
3461         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
3462         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
3463         Ditto.
3464         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
3465         Ditto.
3466
3467 2015-02-16  Milan Crha  <mcrha@redhat.com>
3468
3469         [GTK] Loading page into WebView shows g_closure_unref warning
3470         https://bugs.webkit.org/show_bug.cgi?id=127474
3471
3472         Reviewed by Carlos Garcia Campos.
3473
3474         * bindings/gobject/GObjectEventListener.cpp:
3475         (WebCore::GObjectEventListener::gobjectDestroyed):
3476
3477 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
3478
3479         [CSS Grid Layout] Remove the usage of Length(Undefined) in GridLength
3480         https://bugs.webkit.org/show_bug.cgi?id=141562
3481
3482         Reviewed by Chris Dumez.
3483
3484         From Blink r164154 by <timloh@chromium.org>
3485
3486         The patch simplifies some of the logic in creating and applying
3487         GridLength and GridTrackSize values to RenderStyles by using the
3488         constructors for initialisation instead of deferring to setters.
3489
3490         The rationale behind this change is that neither of
3491         createGridTrackSize() nor createGridTrackBreadth() should be able
3492         to fail, so these are changed to return objects directly instead
3493         of taking an out reference (note that in general failing in
3494         applying properties is incorrect and we should catch these in the
3495         parser).
3496
3497         The quirk value across to the Lengths was also removed because it
3498         doesn't apply to Grid.
3499
3500         * css/CSSPropertyNames.in:
3501         * css/StyleBuilderConverter.h:
3502         (WebCore::StyleBuilderConverter::createGridTrackBreadth): Return a
3503         GridLength instead of a bool.
3504         (WebCore::StyleBuilderConverter::createGridTrackSize): Return a
3505         GridTrackSize instead of a bool.
3506         (WebCore::StyleBuilderConverter::createGridTrackList): Do not
3507         create temporary GridTrackSizes with undefined Lengths.
3508         (WebCore::StyleBuilderConverter::convertGridTrackSize): Ditto.
3509         * rendering/style/GridLength.h:
3510         (WebCore::GridLength::GridLength): It now requires a mandatory
3511         Length argument.
3512         (WebCore::GridLength::length): Deleted.
3513         (WebCore::GridLength::setFlex): Deleted.
3514         * rendering/style/GridTrackSize.h:
3515         (WebCore::GridTrackSize::GridTrackSize): It now requires a
3516         mandatory GridLength argument.
3517         (WebCore::GridTrackSize::length): Removed no longer valid ASSERTs.
3518         (WebCore::GridTrackSize::minTrackBreadth): Ditto.
3519         (WebCore::GridTrackSize::maxTrackBreadth): Ditto.
3520         (WebCore::GridTrackSize::setLength): Deleted.
3521         (WebCore::GridTrackSize::setMinMax): Deleted.
3522         * rendering/style/RenderStyle.h:
3523
3524 2015-02-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3525
3526         Removing text node does not remove its associated markers
3527         https://bugs.webkit.org/show_bug.cgi?id=140999
3528
3529         Reviewed by Ryosuke Niwa.
3530
3531         Removing text node via script does not remove its markers.
3532         For example, running the following script:
3533
3534         <script>
3535             var div = document.getElementById("testElement");
3536             div.focus();
3537             document.execCommand("InsertText", false, "welllcome ");
3538
3539             // Give a time async spellchecker to show its markers and
3540             // remove the node.
3541             setTimeout(function() { div.removeChild(div.firstChild); }, 100);
3542         </script>
3543
3544         will cause that DocumentMarkerController still stores the markers for
3545         detached node.
3546
3547         The same issue occurs when the text gets cleared, for example,
3548         <script>
3549             input.value = ""; // for HTMLTextAreaElement, HTMLInputElement
3550             // or
3551             div.innerHTML = ""; // for content editable
3552         </script>
3553
3554         No new tests. Internals marker APIs operate on text node attached
3555         to the element. To test it we could expose document().markers().hasMarkers()
3556         but there is no more useful cases where it could be used.
3557         Another obstacle is that we are in isInShadowTree() so that there is
3558         no possible to register on "DOMSubtreeModified" event.
3559         Test cases attached to the bug:
3560         1. input.value = ""  https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704
3561         2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515
3562
3563         Remove markers when text nodes are about to remove.
3564         * dom/Document.cpp:
3565         (WebCore::Document::nodeChildrenWillBeRemoved):
3566         Fixes input.value = ""
3567         (WebCore::Document::nodeWillBeRemoved):
3568         Fixes elem.removeChild(textNode)
3569
3570 2015-02-15  David Kilzer  <ddkilzer@apple.com>
3571
3572         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3573         <http://webkit.org/b/141607>
3574
3575         This should fix the build, but leaves a FIXME list in
3576         WebCore.unexp.
3577
3578         * Configurations/WebCore.unexp: Add weak externals with a FIXME
3579         statement so they can be removed later.  It's more important to
3580         fix the build first.
3581
3582         * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to
3583         XCODE_VERSION_MAJOR since the internal bots use version 5.1.1
3584         which still has the error.
3585
3586 2015-02-15  Brian J. Burg  <burg@cs.washington.edu>
3587
3588         Web Inspector: remove unused XHR replay code
3589         https://bugs.webkit.org/show_bug.cgi?id=141622
3590
3591         Reviewed by Timothy Hatcher.
3592
3593         XHR Replay functionality became unused with the last frontend rewrite.
3594         Remove instrumentation and data storage classes only used by this feature.
3595
3596         * inspector/InspectorInstrumentation.cpp:
3597         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
3598         (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted.
3599         (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted.
3600         * inspector/InspectorInstrumentation.h:
3601         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
3602         (WebCore::InspectorInstrumentation::willLoadXHR): Deleted.
3603         (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted.
3604         * inspector/InspectorResourceAgent.cpp:
3605         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3606         (WebCore::InspectorResourceAgent::didFinishXHRLoading):
3607         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
3608         (WebCore::InspectorResourceAgent::willLoadXHR): Deleted.
3609         (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted.
3610         (WebCore::InspectorResourceAgent::replayXHR): Deleted.
3611         * inspector/InspectorResourceAgent.h:
3612         * inspector/NetworkResourcesData.cpp:
3613         (WebCore::NetworkResourcesData::clear):
3614         (WebCore::XHRReplayData::create): Deleted.
3615         (WebCore::XHRReplayData::XHRReplayData): Deleted.
3616         (WebCore::NetworkResourcesData::xhrReplayData): Deleted.
3617         (WebCore::NetworkResourcesData::setXHRReplayData): Deleted.
3618         (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted.
3619         * inspector/NetworkResourcesData.h:
3620         (WebCore::XHRReplayData::method): Deleted.
3621         (WebCore::XHRReplayData::url): Deleted.
3622         (WebCore::XHRReplayData::async): Deleted.
3623         (WebCore::XHRReplayData::formData): Deleted.
3624         (WebCore::XHRReplayData::headers): Deleted.
3625         (WebCore::XHRReplayData::includeCredentials): Deleted.
3626         (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted.
3627         (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted.
3628         * loader/DocumentThreadableLoader.cpp:
3629         (WebCore::DocumentThreadableLoader::loadRequest):
3630         * xml/XMLHttpRequest.cpp:
3631         (WebCore::XMLHttpRequest::createRequest):
3632         (WebCore::XMLHttpRequest::internalAbort):
3633         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted.
3634         * xml/XMLHttpRequest.h:
3635
3636 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3637
3638         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
3639         https://bugs.webkit.org/show_bug.cgi?id=141550.
3640
3641         Reviewed by David Kilzer.
3642
3643         * svg/properties/SVGMatrixTearOff.h:
3644         (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build.
3645         The ASSERT() here references a parameter which is not used anywhere else. We need 
3646         to change it to ASSERT_UNUSED(). 
3647
3648 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3649
3650         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
3651         https://bugs.webkit.org/show_bug.cgi?id=141550.
3652
3653         Reviewed by Darin Adler.
3654
3655         Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
3656         include a new test case.
3657
3658         * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
3659         pointer. There is no point in having SVGMatrixTearOff points to the parent and
3660         the property of the parent at the same time.
3661         
3662         (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
3663         the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
3664         and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
3665         parent.
3666         
3667         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
3668         SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
3669         itself but it knows what property to set and get from the parent.
3670         
3671         * svg/properties/SVGPropertyTearOff.h:
3672         (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
3673         
3674         (WebCore::SVGPropertyTearOff::propertyReference):
3675         (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
3676         like SVGMatrixTearOff can override them.
3677         
3678         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.
3679
3680 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3681
3682         Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
3683         https://bugs.webkit.org/show_bug.cgi?id=141552.
3684
3685         Reviewed by Darin Adler.
3686
3687         Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
3688         include a new test case.
3689
3690         * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
3691         before trying to detach the wrapper of the item which going to be replaced.
3692
3693 2015-02-15  David Kilzer  <ddkilzer@apple.com>
3694
3695         CoreText only needs to be soft-linked on Windows
3696
3697         More work towards the Maverick Debug build fix:
3698
3699         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3700         <http://webkit.org/b/141607>
3701
3702         * page/CaptionUserPreferencesMediaAF.cpp:
3703
3704 2015-02-15  Alexey Proskuryakov  <ap@apple.com>
3705
3706         More build fixing.
3707
3708         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
3709
3710 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
3711
3712         More internal build fixing.
3713
3714         DDDFACache.h is not an actual private header, so we were using open source
3715         redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h.
3716
3717         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
3718         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
3719
3720 2015-02-14  Benjamin Poulain  <benjamin@webkit.org>
3721
3722         Add the initial matching implementation for attribute selectors with case-insensitive value
3723         https://bugs.webkit.org/show_bug.cgi?id=141615
3724
3725         Reviewed by Andreas Kling.
3726
3727         Tests: fast/css/case-insensitive-attribute-selector-specificity.html
3728                fast/css/case-insensitive-attribute-selector-styling-html-1.html
3729                fast/css/case-insensitive-attribute-selector-styling-html-2.html
3730                fast/css/case-insensitive-attribute-selector-styling-html-3.html
3731                fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml
3732                fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml
3733                fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml
3734                fast/selectors/case-insensitive-attribute-bascis.html
3735                fast/selectors/case-insensitive-attribute-matching-style-attribute.html
3736                fast/selectors/case-insensitive-attribute-style-update.html
3737                fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html
3738
3739         * css/SelectorChecker.cpp:
3740         (WebCore::SelectorChecker::checkOne):
3741         We already had case-insensitive value matching due to some legacy HTML
3742         behaviors where some attribute values would be matched case-insensitively
3743         depending on the attribute name.
3744
3745         For this patch, I just re-use the same mechanism. I used branches to try
3746         to convey the idea that matching is case sensitive by default unless
3747         the selector has a flag or we are in the weird HTML exception.
3748
3749         * cssjit/SelectorCompiler.cpp:
3750         (WebCore::SelectorCompiler::constructFragmentsInternal):
3751         Disable that case in the CSS JIT for now, I'll implement it later.
3752
3753 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3754
3755         Declare soft-linked functions with extern "C" linkage
3756
3757         More work towards the Maverick Debug build fix:
3758
3759         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3760         <http://webkit.org/b/141607>
3761
3762         * platform/mac/SoftLinking.h: Try declaring soft-linked
3763         functions with extern "C" linkage to see if they stop appearing
3764         as weak externals.  This has the added benefit that if the
3765         function signature changes, we'll get a build failure.
3766
3767 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
3768
3769         [Mac] RetainPtr member cleanup, possible leaks
3770         https://bugs.webkit.org/show_bug.cgi?id=141616
3771
3772         Reviewed by Andreas Kling.
3773
3774         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3775         (-[WebSpeechSynthesisWrapper speakUtterance:]):
3776         Adopt the allocated object to avoid a possible leak.
3777
3778         * platform/mac/ScrollAnimatorMac.mm:
3779         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3780         Adopt to avoid unnecessary retain/autorelease.
3781
3782 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
3783
3784         IncompleteMetaDataCue leak seen on leaks bot
3785         https://bugs.webkit.org/show_bug.cgi?id=141611
3786
3787         Reviewed by Eric Carlson.        
3788
3789         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
3790         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted.
3791         (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted.
3792         (WebCore::IncompleteMetaDataCue::cueData): Deleted.
3793         (WebCore::IncompleteMetaDataCue::startTime): Deleted.
3794         Convert to a struct and hold a list of structs instead of pointers.
3795
3796         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
3797         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
3798         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
3799         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
3800         Update use of IncompleteMetaDataCue and modernize related code.
3801
3802 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
3803
3804         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
3805         https://bugs.webkit.org/show_bug.cgi?id=141372
3806
3807         Reviewed by Joseph Pecoraro.
3808
3809         * WebCore.exp.in:
3810         * inspector/InspectorApplicationCacheAgent.cpp:
3811         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
3812         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3813         * inspector/InspectorApplicationCacheAgent.h:
3814         * inspector/InspectorCSSAgent.cpp:
3815         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
3816         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
3817         * inspector/InspectorCSSAgent.h:
3818         * inspector/InspectorController.cpp:
3819         (WebCore::InspectorController::InspectorController):
3820         (WebCore::InspectorController::inspectedPageDestroyed):
3821         (WebCore::InspectorController::connectFrontend):
3822         (WebCore::InspectorController::disconnectFrontend):
3823         (WebCore::InspectorController::show):
3824         (WebCore::InspectorController::close):
3825         (WebCore::InspectorController::dispatchMessageFromFrontend):
3826         * inspector/InspectorController.h:
3827         * inspector/InspectorDOMAgent.cpp:
3828         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3829         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
3830         * inspector/InspectorDOMAgent.h:
3831         * inspector/InspectorDOMDebuggerAgent.cpp:
3832         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
3833         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
3834         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
3835         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
3836         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
3837         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
3838         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
3839         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3840         * inspector/InspectorDOMDebuggerAgent.h:
3841         * inspector/InspectorDOMStorageAgent.cpp:
3842         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
3843         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
3844         * inspector/InspectorDOMStorageAgent.h:
3845         * inspector/InspectorDatabaseAgent.cpp:
3846         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
3847         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
3848         * inspector/InspectorDatabaseAgent.h:
3849         * inspector/InspectorDatabaseResource.cpp:
3850         (WebCore::InspectorDatabaseResource::bind):
3851         * inspector/InspectorDatabaseResource.h:
3852         * inspector/InspectorForwarding.h:
3853         * inspector/InspectorIndexedDBAgent.cpp:
3854         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
3855         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
3856         * inspector/InspectorIndexedDBAgent.h:
3857         * inspector/InspectorLayerTreeAgent.cpp:
3858         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
3859         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
3860         * inspector/InspectorLayerTreeAgent.h:
3861         * inspector/InspectorPageAgent.cpp:
3862         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
3863         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
3864         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
3865         * inspector/InspectorPageAgent.h:
3866         * inspector/InspectorReplayAgent.cpp:
3867         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3868         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3869         * inspector/InspectorReplayAgent.h:
3870         * inspector/InspectorResourceAgent.cpp:
3871         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
3872         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
3873         * inspector/InspectorResourceAgent.h:
3874         * inspector/InspectorStyleSheet.cpp:
3875         (WebCore::InspectorStyle::styleWithProperties):
3876         * inspector/InspectorTimelineAgent.cpp:
3877         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
3878         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
3879         * inspector/InspectorTimelineAgent.h:
3880         * inspector/InspectorWorkerAgent.cpp:
3881         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
3882         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
3883         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
3884         * inspector/InspectorWorkerAgent.h:
3885         * inspector/PageRuntimeAgent.cpp:
3886         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
3887         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
3888         * inspector/PageRuntimeAgent.h:
3889         * inspector/WorkerInspectorController.cpp:
3890         (WebCore::WorkerInspectorController::~WorkerInspectorController):
3891         (WebCore::WorkerInspectorController::connectFrontend):
3892         (WebCore::WorkerInspectorController::disconnectFrontend):
3893         * inspector/WorkerInspectorController.h:
3894         * inspector/WorkerRuntimeAgent.cpp:
3895         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
3896         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3897         * inspector/WorkerRuntimeAgent.h:
3898         * loader/EmptyClients.h:
3899         * page/PageDebuggable.cpp:
3900         (WebCore::PageDebuggable::connect):
3901         (WebCore::PageDebuggable::disconnect):
3902         * page/PageDebuggable.h:
3903         * testing/Internals.cpp:
3904         (WebCore::Internals::closeDummyInspectorFrontend):
3905         * workers/WorkerMessagingProxy.cpp:
3906         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
3907
3908 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3909
3910         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3911         <http://webkit.org/b/141607>
3912
3913         Work towards fixing the Mavericks Debug build.
3914
3915         * dom/Document.h:
3916         (WebCore::Document::setAnnotatedRegionsDirty):
3917         * dom/Event.h:
3918         (WebCore::Event::create):
3919         * dom/Node.h:
3920         (WebCore::Node::hasEditableStyle):
3921         * dom/Position.h:
3922         (WebCore::Position::Position):
3923         * editing/FrameSelection.h:
3924         (WebCore::DragCaretController::clear):
3925         * loader/ResourceLoader.h:
3926         (WebCore::ResourceLoader::originalRequest):
3927         - Do not mark inline methods for export.
3928
3929 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
3930
3931         rel="noreferrer" should make window.opener null
3932         https://bugs.webkit.org/show_bug.cgi?id=141579
3933
3934         Reviewed by Darin Adler.
3935
3936         Tests: http/tests/navigation/target-blank-opener-post.html
3937                http/tests/navigation/target-blank-opener.html
3938
3939         We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
3940         member variable. This works for some clients - ones that invoke delegate callbacks
3941         synchronously - but not in the general case.
3942
3943         So, changed to passing the policy explicitly.
3944
3945         * WebCore.exp.in:
3946         * loader/FrameLoader.cpp:
3947         (WebCore::FrameLoader::FrameLoader):
3948         (WebCore::FrameLoader::urlSelected):
3949         (WebCore::FrameLoader::loadURLIntoChildFrame):
3950         (WebCore::FrameLoader::loadFrameRequest):
3951         (WebCore::FrameLoader::loadURL):
3952         (WebCore::FrameLoader::load):
3953         (WebCore::FrameLoader::loadPostRequest):
3954         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3955         * loader/FrameLoader.h:
3956         (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
3957         * loader/FrameLoaderTypes.h:
3958         * loader/NavigationScheduler.cpp:
3959         * page/ContextMenuController.cpp:
3960         (WebCore::openNewWindow):
3961         (WebCore::ContextMenuController::contextMenuItemSelected):
3962
3963 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3964
3965         REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386
3966         <rdar://problem/19838127>
3967
3968         * Configurations/WebCore.unexp: Add missing symbol.
3969
3970 2015-02-13  Chris Dumez  <cdumez@apple.com>
3971
3972         RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual
3973         https://bugs.webkit.org/show_bug.cgi?id=141572
3974         <rdar://problem/19759818>
3975
3976         Reviewed by Simon Fraser.
3977
3978         Do not unnecessarily update the marker's style in RenderListItem::styleDidChange()
3979         if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary
3980         layouts.
3981
3982         This was causing high cpu usage on
3983         http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there
3984         is an animation that changes the style every second (but the diff is equal) and the
3985         RenderListItem keeps resetting its marker's margin, which triggers a layout and the
3986         RenderListMarker re-computes its margin during layout and updates its style again.
3987
3988         With this change, CPU usage on the page goes from 150% to 20%. There is only a style
3989         recalc happening every second, no more relayouts and repaints.
3990
3991         Test: fast/repaint/list-item-equal-style-change-no-repaint.html
3992
3993         * rendering/RenderListItem.cpp:
3994         (WebCore::RenderListItem::styleDidChange):
3995
3996 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
3997
3998         Make WebCore::IOSurface have single ownership instead of refcounting
3999         https://bugs.webkit.org/show_bug.cgi?id=141578
4000
4001         Reviewed by Anders Carlsson.
4002
4003         In the interests of making it harder to misuse and to make it more like
4004         ImageBuffer, our IOSurface wrapper should have single ownership.
4005
4006         This will also allow future changes which depend on temporarily
4007         consuming an IOSurface to more easily enforce correct usage.
4008
4009         * WebCore.exp.in:
4010         * platform/graphics/cg/IOSurfacePool.cpp:
4011         (WebCore::IOSurfacePool::takeSurface):