Split TypesettingFeatures into kerning and ligatures bools
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Split TypesettingFeatures into kerning and ligatures bools
4         https://bugs.webkit.org/show_bug.cgi?id=150074
5
6         Reviewed by Simon Fraser.
7
8         Our TypesettingFeatures type represents whether kerning or ligatures are enabled
9         when laying out text. However, now that I have implemented font-feature-settings
10         and font-variant-*, this type is wildly inadequate. There are now multiple kinds
11         of ligatures, and many other features which are neither kerning nor ligatures.
12         Adding tons of information to this type doesn't make sense because 1) We already
13         have a FontVariantSettings struct which contains this information, and 2) None
14         of the users of TypesettingFeatures care about most of these new features.
15
16         In this new world of font features, the font-kerning property isn't changing.
17         Therefore, all the code which relies only on the Kerning value in
18         TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
19         however, need to be updated to understand that there are many different kinds
20         of ligatures.
21
22         Indeed, after inspection, all of the places which inspect ligatures are more
23         interested in a high-level concept of whether or not we can trust some simple
24         computation. Therefore, we really have two things we care about: Kerning, and
25         this high-level concept.
26
27         This patch is the second step to update our view of the world to include
28         font-feature-settings and font-variant-*. In particular, this patch simply
29         splits TypesettingFeatures into two Booleans, one for Kerning, and one for
30         Ligatures (which has no behavior change). Then, once they are separated, I can
31         migrate the Ligatures Boolean to take on its new meaning.
32
33         This change is purely mechanical.
34
35         No new tests because there is no behavior change.
36
37         * WebCore.xcodeproj/project.pbxproj:
38         * css/CSSPrimitiveValueMappings.h:
39         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
40         (WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
41         * platform/graphics/Font.cpp:
42         (WebCore::Font::applyTransforms):
43         * platform/graphics/Font.h:
44         * platform/graphics/FontCascade.cpp:
45         (WebCore::FontCascade::FontCascade):
46         (WebCore::FontCascade::operator=):
47         (WebCore::FontCascade::update):
48         (WebCore::FontCascade::drawText):
49         (WebCore::FontCascade::drawEmphasisMarks):
50         (WebCore::FontCascade::width):
51         (WebCore::FontCascade::adjustSelectionRectForText):
52         (WebCore::FontCascade::offsetForPosition):
53         (WebCore::FontCascade::setDefaultKerning):
54         (WebCore::FontCascade::setDefaultLigatures):
55         (WebCore::FontCascade::codePath):
56         (WebCore::FontCascade::floatWidthForSimpleText):
57         (WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
58         (WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
59         * platform/graphics/FontCascade.h:
60         (WebCore::FontCascade::enableKerning):
61         (WebCore::FontCascade::enableLigatures):
62         (WebCore::FontCascade::computeEnableKerning):
63         (WebCore::FontCascade::computeEnableLigatures):
64         (WebCore::FontCascade::typesettingFeatures): Deleted.
65         (WebCore::FontCascade::computeTypesettingFeatures): Deleted.
66         * platform/graphics/FontDescription.cpp:
67         (WebCore::FontCascadeDescription::FontCascadeDescription):
68         * platform/graphics/FontDescription.h:
69         (WebCore::FontCascadeDescription::setKerning):
70         (WebCore::FontCascadeDescription::initialKerning):
71         * platform/graphics/TypesettingFeatures.h: Removed.
72         * platform/graphics/WidthIterator.cpp:
73         (WebCore::WidthIterator::WidthIterator):
74         (WebCore::WidthIterator::applyFontTransforms):
75         (WebCore::WidthIterator::advanceInternal):
76         * platform/graphics/WidthIterator.h:
77         * platform/graphics/cocoa/FontCocoa.mm:
78         (WebCore::Font::canRenderCombiningCharacterSequence):
79         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
80         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
81         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
82         (WebCore::Font::getCFStringAttributes):
83         * rendering/RenderBlockLineLayout.cpp:
84         (WebCore::setLogicalWidthForTextRun):
85         * rendering/line/BreakingContext.h:
86         (WebCore::WordTrailingSpace::width):
87         * svg/SVGFontData.h:
88
89 2015-10-13  Zalan Bujtas  <zalan@apple.com>
90
91         Anonymous table objects: inline parent box requires inline-table child.
92         https://bugs.webkit.org/show_bug.cgi?id=150090
93
94         Reviewed by David Hyatt.
95
96         According to the CSS2.1 specification, if a child needs anonymous table wrapper
97         and the child's parent is an inline box, the generated table needs to be inline-table.
98         (inline-block and block parents generate non-inline table) 
99
100         Import W3C CSS2.1 anonymous table tests.
101
102         * rendering/RenderElement.cpp:
103         (WebCore::RenderElement::childRequiresTable):
104         (WebCore::RenderElement::addChild):
105         * rendering/RenderElement.h:
106         * rendering/RenderInline.cpp:
107         (WebCore::RenderInline::newChildIsInline):
108         (WebCore::RenderInline::addChildIgnoringContinuation):
109         (WebCore::RenderInline::addChildToContinuation):
110         * rendering/RenderInline.h:
111         * rendering/RenderTable.cpp:
112         (WebCore::RenderTable::createAnonymousWithParentRenderer):
113
114 2015-10-13  Dean Jackson  <dino@apple.com>
115
116         Device motion and orientation should only be visible from the main frame's security origin
117         https://bugs.webkit.org/show_bug.cgi?id=150072
118         <rdar://problem/23082036>
119
120         Reviewed by Brent Fulgham.
121
122         There are reports that gyroscope and accelerometer information can
123         be used to detect keyboard entry. One initial step to reduce the
124         risk is to forbid device motion and orientation events from
125         being fired in frames that are a different security origin from the main page.
126
127         Manual test: deviceorientation-main-frame-only.html
128
129         * page/DOMWindow.cpp:
130         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame): New helper function.
131         (WebCore::DOMWindow::addEventListener): Check if we are the main frame, or the
132         same security origin as the main frame. If not, don't add the event
133         listeners.
134
135 2015-10-12  Dean Jackson  <dino@apple.com>
136
137         ASSERT(m_motionManager) on emgn.com page
138         https://bugs.webkit.org/show_bug.cgi?id=150070
139         <rdar://problem/18383732>
140
141         Reviewed by Simon Fraser.
142
143         In the WebCoreMotionManager init method, we call
144         into another setup method on the main thread.
145         However, if a listener was attached before that
146         ran, we'd ASSERT. This wasn't actually causing a bug
147         because the main thread initialization would
148         check the listeners once it got a chance to run.
149
150         The fix is to only check status when we've
151         actually initialized.
152
153         * platform/ios/WebCoreMotionManager.h: New m_initialized boolean.
154         * platform/ios/WebCoreMotionManager.mm: Check m_initialized before doing real work.
155         (-[WebCoreMotionManager init]):
156         (-[WebCoreMotionManager addMotionClient:]):
157         (-[WebCoreMotionManager removeMotionClient:]):
158         (-[WebCoreMotionManager addOrientationClient:]):
159         (-[WebCoreMotionManager removeOrientationClient:]):
160         (-[WebCoreMotionManager initializeOnMainThread]):
161
162 2015-10-13  Chris Dumez  <cdumez@apple.com>
163
164         Avoid useless copies in range-loops that are using 'auto'
165         https://bugs.webkit.org/show_bug.cgi?id=150091
166
167         Reviewed by Sam Weinig.
168
169         Avoid useless copies in range-loops that are using 'auto'. Also use
170         'auto*' instead of 'auto' when range values are pointers for clarity.
171
172 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
173
174         Move Image::drawPattern for CG into GraphicsContext
175         https://bugs.webkit.org/show_bug.cgi?id=150077
176
177         Reviewed by Myles C. Maxfield.
178
179         In order to consolidate code that calls into Core Graphics inside
180         GraphicsContext, move the body of Image::drawPattern() into
181         GraphicsContextCG.cpp, and do the same for Cairo.
182
183         * platform/graphics/GraphicsContext.h:
184         * platform/graphics/cairo/GraphicsContextCairo.cpp:
185         (WebCore::GraphicsContext::drawPattern):
186         * platform/graphics/cairo/ImageCairo.cpp:
187         (WebCore::Image::drawPattern):
188         * platform/graphics/cg/GraphicsContextCG.cpp:
189         (WebCore::drawPatternCallback):
190         (WebCore::patternReleaseCallback):
191         (WebCore::GraphicsContext::drawPattern):
192         * platform/graphics/cg/ImageCG.cpp:
193         (WebCore::Image::drawPattern):
194         (WebCore::drawPatternCallback): Deleted.
195         (WebCore::patternReleaseCallback): Deleted.
196
197 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
198
199         Unprefix font-kerning
200         https://bugs.webkit.org/show_bug.cgi?id=150080
201
202         Reviewed by Sam Weinig.
203
204         This is the last property in CSS3 Fonts which is prefixed.
205
206         Test: fast/text/font-kerning.html
207
208         * css/CSSPropertyNames.in:
209
210 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
211
212         Add debug settings for using giant tiles (4096x4096)
213         https://bugs.webkit.org/show_bug.cgi?id=149977
214         <rdar://problem/23017093>
215
216         Reviewed by Tim Horton.
217
218         Instead of creating the GraphicsLayer with a fixed size 512x512, we need
219         to read the useGiantTiles setting. If its value is true, we set the layer
220         tileSize to 4096x4096.
221
222         * page/Settings.in:
223         Define the name of the setting and its default value.
224         
225         * platform/graphics/GraphicsLayerClient.h:
226         (WebCore::GraphicsLayerClient::tileSize):
227         Define tileSize() in the base class GraphicsLayerClient. This is going to
228         be overridden RenderLayerBacking.
229         
230         * platform/graphics/TiledBacking.h:
231         (WebCore::defaultTileSize):
232         Define the default tileSize which will depend on the useGiantTiles
233         setting.
234
235         * platform/graphics/ca/GraphicsLayerCA.cpp:
236         (WebCore::GraphicsLayerCA::platformCALayerTileSize):
237         Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
238         It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
239         in our case.
240
241         * platform/graphics/ca/GraphicsLayerCA.h:
242         Override base class function PlatformCALayerClient::PlatformCALayerClient().
243
244         * platform/graphics/ca/PlatformCALayerClient.h:
245         (WebCore::PlatformCALayerClient::platformCALayerTileSize):
246         Define platformCALayerTileSize() in the base class PlatformCALayerClient.
247         This is going to be overridden GraphicsLayerCA.
248
249         * platform/graphics/ca/TileController.cpp:
250         (WebCore::TileController::TileController):
251         No need for the member m_tileSize.
252         
253         (WebCore::TileController::computeTileCoverageRect):
254         Use the function tileSize() instead of using the static values.
255         
256         (WebCore::TileController::tileSize):
257         The tileSize will be retrieved from the owning graphics layer.
258         
259         * platform/graphics/ca/TileController.h:
260         No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.
261
262         * rendering/RenderLayerBacking.cpp:
263         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
264         Use the function tileSize() instead of using the static values.
265         
266         (WebCore::RenderLayerBacking::tileSize):
267         Override base class function GraphicsLayerClient::tileSize().
268         
269         * rendering/RenderLayerBacking.h:
270         Define the concrete method RenderLayerBacking::tilSize().
271
272 2015-10-13  Antti Koivisto  <antti@apple.com>
273
274         Try to fix ENABLE(DETAILS_ELEMENT) with SHADOW_DOM disabled.
275
276         * dom/Element.cpp:
277         (WebCore::Element::attributeChanged):
278         * dom/Node.cpp:
279         (WebCore::traverseStyleParent):
280
281 2015-10-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
282
283         Fix license and copyrights of WebCore js binding builtin files
284         https://bugs.webkit.org/show_bug.cgi?id=150027
285
286         Reviewed by Darin Adler.
287
288         Fixing copyright on all three files.
289         Moving to BSD-like license as they should have been in the first place.
290         Ordering lexicographically the builtin names in WebCoreBuiltinNames.h.
291
292         No change in behaviour.
293
294         * bindings/js/WebCoreBuiltinNames.h:
295         * bindings/js/WebCoreJSBuiltins.cpp:
296         * bindings/js/WebCoreJSBuiltins.h:
297         * bindings/js/WebCoreJSBuiltinInternals.h:
298
299 2015-10-12  Antti Koivisto  <antti@apple.com>
300
301         Implement iterator for traversing composed DOM
302         https://bugs.webkit.org/show_bug.cgi?id=149997
303
304         Reviewed by Ryosuke Niwa.
305
306         ComposedTreeIterator traverses the DOM in composed tree order. This means it enters
307         shadow trees and follows slots created by Shadow DOM API correctly.
308
309         auto children = composedTreeChildren(containerNode);
310         for (auto& composedChild : children)
311             ...
312
313         auto descendants = composedTreeDescendants(containerNode);
314         for (auto& composedDescendant : descendants)
315             ...
316
317         * WebCore.xcodeproj/project.pbxproj:
318         * dom/ComposedTreeIterator.cpp: Added.
319         (WebCore::ComposedTreeIterator::initializeShadowStack):
320         (WebCore::ComposedTreeIterator::traverseNextInShadowTree):
321         (WebCore::ComposedTreeIterator::traverseNextSiblingSlot):
322         (WebCore::ComposedTreeIterator::traversePreviousSiblingSlot):
323         (WebCore::ComposedTreeIterator::traverseParentInShadowTree):
324         * dom/ComposedTreeIterator.h: Added.
325         (WebCore::ComposedTreeIterator::operator*):
326         (WebCore::ComposedTreeIterator::operator->):
327         (WebCore::ComposedTreeIterator::operator==):
328         (WebCore::ComposedTreeIterator::operator!=):
329         (WebCore::ComposedTreeIterator::ShadowContext::ShadowContext):
330         (WebCore::ComposedTreeIterator::ComposedTreeIterator):
331         (WebCore::ComposedTreeIterator::traverseNext):
332         (WebCore::ComposedTreeIterator::traverseNextSibling):
333         (WebCore::ComposedTreeIterator::traversePreviousSibling):
334         (WebCore::ComposedTreeIterator::traverseParent):
335         (WebCore::ComposedTreeChildAdapter::Iterator::Iterator):
336         (WebCore::ComposedTreeChildAdapter::Iterator::operator++):
337         (WebCore::ComposedTreeChildAdapter::Iterator::operator--):
338         (WebCore::ComposedTreeChildAdapter::ComposedTreeChildAdapter):
339         (WebCore::ComposedTreeChildAdapter::begin):
340         (WebCore::ComposedTreeChildAdapter::end):
341         (WebCore::ComposedTreeChildAdapter::at):
342         (WebCore::composedTreeChildren):
343         * dom/NodeRenderingTraversal.cpp:
344         (WebCore::NodeRenderingTraversal::parentSlow):
345         (WebCore::NodeRenderingTraversal::nextInScope):
346         (WebCore::NodeRenderingTraversal::firstChildSlow): Deleted.
347         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Deleted.
348         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Deleted.
349         * dom/NodeRenderingTraversal.h:
350         (WebCore::NodeRenderingTraversal::parent):
351         (WebCore::NodeRenderingTraversal::firstChild): Deleted.
352         (WebCore::NodeRenderingTraversal::nextSibling): Deleted.
353         (WebCore::NodeRenderingTraversal::previousSibling): Deleted.
354         * style/RenderTreePosition.cpp:
355         (WebCore::RenderTreePosition::computeNextSibling):
356
357             Restore the full assert.
358
359         (WebCore::RenderTreePosition::invalidateNextSibling):
360         (WebCore::RenderTreePosition::previousSiblingRenderer):
361         (WebCore::RenderTreePosition::nextSiblingRenderer):
362
363             Make these member functions.
364             Use the iterator. This is fixes some bugs and allows enabling a test case.
365
366         * style/RenderTreePosition.h:
367         * style/StyleResolveTree.cpp:
368         (WebCore::Style::textRendererIsNeeded):
369
370 2015-10-13  ChangSeok Oh  <changseok.oh@collabora.com>
371
372         [GTK] Use GUniquePtr for GtkIconInfo
373         https://bugs.webkit.org/show_bug.cgi?id=150082
374
375         Reviewed by Carlos Garcia Campos.
376
377         GtkIconInfo cab be wrapped by a smart pointer, GUniqueptr.
378
379         No new test required since no functionality changed.
380
381         * rendering/RenderThemeGtk.cpp:
382         (WebCore::getStockSymbolicIconForWidgetType):
383
384 2015-10-12  Jaehun Lim  <ljaehun.lim@samsung.com>
385
386         Unreviewed, fix debug build warning.
387
388         %llu needs 'long long unsigned int'.
389
390         Type casting unit64_t to long long unsigned int.
391
392         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
393         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
394         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
395         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
396
397 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
398
399         Speculative Cairo build fixes after r190910.
400
401         * platform/graphics/cairo/ImageBufferCairo.cpp:
402         (WebCore::ImageBuffer::drawPattern):
403         * platform/graphics/cairo/ImageCairo.cpp:
404         (WebCore::Image::drawPattern):
405
406 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
407
408         Fix iOS and Efl builds.
409
410         * platform/graphics/NamedImageGeneratedImage.cpp:
411         (WebCore::NamedImageGeneratedImage::drawPattern):
412
413 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
414
415         Remove Image::spaceSize() and ImageBuffer::spaceSize()
416         https://bugs.webkit.org/show_bug.cgi?id=150064
417
418         Reviewed by Tim Horton.
419
420         Image spacing when tiled should not be a property of the image; but a description
421         of how it's drawn, like tile size. So remove spacing from Image and ImageBuffer,
422         and pass it in as an argument.
423
424         * platform/graphics/BitmapImage.cpp:
425         (WebCore::BitmapImage::drawPattern):
426         * platform/graphics/BitmapImage.h:
427         * platform/graphics/CrossfadeGeneratedImage.cpp:
428         (WebCore::CrossfadeGeneratedImage::drawPattern):
429         * platform/graphics/CrossfadeGeneratedImage.h:
430         * platform/graphics/GeneratedImage.h:
431         * platform/graphics/GradientImage.cpp:
432         (WebCore::GradientImage::drawPattern):
433         * platform/graphics/GradientImage.h:
434         * platform/graphics/GraphicsContext.cpp:
435         (WebCore::GraphicsContext::drawTiledImage):
436         * platform/graphics/GraphicsContext.h:
437         * platform/graphics/Image.cpp:
438         (WebCore::Image::drawTiled):
439         * platform/graphics/Image.h:
440         (WebCore::Image::spaceSize): Deleted.
441         (WebCore::Image::setSpaceSize): Deleted.
442         * platform/graphics/ImageBuffer.h:
443         (WebCore::ImageBuffer::spaceSize): Deleted.
444         (WebCore::ImageBuffer::setSpaceSize): Deleted.
445         * platform/graphics/NamedImageGeneratedImage.cpp:
446         (WebCore::NamedImageGeneratedImage::drawPattern):
447         * platform/graphics/NamedImageGeneratedImage.h:
448         * platform/graphics/cg/ImageBufferCG.cpp:
449         (WebCore::ImageBuffer::copyImage):
450         (WebCore::ImageBuffer::drawPattern):
451         * platform/graphics/cg/ImageCG.cpp:
452         (WebCore::Image::drawPattern):
453         * rendering/RenderBoxModelObject.cpp:
454         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
455         * svg/graphics/SVGImage.cpp:
456         (WebCore::SVGImage::drawPatternForContainer):
457         * svg/graphics/SVGImage.h:
458         * svg/graphics/SVGImageForContainer.cpp:
459         (WebCore::SVGImageForContainer::drawPattern):
460         * svg/graphics/SVGImageForContainer.h:
461
462 2015-10-12  Andreas Kling  <akling@apple.com>
463
464         Have TransformState::mappedSecondaryQuad() return an Optional<FloatQuad>.
465         <https://webkit.org/b/150057>
466
467         Reviewed by Simon Fraser.
468
469         Using Optional instead of std::unique_ptr allows us to signal the absence of a
470         secondary quad without incurring a heap allocation in cases where one is present.
471
472         This dodges ~132000 malloc/free pairs on loading thelocal.se
473
474         * platform/graphics/ca/GraphicsLayerCA.cpp:
475         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
476         * platform/graphics/transforms/TransformState.cpp:
477         (WebCore::TransformState::mappedSecondaryQuad):
478         * platform/graphics/transforms/TransformState.h:
479
480 2015-10-12  Brady Eidson  <beidson@apple.com>
481
482         Followup to:
483         Modern IDB: Start version change transaction for connections to new database.
484         https://bugs.webkit.org/show_bug.cgi?id=150033
485
486         Reviewed by NOBODY (Fixing existing test flakiness)
487
488         No new tests (Covered by existing tests)
489
490         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
491         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Early return if a version change transaction
492           is already in progress.
493
494 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
495
496         [Font Features] Tiny cleanup regarding FontCascade::typesettingFeatures()
497         https://bugs.webkit.org/show_bug.cgi?id=150051
498
499         Reviewed by Simon Fraser.
500
501         There are no typesetting features which aren't kerning nor ligatures.
502
503         No new tests because there is no behavior difference.
504
505         * platform/graphics/FontCascade.cpp:
506         (WebCore::FontCascade::codePath):
507         * platform/graphics/WidthIterator.h:
508         (WebCore::WidthIterator::supportsTypesettingFeatures): Deleted.
509
510 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
511
512         Add a CGContextStateSaver and use it
513         https://bugs.webkit.org/show_bug.cgi?id=150049
514
515         Reviewed by Tim Horton.
516
517         Add a stack-based graphics state save/restore class for CGContext,
518         like the one we have for GraphicsContext, and use it in GraphicsContextCG.
519         
520         * platform/graphics/cg/GraphicsContextCG.cpp:
521         (WebCore::GraphicsContext::drawNativeImage):
522         (WebCore::GraphicsContext::drawLine):
523         (WebCore::GraphicsContext::drawJoinedLines):
524         (WebCore::GraphicsContext::fillPath):
525         (WebCore::GraphicsContext::strokePath):
526         (WebCore::GraphicsContext::fillRect):
527         (WebCore::GraphicsContext::platformFillRoundedRect):
528         (WebCore::GraphicsContext::fillRectWithRoundedHole):
529         (WebCore::GraphicsContext::strokeRect):
530         * platform/graphics/cg/GraphicsContextCG.h:
531         (WebCore::CGContextStateSaver::CGContextStateSaver):
532         (WebCore::CGContextStateSaver::~CGContextStateSaver):
533         (WebCore::CGContextStateSaver::save):
534         (WebCore::CGContextStateSaver::restore):
535
536 2015-10-12  Zalan Bujtas  <zalan@apple.com>
537
538         display: table-cell; bug when resizing window
539         https://bugs.webkit.org/show_bug.cgi?id=138167
540
541         Reviewed by David Hyatt.
542
543         Clean up anonymous table wrappers all the way up to RenderTable.
544         This patch ensures that we don't keep the generated RenderTable/RenderSection/RenderCaption/RenderRow
545         objects around in the tree anymore when the last child is destroyed.
546
547         Import W3C CSS2.1 anonymous table tests.
548
549         * rendering/RenderObject.cpp:
550         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
551
552 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
553
554         REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
555         https://bugs.webkit.org/show_bug.cgi?id=150006
556
557         Reviewed by Simon Fraser.
558
559         When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
560         GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
561         of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
562         thereby showing garbage glyphs.
563
564         However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
565         the first place.
566
567         Test: fast/text/undefined-glyph-with-ligature.html
568
569         * platform/graphics/GlyphBuffer.h:
570         (WebCore::GlyphBuffer::copyItem):
571         (WebCore::GlyphBuffer::swap):
572         * platform/graphics/WidthIterator.cpp:
573         (WebCore::WidthIterator::applyFontTransforms):
574
575 2015-10-12  Antoine Quint  <graouts@apple.com>
576
577         [SVG] Handle endEvent for svg animations
578         https://bugs.webkit.org/show_bug.cgi?id=121587
579
580         Reviewed by Dean Jackson.
581
582         Add support for the "endEvent" SVG event triggered when an animation completes, as
583         specified in http://www.w3.org/TR/SMIL3/smil-timing.html#q135. This event doesn't
584         bubble and can't be canceled. Added test coverage for the event through the DOM
585         Events API as well as the declarative SMIL Animation syntax.
586
587         Adapted from a Chromium patch by pavan.e@samsung.com
588         https://chromium.googlesource.com/chromium/blink/+/4d415ca0268231aa80e3552fe21bf3480a6978f8
589
590         Tests: svg/animations/end-event-declarative-expected.svg
591                svg/animations/end-event-declarative.svg
592                svg/animations/end-event-script-expected.svg
593                svg/animations/end-event-script.svg
594
595         * svg/animation/SMILTimeContainer.cpp:
596         (WebCore::SMILTimeContainer::updateAnimations):
597         * svg/animation/SVGSMILElement.cpp:
598         (WebCore::smilEndEventSender):
599         (WebCore::SVGSMILElement::~SVGSMILElement):
600         (WebCore::SVGSMILElement::progress):
601         (WebCore::SVGSMILElement::dispatchPendingEvent):
602         * svg/animation/SVGSMILElement.h:
603         (WebCore::SVGSMILElement::hasConditionsConnected):
604
605 2015-10-12  Per Arne Vollan  <peavo@outlook.com>
606
607         [Curl] Increase limit of parallel network requests.
608         https://bugs.webkit.org/show_bug.cgi?id=150035
609
610         Reviewed by Alex Christensen.
611
612         If the limit is too low, other network requests will often be blocked until
613         active requests finishes. This can affect performance in a negative way.
614
615         * platform/network/curl/ResourceHandleManager.cpp:
616
617 2015-10-12  Brady Eidson  <beidson@apple.com>
618
619         Modern IDB: Start version change transaction for connections to new database.
620         https://bugs.webkit.org/show_bug.cgi?id=150033
621
622         Reviewed by Alex Christensen.
623
624         No new tests (Covered by changes to existing tests).
625
626         * CMakeLists.txt:
627         * Modules/indexeddb/IDBDatabase.h:
628         
629         * Modules/indexeddb/client/IDBAnyImpl.cpp:
630         (WebCore::IDBClient::IDBAny::IDBAny):
631         (WebCore::IDBClient::IDBAny::~IDBAny):
632         (WebCore::IDBClient::IDBAny::idbDatabase):
633         (WebCore::IDBClient::IDBAny::domStringList):
634         (WebCore::IDBClient::IDBAny::idbCursor):
635         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
636         (WebCore::IDBClient::IDBAny::idbFactory):
637         (WebCore::IDBClient::IDBAny::idbIndex):
638         (WebCore::IDBClient::IDBAny::idbObjectStore):
639         (WebCore::IDBClient::IDBAny::idbTransaction):
640         (WebCore::IDBClient::IDBAny::scriptValue):
641         (WebCore::IDBClient::IDBAny::integer):
642         (WebCore::IDBClient::IDBAny::string):
643         (WebCore::IDBClient::IDBAny::keyPath):
644         * Modules/indexeddb/client/IDBAnyImpl.h:
645         (WebCore::IDBClient::IDBAny::create):
646         
647         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
648         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
649         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
650         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
651         * Modules/indexeddb/client/IDBConnectionToServer.h:
652         
653         * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
654         (WebCore::IDBClient::IDBDatabase::create):
655         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
656         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
657         (WebCore::IDBClient::IDBDatabase::name):
658         (WebCore::IDBClient::IDBDatabase::version):
659         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
660         (WebCore::IDBClient::IDBDatabase::createObjectStore):
661         (WebCore::IDBClient::IDBDatabase::transaction):
662         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
663         (WebCore::IDBClient::IDBDatabase::close):
664         (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
665         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
666         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
667         * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
668         (WebCore::IDBClient::IDBDatabase::info):
669         
670         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
671         (WebCore::IDBClient::IDBOpenDBRequest::onError):
672         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
673         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
674         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
675         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
676         
677         * Modules/indexeddb/client/IDBRequestImpl.cpp:
678         (WebCore::IDBClient::IDBRequest::IDBRequest):
679         (WebCore::IDBClient::IDBRequest::result):
680         (WebCore::IDBClient::IDBRequest::source):
681         (WebCore::IDBClient::IDBRequest::transaction):
682         * Modules/indexeddb/client/IDBRequestImpl.h:
683         (WebCore::IDBClient::IDBRequest::connection):
684         
685         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
686         (WebCore::IDBClient::IDBTransaction::create):
687         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
688         (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
689         (WebCore::IDBClient::IDBTransaction::mode):
690         (WebCore::IDBClient::IDBTransaction::db):
691         (WebCore::IDBClient::IDBTransaction::error):
692         (WebCore::IDBClient::IDBTransaction::objectStore):
693         (WebCore::IDBClient::IDBTransaction::abort):
694         (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
695         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
696         * Modules/indexeddb/client/IDBTransactionImpl.h:
697         (WebCore::IDBClient::IDBTransaction::info):
698         
699         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
700         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
701         (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
702         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
703         (WebCore::IDBClient::IDBVersionChangeEvent::create):
704         
705         * Modules/indexeddb/legacy/LegacyDatabase.h:
706         
707         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
708         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
709         * Modules/indexeddb/server/IDBConnectionToClient.h:
710         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
711         
712         * Modules/indexeddb/server/IDBServer.cpp:
713         (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
714         (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
715         (WebCore::IDBServer::IDBServer::deleteDatabase):
716         * Modules/indexeddb/server/IDBServer.h:
717         
718         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
719         (WebCore::IDBServer::UniqueIDBDatabase::info):
720         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
721         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
722         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
723         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
724         (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
725         * Modules/indexeddb/server/UniqueIDBDatabase.h:
726         
727         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
728         (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
729         (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
730         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
731         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
732         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
733
734         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
735         (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
736         (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
737         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
738         (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
739         
740         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
741         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
742         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
743         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
744         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
745         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
746         
747         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
748         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
749         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
750         (WebCore::IDBDatabaseInfo::name):
751         (WebCore::IDBDatabaseInfo::version):
752         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
753         
754         * Modules/indexeddb/shared/IDBError.h:
755         
756         * Modules/indexeddb/shared/IDBRequestData.cpp:
757         (WebCore::IDBRequestData::IDBRequestData):
758         (WebCore::IDBRequestData::requestedVersion):
759         * Modules/indexeddb/shared/IDBRequestData.h:
760         
761         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
762         (WebCore::nextClientResourceNumber):
763         (WebCore::nextServerResourceNumber):
764         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
765         (WebCore::IDBResourceIdentifier::emptyValue):
766         (WebCore::IDBResourceIdentifier::deletedValue):
767         (WebCore::nextResourceNumber): Deleted.
768         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
769         
770         * Modules/indexeddb/shared/IDBResultData.cpp:
771         (WebCore::IDBResultData::IDBResultData):
772         (WebCore::IDBResultData::error):
773         (WebCore::IDBResultData::openDatabaseSuccess):
774         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
775         (WebCore::IDBResultData::databaseInfo):
776         (WebCore::IDBResultData::transactionInfo):
777         * Modules/indexeddb/shared/IDBResultData.h:
778         (WebCore::IDBResultData::type):
779         (WebCore::IDBResultData::databaseConnectionIdentifier):
780         
781         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
782         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
783         (WebCore::IDBTransactionInfo::versionChange):
784         (WebCore::IDBTransactionInfo::isolatedCopy):
785         * Modules/indexeddb/shared/IDBTransactionInfo.h:
786         (WebCore::IDBTransactionInfo::identifier):
787         (WebCore::IDBTransactionInfo::mode):
788         (WebCore::IDBTransactionInfo::newVersion):
789         
790         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
791         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
792         * Modules/indexeddb/shared/InProcessIDBServer.h:
793         
794         * WebCore.xcodeproj/project.pbxproj:
795         
796         * platform/CrossThreadCopier.cpp:
797         (WebCore::IDBTransactionInfo>::copy):
798         * platform/CrossThreadCopier.h:
799
800 2015-10-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
801
802         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
803         https://bugs.webkit.org/show_bug.cgi?id=149901
804         <rdar://problem/21995596>
805
806         Reviewed by Darin Adler.
807
808         The nine-pieces algorithm should be applied to the border-image regardless
809         whether the image has an intrinsic size or not. It is not guaranteed to have
810         a meaningful border-image in all the cases of non-intrinsic size images. But
811         it should work as expected in most of the cases. 
812
813         * rendering/RenderBoxModelObject.cpp:
814         * rendering/RenderBoxModelObject.h:
815         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
816         Revert the changes which were added to return whether the image has
817         intrinsic size or not.
818         
819         (WebCore::RenderBoxModelObject::calculateFillTileSize):
820         (WebCore::RenderBoxModelObject::paintNinePieceImage):
821         Size of the image is now the return value of calculateImageIntrinsicDimensions().
822         
823         * rendering/RenderListMarker.cpp:
824         (WebCore::RenderListMarker::updateContent):
825         * rendering/shapes/ShapeOutsideInfo.cpp:
826         (WebCore::ShapeOutsideInfo::createShapeForImage):
827         Size of the image is now the return value of calculateImageIntrinsicDimensions().
828         
829         * rendering/style/NinePieceImage.cpp:
830         * rendering/style/NinePieceImage.h:
831         (WebCore::NinePieceImage::paint):
832         Delete the logic for the non-intrinsic case. Both intrinsic and non-intrinsic
833         cases will be treated the same.
834
835         (WebCore::NinePieceImage::computeNineRects):
836         (WebCore::NinePieceImage::computeSideTileScale):
837         (WebCore::NinePieceImage::computeMiddleTileScale):
838         (WebCore::NinePieceImage::computeTileScales):
839         (WebCore::NinePieceImage::computeIntrinsicRects): Deleted.
840         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Deleted.
841         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): Deleted.
842         (WebCore::NinePieceImage::computeIntrinsicTileScales): Deleted.
843         Remove *Intrinsic* from the name of the functions.
844
845         (WebCore::NinePieceImage::computeNonIntrinsicRects): Deleted.
846         (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Deleted.
847         Delete the *NonIntrinsic* functions.
848
849 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
850
851         Clip-path transitions sometimes trigger endless animation timers
852         https://bugs.webkit.org/show_bug.cgi?id=150018
853
854         Reviewed by Tim Horton.
855         
856         Transitioning -webkit-clip-path could trigger endless animation
857         timers, because when CompositeAnimation::updateTransitions() calls
858         isTargetPropertyEqual(), a false negative answer triggers canceling the
859         current transition and starting a new one over and over.
860         
861         This happened because StyleRareNonInheritedData simply tested pointer
862         equality for m_clipPath and m_shapeOutside. Both of these need to do deep
863         equality testing, requiring the implementation of operator== in BasicShapes
864         classes.
865         
866         In addition, the PropertyWrappers in CSSPropertyAnimation need equals()
867         implementations that also do more than pointer equality testing.
868
869         Tests: transitions/clip-path-transitions.html
870                transitions/shape-outside-transitions.html
871
872         * page/animation/CSSPropertyAnimation.cpp:
873         (WebCore::PropertyWrapperClipPath::equals):
874         (WebCore::PropertyWrapperShape::equals):
875         * rendering/ClipPathOperation.h:
876         * rendering/style/BasicShapes.cpp:
877         (WebCore::BasicShapeCircle::operator==):
878         (WebCore::BasicShapeEllipse::operator==):
879         (WebCore::BasicShapePolygon::operator==):
880         (WebCore::BasicShapeInset::operator==):
881         * rendering/style/BasicShapes.h:
882         (WebCore::BasicShapeCenterCoordinate::operator==):
883         (WebCore::BasicShapeRadius::operator==):
884         * rendering/style/ShapeValue.cpp:
885         (WebCore::pointersOrValuesEqual):
886         (WebCore::ShapeValue::operator==):
887         * rendering/style/ShapeValue.h:
888         (WebCore::ShapeValue::operator!=):
889         (WebCore::ShapeValue::operator==): Deleted.
890         (WebCore::ShapeValue::ShapeValue): Deleted.
891         * rendering/style/StyleRareNonInheritedData.cpp:
892         (WebCore::StyleRareNonInheritedData::operator==):
893         (WebCore::StyleRareNonInheritedData::clipPathOperationsEquivalent):
894         (WebCore::StyleRareNonInheritedData::shapeOutsideDataEquivalent):
895         * rendering/style/StyleRareNonInheritedData.h:
896
897 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
898
899         Test font-variant-* and font-feature-settings on Yosemite and Mavericks
900         https://bugs.webkit.org/show_bug.cgi?id=149778
901
902         Reviewed by Simon Fraser.
903
904         We can simply call the function which enables features on Yosemite and Mavericks.
905
906         * platform/graphics/cocoa/FontCacheCoreText.cpp:
907         (WebCore::platformFontLookupWithFamily):
908         (WebCore::fontWithFamily):
909
910 2015-10-09  Anders Carlsson  <andersca@apple.com>
911
912         Don't allow plug-ins to override image types for <embed> elements
913         https://bugs.webkit.org/show_bug.cgi?id=149979
914
915         Reviewed by Tim Horton.
916
917         Stop allowing plug-ins to take over image types for <embed> elements. We already do this
918         for <object> elements, but had to make <embed> elements exempt because of webkit.org/b/49016.
919         The QuickTime plug-in hasn't supported image types since Lion, so there's no point in keeping this code around.
920
921         * html/HTMLAppletElement.cpp:
922         (WebCore::HTMLAppletElement::HTMLAppletElement):
923         * html/HTMLEmbedElement.cpp:
924         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
925         * html/HTMLObjectElement.cpp:
926         (WebCore::HTMLObjectElement::HTMLObjectElement):
927         (WebCore::HTMLObjectElement::parametersForPlugin):
928         * html/HTMLPlugInImageElement.cpp:
929         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
930         (WebCore::HTMLPlugInImageElement::isImageType):
931         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
932         * html/HTMLPlugInImageElement.h:
933         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): Deleted.
934         * loader/EmptyClients.h:
935         * loader/FrameLoaderClient.h:
936         * loader/SubframeLoader.cpp:
937         (WebCore::SubframeLoader::resourceWillUsePlugin):
938         (WebCore::SubframeLoader::requestObject):
939         (WebCore::SubframeLoader::shouldUsePlugin):
940         * loader/SubframeLoader.h:
941
942 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
943
944         Unreviewed, fixing debug builds with Clang on Linux
945         by including the stdio.h header where it's required
946         under a debug configuration.
947
948         * page/scrolling/ScrollingStateTree.cpp:
949         (WebCore::ScrollingStateTree::ScrollingStateTree):
950         * rendering/SimpleLineLayoutFunctions.cpp:
951
952 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
953
954         Unreviewed, followup to r190643.
955
956         Inline the std::function<> constructor wrappings around lambdas
957         into a single line, instead of spanning it across four lines.
958
959         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
960         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
961         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
962         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
963         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
964         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
965         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
966         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
967         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
968         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
969         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
970         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
971         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
972         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
973         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
974         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
975         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
976         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
977         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
978         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
979         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
980         (webkitVideoSinkRender):
981         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
982         (webKitWebSrcChangeState):
983         (webKitWebSrcNeedDataCb):
984         (webKitWebSrcEnoughDataMainCb):
985         (webKitWebSrcEnoughDataCb):
986         (webKitWebSrcSeekMainCb):
987         (webKitWebSrcSeekDataCb):
988
989 2015-10-11  Brian Burg  <bburg@apple.com>
990
991         Add missing builtins files to the Xcode projects
992         https://bugs.webkit.org/show_bug.cgi?id=150015
993
994         Reviewed by Yusuke Suzuki.
995
996         * WebCore.xcodeproj/project.pbxproj:
997
998 2015-10-11  Simon Fraser  <simon.fraser@apple.com>
999
1000         Cleanup and simplification of SVG path-related classes
1001         https://bugs.webkit.org/show_bug.cgi?id=150011
1002
1003         Reviewed by Zalan Bujtas.
1004
1005         Many SVG path-related subclasses were stateful, but only because code in
1006         SVGPathUtilities kept global copies around for no reason. A microbenchmark
1007         showed that there was no benefit to keeping global singletons of SVGPathBuilder,
1008         SVGPathSegListBuilder, SVGPathByteStreamBuilder, SVGPathStringBuilder,
1009         SVGPathTraversalStateBuilder, SVGPathParser and SVGPathBlender.
1010         
1011         Making these classes not be re-usable makes the code much simpler, allowing
1012         their SVGPathSources, SVGPathConsumers, SVGPathByteStream etc. to be stored
1013         by reference, and eliminating the cleanup() function which created annoying
1014         ordering issues.
1015         
1016         Code that uses SVGPathParser and SVGPathBlender is further simplified by having
1017         these classes expose only static functions, hiding any internal statefulness.
1018
1019         * svg/SVGPathBlender.cpp: Remove the m_progress member variable and instead
1020         pass progress to the various blend functions, as we do for other blend functions.
1021         Expose two only static functions. Pointers to references.
1022         (WebCore::SVGPathBlender::addAnimatedPath):
1023         (WebCore::SVGPathBlender::blendAnimatedPath):
1024         (WebCore::SVGPathBlender::SVGPathBlender):
1025         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
1026         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
1027         (WebCore::SVGPathBlender::blendMoveToSegment):
1028         (WebCore::SVGPathBlender::blendLineToSegment):
1029         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1030         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1031         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1032         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1033         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1034         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1035         (WebCore::SVGPathBlender::blendArcToSegment):
1036         (WebCore::SVGPathBlender::cleanup): Deleted.
1037         * svg/SVGPathBlender.h: Make the constructor take a ref to the destination Path,
1038         which is stored by reference.
1039         * svg/SVGPathBuilder.cpp:
1040         (WebCore::SVGPathBuilder::SVGPathBuilder):
1041         (WebCore::SVGPathBuilder::moveTo):
1042         (WebCore::SVGPathBuilder::lineTo):
1043         (WebCore::SVGPathBuilder::curveToCubic):
1044         (WebCore::SVGPathBuilder::closePath):
1045         * svg/SVGPathBuilder.h:
1046         (WebCore::SVGPathBuilder::setCurrentPath): Deleted.
1047         * svg/SVGPathByteStreamBuilder.cpp: References, assertions removed.
1048         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
1049         * svg/SVGPathByteStreamBuilder.h:
1050         (WebCore::SVGPathByteStreamBuilder::writeType):
1051         (WebCore::SVGPathByteStreamBuilder::setCurrentByteStream): Deleted.
1052         * svg/SVGPathConsumer.h:
1053         * svg/SVGPathElement.cpp:
1054         * svg/SVGPathParser.cpp: Expose some static helper functions for parsing
1055         to byte streams and strings. References.
1056         (WebCore::SVGPathParser::parse):
1057         (WebCore::SVGPathParser::parseToByteStream):
1058         (WebCore::SVGPathParser::parseToString):
1059         (WebCore::SVGPathParser::SVGPathParser):
1060         (WebCore::SVGPathParser::parseClosePathSegment):
1061         (WebCore::SVGPathParser::parseMoveToSegment):
1062         (WebCore::SVGPathParser::parseLineToSegment):
1063         (WebCore::SVGPathParser::parseLineToHorizontalSegment):
1064         (WebCore::SVGPathParser::parseLineToVerticalSegment):
1065         (WebCore::SVGPathParser::parseCurveToCubicSegment):
1066         (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
1067         (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
1068         (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
1069         (WebCore::SVGPathParser::parseArcToSegment):
1070         (WebCore::SVGPathParser::parsePathData):
1071         (WebCore::SVGPathParser::decomposeArcToCubic):
1072         (WebCore::SVGPathParser::parsePathDataFromSource): Deleted.
1073         (WebCore::SVGPathParser::cleanup): Deleted.
1074         * svg/SVGPathParser.h:
1075         (WebCore::SVGPathParser::setCurrentConsumer): Deleted.
1076         (WebCore::SVGPathParser::setCurrentSource): Deleted.
1077         * svg/SVGPathSegListBuilder.cpp:
1078         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
1079         (WebCore::SVGPathSegListBuilder::moveTo):
1080         (WebCore::SVGPathSegListBuilder::lineTo):
1081         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
1082         (WebCore::SVGPathSegListBuilder::lineToVertical):
1083         (WebCore::SVGPathSegListBuilder::curveToCubic):
1084         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
1085         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
1086         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
1087         (WebCore::SVGPathSegListBuilder::arcTo):
1088         (WebCore::SVGPathSegListBuilder::closePath):
1089         * svg/SVGPathSegListBuilder.h:
1090         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathElement): Deleted.
1091         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegList): Deleted.
1092         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegRole): Deleted.
1093         * svg/SVGPathStringBuilder.cpp:
1094         (WebCore::SVGPathStringBuilder::cleanup): Deleted.
1095         * svg/SVGPathStringBuilder.h:
1096         * svg/SVGPathTraversalStateBuilder.cpp:
1097         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
1098         (WebCore::SVGPathTraversalStateBuilder::moveTo):
1099         (WebCore::SVGPathTraversalStateBuilder::lineTo):
1100         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
1101         (WebCore::SVGPathTraversalStateBuilder::closePath):
1102         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
1103         (WebCore::SVGPathTraversalStateBuilder::totalLength):
1104         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
1105         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): Deleted.
1106         * svg/SVGPathTraversalStateBuilder.h:
1107         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
1108         (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): Deleted.
1109         * svg/SVGPathUtilities.cpp: Remove globals accessors, making things on the stack
1110         instead. Use SVGPathParser helper functions where possible.
1111         (WebCore::buildPathFromString):
1112         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1113         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1114         (WebCore::buildPathFromByteStream):
1115         (WebCore::buildSVGPathSegListFromByteStream):
1116         (WebCore::buildStringFromByteStream):
1117         (WebCore::buildStringFromSVGPathSegList):
1118         (WebCore::buildSVGPathByteStreamFromString):
1119         (WebCore::buildAnimatedSVGPathByteStream):
1120         (WebCore::addToSVGPathByteStream):
1121         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1122         (WebCore::getTotalLengthOfSVGPathByteStream):
1123         (WebCore::getPointAtLengthOfSVGPathByteStream):
1124         (WebCore::buildStringFromPath):
1125         (WebCore::globalSVGPathBuilder): Deleted.
1126         (WebCore::globalSVGPathSegListBuilder): Deleted.
1127         (WebCore::globalSVGPathByteStreamBuilder): Deleted.
1128         (WebCore::globalSVGPathStringBuilder): Deleted.
1129         (WebCore::globalSVGPathTraversalStateBuilder): Deleted.
1130         (WebCore::globalSVGPathParser): Deleted.
1131         (WebCore::globalSVGPathBlender): Deleted.
1132         * svg/SVGPathUtilities.h:
1133         * svg/SVGToOTFFontConversion.cpp: CFFBuilder no longer inherits from SVGPathBuilder.
1134         It did nothing with the Path, re-implemented all the functions, and only made use of
1135         the m_current member var, so just make it inherit from SVGPathConsumer, and have
1136         its own m_current.
1137         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
1138
1139 2015-10-10  Antti Koivisto  <antti@apple.com>
1140
1141         Remove InsertionPoint and ContentDistributor
1142         https://bugs.webkit.org/show_bug.cgi?id=150004
1143
1144         Rubber-stamped by Sam Weinig.
1145
1146         Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.
1147
1148         * CMakeLists.txt:
1149         * WebCore.vcxproj/WebCore.vcxproj:
1150         * WebCore.xcodeproj/project.pbxproj:
1151         * css/SelectorChecker.cpp:
1152         * css/StyleResolver.cpp:
1153         * dom/ContainerNode.cpp:
1154         * dom/Element.cpp:
1155         (WebCore::shouldUseNodeRenderingTraversalSlowPath):
1156         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
1157         * dom/Node.cpp:
1158         (WebCore::Node::parentOrShadowHostElement):
1159         (WebCore::Node::insertedInto):
1160         (WebCore::Node::insertionParentForBinding): Deleted.
1161         * dom/Node.h:
1162         (WebCore::Node::isCharacterDataNode):
1163         (WebCore::Node::isFrameOwnerElement):
1164         (WebCore::Node::isPluginElement):
1165         (WebCore::Node::isImageControlsRootElement):
1166         (WebCore::Node::isImageControlsButtonElement):
1167         (WebCore::Node::isDocumentFragment):
1168         (WebCore::Node::isShadowRoot):
1169         (WebCore::Node::isInsertionPointNode): Deleted.
1170         (WebCore::Node::isInsertionPoint): Deleted.
1171         * dom/NodeRenderingTraversal.cpp:
1172         (WebCore::NodeRenderingTraversal::traverseParent):
1173         (WebCore::NodeRenderingTraversal::traverseFirstChild):
1174         (WebCore::NodeRenderingTraversal::traverseLastChild):
1175         (WebCore::NodeRenderingTraversal::traverseNextSibling):
1176         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
1177         (WebCore::NodeRenderingTraversal::parentSlow):
1178         (WebCore::NodeRenderingTraversal::nextInScope):
1179         (WebCore::NodeRenderingTraversal::previousInScope):
1180         (WebCore::NodeRenderingTraversal::parentInScope):
1181         (WebCore::NodeRenderingTraversal::lastChildInScope):
1182         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
1183         (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
1184         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
1185         (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
1186         (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
1187         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
1188         (WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.
1189         * dom/ShadowRoot.h:
1190         (WebCore::ShadowRoot::distributor): Deleted.
1191         * html/HTMLInputElement.cpp:
1192         * html/HTMLSlotElement.cpp:
1193         * html/HTMLSlotElement.h:
1194         * html/shadow/ContentDistributor.cpp: Removed.
1195         * html/shadow/ContentDistributor.h: Removed.
1196         * html/shadow/InsertionPoint.cpp: Removed.
1197         * html/shadow/InsertionPoint.h: Removed.
1198         * page/FocusController.cpp:
1199         (WebCore::FocusController::previousFocusableElement):
1200         * testing/Internals.cpp:
1201
1202 2015-10-10  Simon Fraser  <simon.fraser@apple.com>
1203
1204         Use references and more const in SVGPathUtilities
1205         https://bugs.webkit.org/show_bug.cgi?id=150007
1206
1207         Reviewed by Zalan Bujtas.
1208         
1209         SVGPathUtilities had lots of pointers whose non-nullness was asserted,
1210         little const, and was very trigger-happy with stack allocations. Clean
1211         that all up.
1212
1213         * svg/SVGAnimatedPath.cpp:
1214         (WebCore::SVGAnimatedPathAnimator::constructFromString):
1215         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
1216         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
1217         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1218         * svg/SVGPathByteStream.h:
1219         (WebCore::SVGPathByteStream::begin):
1220         (WebCore::SVGPathByteStream::end):
1221         (WebCore::SVGPathByteStream::append):
1222         * svg/SVGPathByteStreamSource.cpp:
1223         (WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
1224         * svg/SVGPathByteStreamSource.h:
1225         * svg/SVGPathElement.cpp:
1226         (WebCore::SVGPathElement::getTotalLength):
1227         (WebCore::SVGPathElement::getPointAtLength):
1228         (WebCore::SVGPathElement::getPathSegAtLength):
1229         (WebCore::SVGPathElement::parseAttribute):
1230         (WebCore::SVGPathElement::svgAttributeChanged):
1231         (WebCore::SVGPathElement::pathByteStream):
1232         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1233         (WebCore::SVGPathElement::pathSegListChanged):
1234         (WebCore::SVGPathElement::SVGPathElement): Deleted.
1235         * svg/SVGPathElement.h:
1236         * svg/SVGPathUtilities.cpp:
1237         (WebCore::globalSVGPathBuilder):
1238         (WebCore::globalSVGPathSegListBuilder):
1239         (WebCore::globalSVGPathByteStreamBuilder):
1240         (WebCore::globalSVGPathStringBuilder):
1241         (WebCore::globalSVGPathTraversalStateBuilder):
1242         (WebCore::globalSVGPathParser):
1243         (WebCore::globalSVGPathBlender):
1244         (WebCore::buildPathFromString):
1245         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1246         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1247         (WebCore::buildPathFromByteStream):
1248         (WebCore::buildSVGPathSegListFromByteStream):
1249         (WebCore::buildStringFromByteStream):
1250         (WebCore::buildStringFromSVGPathSegList):
1251         (WebCore::buildSVGPathByteStreamFromString):
1252         (WebCore::buildAnimatedSVGPathByteStream):
1253         (WebCore::addToSVGPathByteStream):
1254         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1255         (WebCore::getTotalLengthOfSVGPathByteStream):
1256         (WebCore::getPointAtLengthOfSVGPathByteStream):
1257         (WebCore::buildStringFromPath):
1258         * svg/SVGPathUtilities.h:
1259         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1260         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1261
1262 2015-10-10  Andreas Kling  <akling@apple.com>
1263
1264         Reduce pointless malloc traffic in ElementRuleCollector.
1265         <https://webkit.org/b/150003>
1266
1267         Reviewed by Antti Koivisto.
1268
1269         Don't use a unique_ptr for the m_matchedRules vector in ElementRuleCollector.
1270         This is one of our heaviest sources of transient allocations, with ~88000
1271         malloc/free pairs on loading theverge.com.
1272
1273         * css/ElementRuleCollector.cpp:
1274         (WebCore::ElementRuleCollector::addMatchedRule):
1275         (WebCore::ElementRuleCollector::clearMatchedRules):
1276         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1277         (WebCore::ElementRuleCollector::sortMatchedRules):
1278         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1279         * css/ElementRuleCollector.h:
1280         (WebCore::ElementRuleCollector::hasMatchedRules):
1281
1282 2015-10-10  Dan Bernstein  <mitz@apple.com>
1283
1284         [iOS] Remove unnecessary iOS version checks
1285         https://bugs.webkit.org/show_bug.cgi?id=150002
1286
1287         Reviewed by Alexey Proskuryakov.
1288
1289         * loader/cache/CachedFont.cpp:
1290         (WebCore::CachedFont::ensureCustomFontData):
1291         * loader/cocoa/DiskCacheMonitorCocoa.h:
1292         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
1293         * page/mac/SettingsMac.mm:
1294         (WebCore::sansSerifTraditionalHanFontFamily):
1295         (WebCore::sansSerifSimplifiedHanFontFamily):
1296         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1297         (WebCore::appendOpenTypeFeature):
1298         * platform/graphics/ios/FontCacheIOS.mm:
1299         (WebCore::getSystemFontFallbackForCharacters):
1300         (WebCore::platformLookupFallbackFont):
1301         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1302         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1303         * platform/ios/WebCoreSystemInterfaceIOS.h:
1304         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1305         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1306         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1307         * platform/ios/wak/WAKWindow.mm:
1308         (+[WAKWindow hasLandscapeOrientation]):
1309         (-[WAKWindow hostLayer]):
1310         * platform/network/cf/CookieJarCFNet.cpp:
1311         (WebCore::copyCookiesForURLWithFirstPartyURL):
1312         (WebCore::createCookies):
1313         * platform/network/mac/CertificateInfoMac.mm:
1314         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
1315         * platform/spi/cf/CFNetworkSPI.h:
1316         * platform/spi/cocoa/AVKitSPI.h:
1317         * platform/spi/cocoa/CoreTextSPI.h:
1318         * platform/spi/cocoa/NEFilterSourceSPI.h:
1319         * platform/spi/cocoa/QuartzCoreSPI.h:
1320         * platform/spi/cocoa/SecuritySPI.h:
1321         * platform/spi/ios/LaunchServicesSPI.h:
1322         * platform/spi/mac/AVFoundationSPI.h:
1323         * platform/text/TextBreakIterator.cpp:
1324         * platform/text/TextFlags.h:
1325         * platform/text/ios/LocalizedDateCache.mm:
1326         (WebCore::LocalizedDateCache::calculateMaximumWidth):
1327         * platform/text/mac/LocaleMac.mm:
1328         (WebCore::LocaleMac::LocaleMac):
1329         * rendering/RenderThemeIOS.mm:
1330         (WebCore::RenderThemeIOS::cachedSystemFontDescription):
1331         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1332         * svg/SVGToOTFFontConversion.cpp:
1333         (WebCore::SVGToOTFFontConverter::appendKERNTable):
1334         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
1335
1336 2015-10-10  Antti Koivisto  <antti@apple.com>
1337
1338         Rewrite HTMLDetailsElement using HTMLSlotElement
1339         https://bugs.webkit.org/show_bug.cgi?id=149698
1340
1341         Reviewed by Andreas Kling.
1342
1343         Use the modern Shadow DOM to implement <details> element. After this the legacy InsertionPoint and
1344         related code can be removed.
1345
1346         Based on a patch by Ryosuke.
1347
1348         * dom/Element.cpp:
1349         (WebCore::Element::childrenChanged):
1350         * dom/EventDispatcher.cpp:
1351         (WebCore::EventPath::EventPath):
1352         * dom/ShadowRoot.cpp:
1353         (WebCore::ShadowRoot::ShadowRoot):
1354         (WebCore::ShadowRoot::~ShadowRoot):
1355         (WebCore::ShadowRoot::removeAllEventListeners):
1356         (WebCore::ShadowRoot::findAssignedSlot):
1357         (WebCore::ShadowRoot::addSlotElementByName):
1358         (WebCore::ShadowRoot::removeSlotElementByName):
1359         (WebCore::ShadowRoot::invalidateSlotAssignments):
1360         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments):
1361         (WebCore::ShadowRoot::assignedNodesForSlot):
1362         * dom/ShadowRoot.h:
1363         (WebCore::ShadowRoot::create):
1364         (WebCore::ShadowRoot::distributor):
1365         (WebCore::ShadowRoot::isOrphan):
1366         * dom/SlotAssignment.cpp:
1367         (WebCore::slotNameFromAttributeValue):
1368
1369             Rename for clarity.
1370
1371         (WebCore::slotNameFromSlotAttribute):
1372
1373             SlotAssignment can now be specialized by providing function that maps from node to slot name.
1374             This is the default function that gets the name from the slot attribute.
1375
1376         (WebCore::SlotAssignment::SlotAssignment):
1377         (WebCore::SlotAssignment::findAssignedSlot):
1378
1379             Use the name mapping function.
1380             Ensure that the slots are assigned.
1381
1382         (WebCore::SlotAssignment::addSlotElementByName):
1383         (WebCore::SlotAssignment::removeSlotElementByName):
1384         (WebCore::SlotAssignment::assignedNodesForSlot):
1385         (WebCore::SlotAssignment::invalidate):
1386         (WebCore::SlotAssignment::invalidateDefaultSlot):
1387         (WebCore::SlotAssignment::resolveAllSlotElements):
1388         (WebCore::SlotAssignment::assignSlots):
1389
1390             Use the name mapping function.
1391
1392         (WebCore::SlotAssignment::assignToSlot):
1393
1394             Factor into function.
1395
1396         (WebCore::treatNullAsEmpty): Deleted.
1397         * dom/SlotAssignment.h:
1398         (WebCore::SlotAssignment::~SlotAssignment):
1399         (WebCore::SlotAssignment::defaultSlotName):
1400
1401             Add static getter for emptyAtom for clarity.
1402
1403         (WebCore::SlotAssignment::SlotAssignment): Deleted.
1404         * html/HTMLDetailsElement.cpp:
1405         (WebCore::summarySlotName):
1406         (WebCore::slotNameFunction):
1407
1408             Slot name function for <details>. It assigns the first <summary> child to the summary slot and others
1409             to the default content slot if the element is open.
1410
1411         (WebCore::HTMLDetailsElement::create):
1412         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
1413         (WebCore::HTMLDetailsElement::isActiveSummary):
1414         (WebCore::HTMLDetailsElement::parseAttribute):
1415         (WebCore::HTMLDetailsElement::toggleOpen):
1416         (WebCore::summaryQuerySelector): Deleted.
1417         (WebCore::DetailsContentElement::create): Deleted.
1418         (WebCore::DetailsSummaryElement::create): Deleted.
1419         (WebCore::HTMLDetailsElement::findMainSummary): Deleted.
1420         (WebCore::HTMLDetailsElement::childShouldCreateRenderer): Deleted.
1421         * html/HTMLDetailsElement.h:
1422         * html/HTMLSummaryElement.cpp:
1423         (WebCore::HTMLSummaryElement::create):
1424         (WebCore::HTMLSummaryElement::createElementRenderer):
1425         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
1426         (WebCore::HTMLSummaryElement::detailsElement):
1427         (WebCore::HTMLSummaryElement::isActiveSummary):
1428         (WebCore::isClickableControl):
1429         (WebCore::HTMLSummaryElement::supportsFocus):
1430         (WebCore::HTMLSummaryElement::defaultEventHandler):
1431         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
1432         (WebCore::SummaryContentElement::create): Deleted.
1433         (WebCore::HTMLSummaryElement::childShouldCreateRenderer): Deleted.
1434         (WebCore::HTMLSummaryElement::isMainSummary): Deleted.
1435         * html/HTMLSummaryElement.h:
1436         * html/shadow/DetailsMarkerControl.cpp:
1437         (WebCore::DetailsMarkerControl::rendererIsNeeded):
1438         * style/RenderTreePosition.cpp:
1439         (WebCore::RenderTreePosition::computeNextSibling):
1440
1441             Skip the verification assert for shadow host children. Getting this right requires
1442             better shadow-aware traversal code.
1443
1444         * style/StyleResolveTree.cpp:
1445         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1446         (WebCore::Style::attachChildren):
1447         (WebCore::Style::attachShadowRoot):
1448         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
1449         (WebCore::Style::attachSlotAssignees):
1450         (WebCore::Style::attachRenderTree):
1451         (WebCore::Style::detachChildren):
1452         (WebCore::Style::detachShadowRoot):
1453         (WebCore::Style::detachSlotAssignees):
1454         (WebCore::Style::detachRenderTree):
1455         (WebCore::Style::resolveChildren):
1456         (WebCore::Style::resolveSlotAssignees):
1457         (WebCore::Style::resolveTree):
1458         (WebCore::Style::attachDistributedChildren): Deleted.
1459         (WebCore::Style::detachDistributedChildren): Deleted.
1460
1461             Remove InsertionPoint related code paths.
1462
1463 2015-10-10  Andreas Kling  <akling@apple.com>
1464
1465         SerializedScriptValue should use a compact encoding for 8-bit strings.
1466         <https://webkit.org/b/149934>
1467
1468         Reviewed by Antti Koivisto.
1469
1470         We were encoding known 8-bit strings in a 16-bit format when serializing script values.
1471
1472         Extend the format to support 8-bit strings. The 8-bittiness is encoded in the highest bit
1473         of the string length. This is possible while supporting all older formats due to string
1474         lengths >= 0x7FFFFFFF being disallowed.
1475
1476         This patch knocks ~1 MB off of theverge.com, where some ad or tracker or whatever likes to
1477         do a ton of postMessage() business.
1478
1479         * bindings/js/SerializedScriptValue.cpp:
1480         (WebCore::CurrentVersion): Bump the serialization format version. Also updated the grammar
1481         comment to describe the new format. Artistic license applied in description of bitfield.
1482
1483         (WebCore::writeLittleEndianUInt16): Deleted.
1484
1485         (WebCore::CloneSerializer::serialize):
1486         (WebCore::CloneSerializer::write):
1487         (WebCore::CloneDeserializer::deserializeString):
1488         (WebCore::CloneDeserializer::readString):
1489         (WebCore::CloneDeserializer::readStringData): Support 8-bit strings. I kept the string
1490         length limit at UINT_MAX/sizeof(UChar) since the highest bit of the length is no longer
1491         available. Besides, it seems flimsy to support longer strings if they happen to have all
1492         8-bit characters.
1493
1494 2015-10-10  Dan Bernstein  <mitz@apple.com>
1495
1496         [iOS] Remove project support for iOS 8
1497         https://bugs.webkit.org/show_bug.cgi?id=149993
1498
1499         Reviewed by Alexey Proskuryakov.
1500
1501         * Configurations/WebCore.xcconfig:
1502         * Configurations/WebCoreTestSupport.xcconfig:
1503
1504 2015-10-09  Zalan Bujtas  <zalan@apple.com>
1505
1506         Check if start and end positions are still valid after updating them through VisibleSelection.
1507         https://bugs.webkit.org/show_bug.cgi?id=149982
1508
1509         Reviewed by Ryosuke Niwa.
1510
1511         This patch is required to be able to clean up anonymous tables structure.
1512         In certain edge cases, start/end positions could become nullptr after various text splitting
1513         operations. 
1514
1515         Covered by editing/execCommand/crash-137961.html
1516
1517         * editing/ApplyStyleCommand.cpp:
1518         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1519         (WebCore::ApplyStyleCommand::applyInlineStyle):
1520
1521 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1522
1523         Rename RenderObject::isRoot() to isDocumentElementRenderer()
1524         https://bugs.webkit.org/show_bug.cgi?id=149976
1525
1526         Reviewed by Zalan Bujtas.
1527
1528         RenderObject::isRoot() was confusingly named, because it returns true for
1529         the document element's renderer, not for the actual root (the RenderView).
1530         In this way it mismatched RenderLayer::isRootLayer(), which returned true
1531         for the RenderView's layer.
1532         
1533         Rename it to the more accurate isDocumentElementRenderer().
1534
1535         * dom/Node.cpp:
1536         (WebCore::Node::renderRect):
1537         * page/ios/FrameIOS.mm:
1538         (WebCore::Frame::renderRectForPoint):
1539         * rendering/RenderBlock.cpp:
1540         (WebCore::RenderBlock::paint):
1541         (WebCore::RenderBlock::isSelectionRoot):
1542         (WebCore::RenderBlock::selectionGaps):
1543         * rendering/RenderBlockFlow.cpp:
1544         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
1545         (WebCore::RenderBlockFlow::layoutBlock):
1546         (WebCore::RenderBlockFlow::requiresColumns):
1547         * rendering/RenderBox.cpp:
1548         (WebCore::RenderBox::styleWillChange):
1549         (WebCore::RenderBox::styleDidChange):
1550         (WebCore::RenderBox::updateFromStyle):
1551         (WebCore::RenderBox::paintBackground):
1552         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
1553         (WebCore::RenderBox::repaintLayerRectsForImage):
1554         (WebCore::RenderBox::computeLogicalHeight):
1555         (WebCore::RenderBox::computePercentageLogicalHeight):
1556         (WebCore::RenderBox::createsNewFormattingContext):
1557         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1558         * rendering/RenderBox.h:
1559         (WebCore::RenderBox::stretchesToViewport):
1560         * rendering/RenderBoxModelObject.cpp:
1561         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1562         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
1563         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1564         * rendering/RenderBoxModelObject.h:
1565         * rendering/RenderDeprecatedFlexibleBox.cpp:
1566         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1567         * rendering/RenderElement.cpp:
1568         (WebCore::RenderElement::styleWillChange):
1569         (WebCore::RenderElement::rendererForRootBackground):
1570         (WebCore::shouldRepaintForImageAnimation):
1571         * rendering/RenderElement.h:
1572         * rendering/RenderFlexibleBox.cpp:
1573         (WebCore::RenderFlexibleBox::layoutBlock):
1574         * rendering/RenderGrid.cpp:
1575         (WebCore::RenderGrid::layoutBlock):
1576         * rendering/RenderLayer.cpp:
1577         (WebCore::shouldSuppressPaintingLayer):
1578         (WebCore::paintForFixedRootBackground):
1579         (WebCore::RenderLayer::paintLayerContents):
1580         (WebCore::RenderLayer::calculateClipRects):
1581         * rendering/RenderLayer.h:
1582         * rendering/RenderLayerBacking.cpp:
1583         (WebCore::RenderLayerBacking::rendererBackgroundColor):
1584         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1585         * rendering/RenderLayerModelObject.cpp:
1586         (WebCore::RenderLayerModelObject::styleDidChange):
1587         * rendering/RenderObject.cpp:
1588         (WebCore::RenderObject::repaintSlowRepaintObject):
1589         (WebCore::RenderObject::offsetParent):
1590         * rendering/RenderObject.h:
1591         (WebCore::RenderObject::isDocumentElementRenderer):
1592         (WebCore::RenderObject::isRoot): Deleted.
1593         * rendering/RenderTable.cpp:
1594         (WebCore::RenderTable::paint):
1595         * rendering/svg/RenderSVGRoot.cpp:
1596         (WebCore::RenderSVGRoot::layout):
1597         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
1598         * rendering/svg/SVGRenderSupport.cpp:
1599         (WebCore::SVGRenderSupport::isOverflowHidden):
1600
1601 2015-10-09  Nan Wang  <n_wang@apple.com>
1602
1603         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan
1604         https://bugs.webkit.org/show_bug.cgi?id=148967
1605
1606         Reviewed by Chris Fleizach.
1607
1608         Added support for ARIA 1.1 table/grid related attributes. Created new attributes for mac, so
1609         VoiceOver can pick up the information and speak accordingly.
1610
1611         Test: accessibility/mac/aria-table-attributes.html
1612
1613         * accessibility/AccessibilityARIAGridCell.cpp:
1614         (WebCore::AccessibilityARIAGridCell::AccessibilityARIAGridCell):
1615         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1616         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
1617         (WebCore::AccessibilityARIAGridCell::parentRowGroup):
1618         * accessibility/AccessibilityARIAGridCell.h:
1619         * accessibility/AccessibilityObject.cpp:
1620         (WebCore::initializeRoleMap):
1621         * accessibility/AccessibilityObject.h:
1622         * accessibility/AccessibilityTable.cpp:
1623         (WebCore::AccessibilityTable::title):
1624         (WebCore::AccessibilityTable::ariaColumnCount):
1625         (WebCore::AccessibilityTable::ariaRowCount):
1626         * accessibility/AccessibilityTable.h:
1627         * accessibility/AccessibilityTableCell.cpp:
1628         (WebCore::AccessibilityTableCell::AccessibilityTableCell):
1629         (WebCore::AccessibilityTableCell::titleUIElement):
1630         (WebCore::AccessibilityTableCell::ariaColumnIndex):
1631         (WebCore::AccessibilityTableCell::ariaRowIndex):
1632         (WebCore::AccessibilityTableCell::ariaColumnSpan):
1633         (WebCore::AccessibilityTableCell::ariaRowSpan):
1634         * accessibility/AccessibilityTableCell.h:
1635         (WebCore::AccessibilityTableCell::setARIAColIndexFromRow):
1636         * accessibility/AccessibilityTableRow.cpp:
1637         (WebCore::AccessibilityTableRow::headerObject):
1638         (WebCore::AccessibilityTableRow::addChildren):
1639         (WebCore::AccessibilityTableRow::ariaColumnIndex):
1640         (WebCore::AccessibilityTableRow::ariaRowIndex):
1641         * accessibility/AccessibilityTableRow.h:
1642         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1643         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1644         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1645         * html/HTMLAttributeNames.in:
1646
1647 2015-10-09  Anders Carlsson  <andersca@apple.com>
1648
1649         Remove hack that allowed plug-ins to always take over certain image formats
1650         https://bugs.webkit.org/show_bug.cgi?id=149972
1651
1652         Reviewed by Tim Horton.
1653
1654         This hack was added 8 years ago to allow a certain plug-in to show multi-page TIFF images on uspto.gov. 
1655         We now support said TIFFs natively, and the plug-in has been discontinued so it's safe to get rid of this.
1656
1657         * loader/SubframeLoader.cpp:
1658         (WebCore::SubframeLoader::shouldUsePlugin): Deleted.
1659
1660 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1661
1662         Garbage texture data with composited table row
1663         https://bugs.webkit.org/show_bug.cgi?id=148984
1664
1665         Reviewed by Zalan Bujtas.
1666         
1667         Don't pretend to know if the layer for a table header, section or cell is
1668         opaque, since table painting is special.
1669
1670         Test: compositing/contents-opaque/table-parts.html
1671
1672         * rendering/RenderLayer.cpp:
1673         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
1674
1675 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1676
1677         Garbage pixels on enphaseenergy.com site
1678         https://bugs.webkit.org/show_bug.cgi?id=149915
1679         rdar://problem/22976184
1680
1681         Reviewed by Darin Adler.
1682         
1683         When the <html> gets a composited RenderLayer, and we ask whether its background
1684         is opaque, return false, since the document element's background propagates
1685         to the root, and is painted by the RenderView.
1686         
1687         Also improve the compositing logging to indicate when fore- and background layers
1688         are present.
1689
1690         Test: compositing/contents-opaque/negative-z-before-html.html
1691
1692         * rendering/RenderLayerBacking.cpp:
1693         (WebCore::RenderLayerBacking::updateGeometry):
1694         * rendering/RenderLayerCompositor.cpp:
1695         (WebCore::RenderLayerCompositor::logLayerInfo):
1696
1697 2015-10-09  Antoine Quint  <graouts@apple.com>
1698
1699         Dynamic background color changes do not update until a layout is forced
1700         https://bugs.webkit.org/show_bug.cgi?id=131623
1701
1702         Compute correct repaint rect for decorated RenderSVGRoots.
1703
1704         The current implementation of clippedOverflowRectForRepaint() uses the
1705         generic repaint-rect calculations in SVGRenderSupport. Those in turn make
1706         use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the
1707         union of the painted children (w/ some expansion). If there're no children,
1708         or they do not fill the entire content box, then a repaint would not
1709         repaint the correct parts.
1710         Fix by calculating the union of the border-box and the SVG content
1711         when the SVG root is decorated (has background/border/etc.)
1712
1713         Adapted from a Chromium patch by fs@opera.com
1714         https://src.chromium.org/viewvc/blink?revision=170890&view=revision
1715
1716         Reviewed by Darin Adler.
1717
1718         Tests: svg/repaint/add-background-property-on-root.html
1719                svg/repaint/add-border-property-on-root.html
1720                svg/repaint/add-outline-property-on-root.html
1721                svg/repaint/change-background-color.html
1722                svg/repaint/remove-background-property-on-root.html
1723                svg/repaint/remove-border-property-on-root.html
1724                svg/repaint/remove-outline-property-on-root.html
1725
1726         * rendering/svg/RenderSVGRoot.cpp:
1727         (WebCore::RenderSVGRoot::layout):
1728         (WebCore::RenderSVGRoot::styleDidChange):
1729         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
1730
1731 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1732
1733         [iOS WK2] Fix assertion in ViewportConfiguration::setDefaultConfiguration seen in testing
1734         https://bugs.webkit.org/show_bug.cgi?id=149959
1735
1736         Reviewed by Tim Horton.
1737
1738         When loading tests which set a flexible viewport, ViewportConfiguration::setDefaultConfiguration()
1739         is called first with testingParameters() and then with webpageParameters(). This
1740         would trigger the assertion that m_defaultConfiguration.initialScaleIsSet but
1741         the new initial scale is zero.
1742         
1743         The assertion seems wrong anyway; it's consulting m_defaultConfiguration.initialScaleIsSet
1744         but defaultConfiguration.initialScale, so fix it to test defaultConfiguration.initialScaleIsSet.
1745
1746         * page/ViewportConfiguration.cpp:
1747         (WebCore::ViewportConfiguration::setDefaultConfiguration):
1748
1749 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1750
1751         Fix the !ENABLE(STREAM_API) build after r190794
1752         https://bugs.webkit.org/show_bug.cgi?id=149955
1753
1754         Reviewed by Darin Adler.
1755
1756         * bindings/js/WebCoreJSBuiltinInternals.h:
1757         (WebCore::JSBuiltinInternalFunctions::visit):
1758         (WebCore::JSBuiltinInternalFunctions::init):
1759
1760 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1761
1762         Fix the binding generator after r190785
1763         https://bugs.webkit.org/show_bug.cgi?id=149956
1764
1765         Reviewed by Darin Adler.
1766
1767         * bindings/scripts/CodeGeneratorJS.pm:
1768         (GenerateConstructorHelperMethods):
1769         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1770         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1771         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1772         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1773         * bindings/scripts/test/JS/JSTestInterface.cpp:
1774         (WebCore::JSTestInterfaceConstructor::getConstructData):
1775         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1776         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
1777         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1778         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
1779         * bindings/scripts/test/JS/JSTestNode.cpp:
1780         (WebCore::JSTestNodeConstructor::getConstructData):
1781         * bindings/scripts/test/JS/JSTestObj.cpp:
1782         (WebCore::JSTestObjConstructor::getConstructData):
1783         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1784         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
1785         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1786         (WebCore::JSTestTypedefsConstructor::getConstructData):
1787
1788 2015-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1789
1790         Backgrounds bleed out of natively rendered text fields
1791         https://bugs.webkit.org/show_bug.cgi?id=149843
1792         <rdar://problem/22896977>
1793
1794         Reviewed by Darin Adler.
1795
1796         When natively rendering a text field with a background on Mac, the background bleeds out
1797         of the text field's border when the graphics context is scaled (as a result of a retina
1798         display or zoom/scale effects). This is because when we render the text field in bezeled
1799         style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
1800         which renders a text field that is slightly smaller than the frame. To adjust for this, we
1801         inflate the paint rect.
1802
1803         Test: fast/forms/hidpi-textfield-background-bleeding.html
1804
1805         * rendering/RenderThemeMac.mm:
1806         (WebCore::RenderThemeMac::paintTextField):
1807
1808 2015-10-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1809
1810         Refactor WebCore JS builtins to prepare for automatic generation
1811         https://bugs.webkit.org/show_bug.cgi?id=149751
1812
1813         Reviewed by Darin Adler.
1814
1815         Adding annotations to JS files to know whether they should be under a compilation flag and
1816         whether they are JS internals or JS tied to WebIDL.
1817         If a file is said as JS internals, all function names should be exported automatically.
1818         Added WebCoreJSBuiltins.h to simplify handling of builtins in JSVMClientData.
1819         Added WebCoreJSInternals.h to simplify handling of builtin private function in JSDOMWindowBase.
1820         Renamed WebCoreJSClientData to JSVMClientData.
1821
1822         Covered by existing tests.
1823
1824         * CMakeLists.txt:
1825         * Modules/streams/ByteLengthQueuingStrategy.js:
1826         * Modules/streams/CountQueuingStrategy.js:
1827         * Modules/streams/ReadableStream.js:
1828         * Modules/streams/ReadableStreamController.js:
1829         * Modules/streams/ReadableStreamInternals.js:
1830         * Modules/streams/ReadableStreamReader.js:
1831         * WebCore.order:
1832         * WebCore.xcodeproj/project.pbxproj:
1833         * bindings/js/DOMWrapperWorld.cpp:
1834         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1835         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1836         (WebCore::normalWorld):
1837         * bindings/js/JSDOMWindowBase.cpp:
1838         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1839         (WebCore::JSDOMWindowBase::finishCreation):
1840         (WebCore::JSDOMWindowBase::visitChildren):
1841         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1842         (WebCore::JSDOMWindowBase::destroy): Deleted.
1843         * bindings/js/JSDOMWindowBase.h:
1844         * bindings/js/ScriptController.cpp:
1845         (WebCore::ScriptController::getAllWorlds):
1846         * bindings/js/SerializedScriptValue.cpp:
1847         (WebCore::SerializedScriptValue::transferArrayBuffers):
1848         * bindings/js/WebCoreJSBuiltinInternals.h: Added.
1849         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
1850         (WebCore::JSBuiltinInternalFunctions::readableStreamInternals):
1851         (WebCore::JSBuiltinInternalFunctions::visit):
1852         (WebCore::JSBuiltinInternalFunctions::init):
1853         * bindings/js/WebCoreJSBuiltins.cpp:
1854         * bindings/js/WebCoreJSBuiltins.h: Added.
1855         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1856         (WebCore::JSBuiltinFunctions::byteLengthQueuingStrategyBuiltins):
1857         (WebCore::JSBuiltinFunctions::countQueuingStrategyBuiltins):
1858         (WebCore::JSBuiltinFunctions::readableStreamBuiltins):
1859         (WebCore::JSBuiltinFunctions::readableStreamControllerBuiltins):
1860         (WebCore::JSBuiltinFunctions::readableStreamInternalsBuiltins):
1861         (WebCore::JSBuiltinFunctions::readableStreamReaderBuiltins):
1862         * bindings/js/WebCoreJSClientData.h:
1863         (WebCore::JSVMClientData::JSVMClientData):
1864         (WebCore::JSVMClientData::~JSVMClientData):
1865         (WebCore::JSVMClientData::builtinFunctions):
1866         (WebCore::initNormalWorldClientData):
1867         (WebCore::JSVMClientData::normalWorld): Deleted.
1868         (WebCore::JSVMClientData::getAllWorlds): Deleted.
1869
1870 2015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1871
1872         Rationalize JSXXConstructor class definition
1873         https://bugs.webkit.org/show_bug.cgi?id=149923
1874
1875         Reviewed by Darin Adler.
1876
1877         Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
1878         as long as JSXX is constructable from JavaScript.
1879
1880         Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
1881         It is now generated and directly calls the custom constructor function.
1882
1883         getConstructData was declared conditionally with #if in case of ConstructorConditional.
1884         The #if are now within getConstructData body.
1885
1886         Covered by binding tests.
1887
1888         * bindings/scripts/CodeGeneratorJS.pm:
1889         (GenerateConstructorDeclaration):
1890         (GenerateOverloadedConstructorDefinition):
1891         (GenerateConstructorDefinition):
1892         (GenerateConstructorHelperMethods):
1893         (GenerateConstructorDefinitions):.
1894         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1895         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
1896         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1897         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
1898         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1899         (WebCore::JSTestEventConstructorConstructor::construct):
1900         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1901         * bindings/scripts/test/JS/JSTestInterface.cpp:
1902         (WebCore::JSTestInterfaceConstructor::construct):
1903         (WebCore::JSTestInterfaceConstructor::getConstructData):
1904         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1905         (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
1906         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
1907         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1908         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1909         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
1910         * bindings/scripts/test/JS/JSTestNode.cpp:
1911         (WebCore::JSTestNodeConstructor::construct):
1912         (WebCore::JSTestNodeConstructor::getConstructData):
1913         * bindings/scripts/test/JS/JSTestObj.cpp:
1914         (WebCore::JSTestObjConstructor::construct):
1915         (WebCore::JSTestObjConstructor::getConstructData):
1916         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1917         (WebCore::constructJSTestOverloadedConstructors1):
1918         (WebCore::constructJSTestOverloadedConstructors2):
1919         (WebCore::constructJSTestOverloadedConstructors3):
1920         (WebCore::constructJSTestOverloadedConstructors4):
1921         (WebCore::constructJSTestOverloadedConstructors5):
1922         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
1923         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
1924         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1925         (WebCore::JSTestTypedefsConstructor::construct):
1926         (WebCore::JSTestTypedefsConstructor::getConstructData):
1927
1928 2015-10-07  Sergio Villar Senin  <svillar@igalia.com>
1929
1930         [css-grid] Include freeSpace in GridSizingData struct
1931         https://bugs.webkit.org/show_bug.cgi?id=149876
1932
1933         Reviewed by Darin Adler.
1934
1935         During the layout process we keep the free space for rows and
1936         columns in two variables that are passed to a few methods
1937         along with the GridSizingData struct. Those two variables
1938         should clearly be part of GridSizingData as they're temporary
1939         values used just for the sake of the layout.
1940
1941         No new tests required as this is just a refactoring.
1942
1943         * rendering/RenderGrid.cpp:
1944         (WebCore::RenderGrid::GridSizingData::GridSizingData):
1945         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
1946         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1947         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1948         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
1949         (WebCore::RenderGrid::layoutGridItems):
1950         (WebCore::RenderGrid::populateGridPositions):
1951         (WebCore::contentDistributionOffset):
1952         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
1953         * rendering/RenderGrid.h:
1954
1955 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
1956
1957         [css-grid] Remove unneeded calls to compute(Content)LogicalWidth(Height)
1958         https://bugs.webkit.org/show_bug.cgi?id=149926
1959
1960         Reviewed by Darin Adler.
1961
1962         In order to resolve a Length to a LayoutUnit we need to
1963         provide a maximum value so that i.e. percentages are correctly
1964         computed. That maximum value was computeLogicalWidth() for
1965         columns and computeContentLogicalHeight() for rows. We were
1966         calling it for every single track with a definite size instead
1967         of computing it once and reusing it multiple times.
1968
1969         This brings some nice performance improvements:
1970         - 2.9%  in /Layout/fixed-grid-lots-of-data
1971         - 2.95% in /Layout/fixed-grid-lots-of-stretched-data
1972
1973         No new tests required as there is no change in functionality.
1974
1975         * rendering/RenderGrid.cpp:
1976         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1977         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
1978         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
1979         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
1980         * rendering/RenderGrid.h:
1981
1982 2015-10-08  Chris Dumez  <cdumez@apple.com>
1983
1984         Unreviewed, build fix for ENABLE(MEDIA_SESSION) after r190030.
1985
1986         * dom/Document.cpp:
1987         (WebCore::Document::updateIsPlayingMedia):
1988
1989 2015-10-08  Chris Dumez  <cdumez@apple.com>
1990
1991         Unreviewed, build fixes for ENABLE(MEDIA_SESSION) after r190030.
1992
1993         * Modules/mediasession/HTMLMediaElementMediaSession.cpp:
1994         (WebCore::HTMLMediaElementMediaSession::session):
1995         * Modules/mediasession/HTMLMediaElementMediaSession.h:
1996         * Modules/mediasession/MediaSession.cpp:
1997         (WebCore::MediaSession::controls):
1998         * Modules/mediasession/MediaSession.h:
1999
2000 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
2001
2002         Gracefully handle XMLDocumentParser being detached by mutation events.
2003         https://bugs.webkit.org/show_bug.cgi?id=149485
2004         <rdar://problem/22811489>
2005
2006         This is a merge of Blink change 200026,
2007         https://codereview.chromium.org/1267283002
2008
2009         Reviewed by Darin Adler.
2010
2011         Test: fast/parser/xhtml-dom-character-data-modified-crash.html
2012
2013         * xml/parser/XMLDocumentParser.cpp:
2014         (WebCore::XMLDocumentParser::createLeafTextNode):
2015         Renamed from enterText() to make it more descriptive. 
2016
2017         (WebCore::XMLDocumentParser::updateLeafTextNode):
2018         Renamed from exitText to firm up this stage.
2019
2020         (WebCore::XMLDocumentParser::end):
2021         Gracefully handle stopped states.
2022
2023         (WebCore::XMLDocumentParser::enterText): Deleted.
2024         (WebCore::XMLDocumentParser::exitText): Deleted.
2025
2026         * xml/parser/XMLDocumentParser.h:
2027         Rename enterText to createLeafTextNode.
2028         Rename exitText to updateLeafTextNode.
2029
2030         * xml/parser/XMLDocumentParserLibxml2.cpp:
2031         (WebCore::XMLDocumentParser::startElementNs):
2032         (WebCore::XMLDocumentParser::endElementNs):
2033         (WebCore::XMLDocumentParser::characters):
2034         (WebCore::XMLDocumentParser::processingInstruction):
2035         (WebCore::XMLDocumentParser::cdataBlock):
2036         (WebCore::XMLDocumentParser::comment):
2037         (WebCore::XMLDocumentParser::endDocument):
2038         Rename function calls and firm up updateLeafTextNode stage accordingly.
2039
2040 2015-10-08  Chris Dumez  <cdumez@apple.com>
2041
2042         data: URLs should not be preloaded
2043         https://bugs.webkit.org/show_bug.cgi?id=149829
2044
2045         Reviewed by Darin Adler.
2046
2047         Fix review comments after r190605:
2048         Use protocolIs() instead of String::startsWith().
2049
2050         * html/parser/HTMLPreloadScanner.cpp:
2051         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
2052
2053 2015-10-08  Chris Dumez  <cdumez@apple.com>
2054
2055         Revert r187626 (and r188025) as it caused a PLT regression
2056         https://bugs.webkit.org/show_bug.cgi?id=149898
2057         <rdar://problem/22657123>
2058
2059         Reviewed by Myles Maxfield.
2060
2061         * css/CSSPropertyNames.in:
2062         * css/StyleBuilderCustom.h:
2063         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
2064         * platform/graphics/Font.cpp:
2065         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2066         (WebCore::CharacterFallbackMapKey::operator==):
2067         (WebCore::CharacterFallbackMapKeyHash::hash):
2068         (WebCore::Font::systemFallbackFontForCharacter):
2069         * platform/graphics/FontCache.h:
2070         (WebCore::FontDescriptionKey::operator==):
2071         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
2072         (WebCore::FontDescriptionKey::computeHash): Deleted.
2073         * platform/graphics/FontDescription.cpp:
2074         (WebCore::FontDescription::FontDescription):
2075         (WebCore::FontDescription::traitsMask): Deleted.
2076         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
2077         * platform/graphics/FontDescription.h:
2078         (WebCore::FontDescription::setScript):
2079         (WebCore::FontDescription::operator==):
2080         (WebCore::FontDescription::setFeatureSettings): Deleted.
2081         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
2082         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2083         (WebCore::FontCache::systemFallbackForCharacters):
2084         * rendering/style/RenderStyle.cpp:
2085         (WebCore::RenderStyle::changeRequiresLayout):
2086         * rendering/style/RenderStyle.h:
2087         * rendering/style/StyleRareInheritedData.cpp:
2088         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2089         (WebCore::StyleRareInheritedData::operator==):
2090         * rendering/style/StyleRareInheritedData.h:
2091         * style/StyleResolveForDocument.cpp:
2092         (WebCore::Style::resolveForDocument):
2093
2094 2015-10-08  Andreas Kling  <akling@apple.com>
2095
2096         Generated frame tree names should be kept reasonably long.
2097         <https://webkit.org/b/149874>
2098
2099         Reviewed by Darin Adler.
2100
2101         Some clumsy advertising script is going around assigning JavaScript source code
2102         to the "name" attribute of iframes. This is causing WebKit to generate way too huge
2103         names for anonymous descendants of such iframes.
2104
2105         Previously, the generated name of an anonymous subframe would be its slash-separated
2106         path from the root frame, with the "name" attribute of each ancestor between the
2107         slashes, or "<!--frame${index in parent}-->" for anonymous ancestors.
2108
2109         These ad scripts are often over 100kB in size, with multiple subframes, so we'd end
2110         up with frame names looking like this:
2111
2112         "<!--framePath //<MONSTER BLOB OF JAVASCRIPT FROM HELL>/<!--frame0--><!--frame0-->-->"
2113
2114         While this is worth fixing for the memory usage alone, we've been making it way
2115         worse by also using these paths when recording the back/forward history parts of
2116         WebKit session state.
2117
2118         This patch makes generated paths always use index-in-parent as the "directory name"
2119         for ancestors of anonymous subframes. The above example path will now instead be:
2120
2121         "<!--framePath //<!--frame0-->/<!--frame0-->/<!--frame0-->-->"
2122
2123         Test: fast/frames/long-names-in-nested-subframes.html
2124
2125         * page/FrameTree.cpp:
2126         (WebCore::FrameTree::indexInParent):
2127         (WebCore::FrameTree::uniqueChildName):
2128         * page/FrameTree.h:
2129
2130 2015-10-08  Commit Queue  <commit-queue@webkit.org>
2131
2132         Unreviewed, rolling out r190701.
2133         https://bugs.webkit.org/show_bug.cgi?id=149937
2134
2135         "It did not help, will try a full roll out instead" (Requested
2136         by cdumez on #webkit).
2137
2138         Reverted changeset:
2139
2140         "Partial revert of r187626 as it caused a PLT regression"
2141         https://bugs.webkit.org/show_bug.cgi?id=149898
2142         http://trac.webkit.org/changeset/190701
2143
2144 2015-10-08  Zalan Bujtas  <zalan@apple.com>
2145
2146         Fallback to the RenderView when repaint container is null.
2147         https://bugs.webkit.org/show_bug.cgi?id=149903
2148
2149         Reviewed by Simon Fraser.
2150
2151         Reduces code complexity at the calling sites.
2152
2153         No change in functionality.
2154
2155         * rendering/RenderObject.cpp:
2156         (WebCore::RenderObject::repaintUsingContainer):
2157         (WebCore::RenderObject::repaint):
2158         (WebCore::RenderObject::repaintRectangle):
2159
2160 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
2161
2162         Add NULL check for renderBox::layer() on applying zoom level change
2163         https://bugs.webkit.org/show_bug.cgi?id=149302
2164         <rdar://problem/22747292>
2165
2166         Reviewed by Darin Adler.
2167
2168         Test: fast/css/zoom-on-nested-scroll-crash.html
2169
2170         This is a merge of Blink r158238:
2171         https://chromiumcodereview.appspot.com/23526081
2172
2173         * rendering/RenderBox.cpp:
2174         (WebCore::RenderBox::styleDidChange):
2175
2176 2015-10-08  Brady Eidson  <beidson@apple.com>
2177
2178         Update Inspector to only work with Legacy IDB (for now).
2179         https://bugs.webkit.org/show_bug.cgi?id=149928.
2180
2181         Reviewed by Tim Horton.
2182
2183         * Modules/indexeddb/IDBAny.h:
2184         (WebCore::IDBAny::isLegacy):
2185         
2186         * Modules/indexeddb/legacy/LegacyAny.h:
2187         * inspector/InspectorIndexedDBAgent.cpp:
2188
2189 2015-10-08  Antti Koivisto  <antti@apple.com>
2190
2191         CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::SelectorChecker::checkScrollbarPseudoClass const + 217
2192         https://bugs.webkit.org/show_bug.cgi?id=149921
2193         rdar://problem/22731359
2194
2195         Reviewed by Andreas Kling.
2196
2197         Test: svg/css/use-window-inactive-crash.html
2198
2199         * css/SelectorCheckerTestFunctions.h:
2200         (WebCore::isWindowInactive):
2201
2202             Null check page.
2203
2204 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2205
2206         Format string issues in LegacyRequest.cpp
2207         https://bugs.webkit.org/show_bug.cgi?id=149866
2208
2209         Reviewed by Csaba Osztrogonác.
2210
2211         Cast enums to ints before printing them to placate GCC's -Wformat.
2212
2213         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2214         (WebCore::LegacyRequest::dispatchEvent):
2215         (WebCore::LegacyRequest::enqueueEvent):
2216
2217 2015-10-08  Commit Queue  <commit-queue@webkit.org>
2218
2219         Unreviewed, rolling out r190716.
2220         https://bugs.webkit.org/show_bug.cgi?id=149924
2221
2222         broke mac build from time to time (Requested by youenn on
2223         #webkit).
2224
2225         Reverted changeset:
2226
2227         "Automate WebCore JS builtins generation and build system"
2228         https://bugs.webkit.org/show_bug.cgi?id=149751
2229         http://trac.webkit.org/changeset/190716
2230
2231 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
2232
2233         [css-grid] Percentages of indefinite sizes to be resolved as auto
2234         https://bugs.webkit.org/show_bug.cgi?id=149810
2235
2236         Reviewed by Darin Adler.
2237
2238         Specs mention that percentages in grid track sizes must be
2239         resolved as 'auto' if the grid container has an indefinite
2240         size in the corresponding axis.
2241
2242         The 'auto' keyword used to be resolved as
2243         minmax(min-content,max-content) but since r189911 it's
2244         resolved as minmax(auto,auto). Updated the implementation so
2245         we properly resolve those percentages.
2246
2247         No new tests as the behavior does not change at all. That's
2248         because 'auto' as min-track sizing function is the same as
2249         min-content (unless we have a specified value for
2250         min-{width|height}, but those cases were already handled in the
2251         code), and as a max sizing function is works as max-content.
2252
2253         * rendering/RenderGrid.cpp:
2254         (WebCore::RenderGrid::gridTrackSize):
2255
2256 2015-10-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2257
2258         Automate WebCore JS builtins generation and build system
2259         https://bugs.webkit.org/show_bug.cgi?id=149751
2260
2261         Reviewed by Darin Adler.
2262
2263         Adding annotations to JS files to know whether they should be under a compilation flag and
2264         whether they are JS internals or JS tied to WebIDL.
2265         If a file is said as JS internals, all function names are exported automatically.
2266         Added auto generation of WebCoreJSBuiltins.cpp
2267         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
2268         WebCoreJSClientData as wrapper for builtins.
2269         Added auto generation of WebCoreJSBuiltinInternals.h which contain a wrapper around all private functions, used by
2270         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
2271         Renamed WebCoreJSClientData to JSVMClientData.
2272
2273         The remaining manual part for private functions is the pairing between private identifiers and
2274         the private JS functions within JSDOMWindowBase::finishCreation.
2275
2276         Covered by existing tests.
2277
2278         * CMakeLists.txt:
2279         * DerivedSources.make:
2280         * Modules/streams/ByteLengthQueuingStrategy.js:
2281         * Modules/streams/CountQueuingStrategy.js:
2282         * Modules/streams/ReadableStream.js:
2283         * Modules/streams/ReadableStreamInternals.js:
2284         * WebCore.order:
2285         * WebCore.vcxproj/WebCore.vcxproj:
2286         * WebCore.xcodeproj/project.pbxproj:
2287         * bindings/js/DOMWrapperWorld.cpp:
2288         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
2289         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
2290         (WebCore::normalWorld):
2291         * bindings/js/JSDOMWindowBase.cpp:
2292         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2293         (WebCore::JSDOMWindowBase::finishCreation):
2294         (WebCore::JSDOMWindowBase::visitChildren):
2295         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2296         * bindings/js/JSDOMWindowBase.h:
2297         * bindings/js/ScriptController.cpp:
2298         (WebCore::ScriptController::getAllWorlds):
2299         * bindings/js/SerializedScriptValue.cpp:
2300         (WebCore::SerializedScriptValue::transferArrayBuffers):
2301         * bindings/js/WebCoreJSClientData.h:
2302         (WebCore::JSClientData::JSClientData):
2303         (WebCore::JSClientData::~JSClientData):
2304         (WebCore::JSClientData::builtinFunctions):
2305         (WebCore::initNormalWorldClientData):
2306         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
2307         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
2308         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
2309         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
2310         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
2311         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
2312         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
2313         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
2314         * generate-js-builtins-allinone: Added.
2315         (retrieveGenerationParameters):
2316         (retrieveFilesWithParameters):
2317         (retrieveFilesWithParameters.FileInput):
2318         (writeConditional):
2319         (JSBuiltinFunctions):
2320         (Private):
2321         (JSBuiltinInternalFunctions):
2322         (copytempfile):
2323
2324 2015-10-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2325
2326         Binding generated JS constructors should use GlobalObject references
2327         https://bugs.webkit.org/show_bug.cgi?id=149872
2328
2329         Reviewed by Darin Adler.
2330
2331         Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references.
2332         Updated WebCore JS binding layer accordingly.
2333
2334         Covered by updated binding tests.
2335
2336         * bindings/js/DOMConstructorWithDocument.h:
2337         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
2338         (WebCore::DOMConstructorWithDocument::finishCreation):
2339         * bindings/js/JSDOMBinding.cpp:
2340         (WebCore::getCachedDOMStructure):
2341         (WebCore::cacheDOMStructure):
2342         * bindings/js/JSDOMBinding.h:
2343         (WebCore::DOMConstructorObject::DOMConstructorObject):
2344         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
2345         (WebCore::getDOMStructure):
2346         (WebCore::deprecatedGetDOMStructure):
2347         (WebCore::getDOMPrototype):
2348         (WebCore::createJSBuiltin):
2349         (WebCore::createWrapper):
2350         * bindings/js/JSDOMConstructor.h:
2351         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
2352         * bindings/js/JSDOMGlobalObject.h:
2353         (WebCore::getDOMConstructor):
2354         * bindings/js/JSDOMWindowCustom.cpp:
2355         (WebCore::JSDOMWindow::image):
2356         (WebCore::JSDOMWindow::touch):
2357         (WebCore::JSDOMWindow::touchList):
2358         * bindings/js/JSDOMWrapper.h:
2359         (WebCore::JSDOMWrapper::JSDOMWrapper):
2360         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
2361         * bindings/js/JSImageConstructor.cpp:
2362         (WebCore::JSImageConstructor::JSImageConstructor):
2363         (WebCore::JSImageConstructor::finishCreation):
2364         * bindings/js/JSImageConstructor.h:
2365         (WebCore::JSImageConstructor::create):
2366         (WebCore::JSImageConstructor::createStructure):
2367         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2368         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject):
2369         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject):
2370         * bindings/scripts/CodeGeneratorJS.pm:
2371         (GenerateHeader):
2372         (GenerateImplementation):
2373         (GenerateCallbackImplementation):
2374         (GenerateConstructorDeclaration):
2375         (GenerateConstructorHelperMethods):
2376         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2377         (WebCore::JSTestActiveDOMObjectConstructor::create):
2378         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
2379         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
2380         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2381         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
2382         (WebCore::JSTestActiveDOMObject::getConstructor):
2383         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2384         (WebCore::JSTestActiveDOMObject::create):
2385         * bindings/scripts/test/JS/JSTestCallback.cpp:
2386         (WebCore::JSTestCallbackConstructor::create):
2387         (WebCore::JSTestCallbackConstructor::createStructure):
2388         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
2389         (WebCore::JSTestCallback::getConstructor):
2390         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2391         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2392         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
2393         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
2394         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2395         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
2396         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
2397         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2398         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
2399         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2400         (WebCore::JSTestCustomNamedGetterConstructor::create):
2401         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
2402         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
2403         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2404         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
2405         (WebCore::JSTestCustomNamedGetter::getConstructor):
2406         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2407         (WebCore::JSTestCustomNamedGetter::create):
2408         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2409         (WebCore::JSTestEventConstructorConstructor::create):
2410         (WebCore::JSTestEventConstructorConstructor::createStructure):
2411         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
2412         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2413         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
2414         (WebCore::JSTestEventConstructor::getConstructor):
2415         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2416         (WebCore::JSTestEventConstructor::create):
2417         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2418         (WebCore::JSTestEventTargetConstructor::create):
2419         (WebCore::JSTestEventTargetConstructor::createStructure):
2420         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
2421         (WebCore::JSTestEventTargetConstructor::finishCreation):
2422         (WebCore::JSTestEventTarget::JSTestEventTarget):
2423         (WebCore::JSTestEventTarget::getConstructor):
2424         * bindings/scripts/test/JS/JSTestEventTarget.h:
2425         (WebCore::JSTestEventTarget::create):
2426         * bindings/scripts/test/JS/JSTestException.cpp:
2427         (WebCore::JSTestExceptionConstructor::create):
2428         (WebCore::JSTestExceptionConstructor::createStructure):
2429         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
2430         (WebCore::JSTestExceptionConstructor::finishCreation):
2431         (WebCore::JSTestException::JSTestException):
2432         (WebCore::JSTestException::getConstructor):
2433         * bindings/scripts/test/JS/JSTestException.h:
2434         (WebCore::JSTestException::create):
2435         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2436         (WebCore::JSTestGenerateIsReachableConstructor::create):
2437         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
2438         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
2439         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2440         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
2441         (WebCore::JSTestGenerateIsReachable::getConstructor):
2442         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2443         (WebCore::JSTestGenerateIsReachable::create):
2444         * bindings/scripts/test/JS/JSTestInterface.cpp:
2445         (WebCore::JSTestInterfaceConstructor::create):
2446         (WebCore::JSTestInterfaceConstructor::createStructure):
2447         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
2448         (WebCore::JSTestInterfaceConstructor::finishCreation):
2449         (WebCore::JSTestInterface::JSTestInterface):
2450         (WebCore::JSTestInterface::getConstructor):
2451         * bindings/scripts/test/JS/JSTestInterface.h:
2452         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2453         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2454         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
2455         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
2456         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2457         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2458         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
2459         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2460         (WebCore::JSTestJSBuiltinConstructor::create):
2461         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2462         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2463         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
2464         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
2465         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2466         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2467         (WebCore::JSTestMediaQueryListListener::getConstructor):
2468         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2469         (WebCore::JSTestMediaQueryListListener::create):
2470         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2471         (WebCore::JSTestNamedConstructorConstructor::create):
2472         (WebCore::JSTestNamedConstructorConstructor::createStructure):
2473         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2474         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
2475         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
2476         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2477         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
2478         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2479         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
2480         (WebCore::JSTestNamedConstructor::getConstructor):
2481         (WebCore::JSTestNamedConstructor::getNamedConstructor):
2482         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2483         (WebCore::JSTestNamedConstructor::create):
2484         * bindings/scripts/test/JS/JSTestNode.cpp:
2485         (WebCore::JSTestNodeConstructor::create):
2486         (WebCore::JSTestNodeConstructor::createStructure):
2487         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
2488         (WebCore::JSTestNodeConstructor::finishCreation):
2489         (WebCore::JSTestNode::JSTestNode):
2490         (WebCore::JSTestNode::getConstructor):
2491         * bindings/scripts/test/JS/JSTestNode.h:
2492         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2493         (WebCore::JSTestNondeterministicConstructor::create):
2494         (WebCore::JSTestNondeterministicConstructor::createStructure):
2495         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
2496         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2497         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
2498         (WebCore::JSTestNondeterministic::getConstructor):
2499         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2500         (WebCore::JSTestNondeterministic::create):
2501         * bindings/scripts/test/JS/JSTestObj.cpp:
2502         (WebCore::JSTestObjConstructor::create):
2503         (WebCore::JSTestObjConstructor::createStructure):
2504         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
2505         (WebCore::JSTestObjConstructor::finishCreation):
2506         (WebCore::JSTestObj::JSTestObj):
2507         (WebCore::JSTestObj::getConstructor):
2508         * bindings/scripts/test/JS/JSTestObj.h:
2509         (WebCore::JSTestObj::create):
2510         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2511         (WebCore::JSTestOverloadedConstructorsConstructor::create):
2512         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
2513         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
2514         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2515         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
2516         (WebCore::JSTestOverloadedConstructors::getConstructor):
2517         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2518         (WebCore::JSTestOverloadedConstructors::create):
2519         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2520         (WebCore::JSTestOverrideBuiltinsConstructor::create):
2521         (WebCore::JSTestOverrideBuiltinsConstructor::createStructure):
2522         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
2523         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
2524         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
2525         (WebCore::JSTestOverrideBuiltins::getConstructor):
2526         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2527         (WebCore::JSTestOverrideBuiltins::create):
2528         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2529         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2530         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
2531         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
2532         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2533         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2534         (WebCore::JSTestSerializedScriptValueInterface::getConstructor):
2535         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2536         (WebCore::JSTestSerializedScriptValueInterface::create):
2537         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2538         (WebCore::JSTestTypedefsConstructor::create):
2539         (WebCore::JSTestTypedefsConstructor::createStructure):
2540         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
2541         (WebCore::JSTestTypedefsConstructor::finishCreation):
2542         (WebCore::JSTestTypedefs::JSTestTypedefs):
2543         (WebCore::JSTestTypedefs::getConstructor):
2544         * bindings/scripts/test/JS/JSTestTypedefs.h:
2545         (WebCore::JSTestTypedefs::create):
2546         * bindings/scripts/test/JS/JSattribute.cpp:
2547         (WebCore::JSattributeConstructor::create):
2548         (WebCore::JSattributeConstructor::createStructure):
2549         (WebCore::JSattributeConstructor::JSattributeConstructor):
2550         (WebCore::JSattributeConstructor::finishCreation):
2551         (WebCore::JSattribute::JSattribute):
2552         (WebCore::JSattribute::getConstructor):
2553         * bindings/scripts/test/JS/JSattribute.h:
2554         (WebCore::JSattribute::create):
2555         * bindings/scripts/test/JS/JSreadonly.cpp:
2556         (WebCore::JSreadonlyConstructor::create):
2557         (WebCore::JSreadonlyConstructor::createStructure):
2558         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
2559         (WebCore::JSreadonlyConstructor::finishCreation):
2560         (WebCore::JSreadonly::JSreadonly):
2561         (WebCore::JSreadonly::getConstructor):
2562         * bindings/scripts/test/JS/JSreadonly.h:
2563         (WebCore::JSreadonly::create):
2564
2565 2015-10-08  Philippe Normand  <pnormand@igalia.com>
2566
2567         WebRTC: Add event names needed by updated RTCPeerConnection
2568         https://bugs.webkit.org/show_bug.cgi?id=149875
2569
2570         Reviewed by Eric Carlson.
2571
2572         The track event name was recently added in the WebRTC spec. The
2573         icegatheringstatechange event has been part of the spec for a while but
2574         was not registered in our DOM events.
2575
2576         * dom/EventNames.h: Add track and icegatheringstatechange even names.
2577
2578 2015-10-07  Keith Rollin  <krollin@apple.com>
2579
2580         script.text shouldn't include text from non-direct children of the script element
2581         https://bugs.webkit.org/show_bug.cgi?id=148851
2582         <rdar://problem/22587759>
2583
2584         Reviewed by Chris Dumez.
2585
2586         Don't include text from non-direct children in script.text. Per:
2587         https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
2588         Chrome and Firefox behavior match the spec.
2589
2590         Test: fast/dom/script-subtext-in-script-elements.html
2591
2592         * dom/ScriptElement.cpp:
2593         (WebCore::ScriptElement::scriptContent):
2594
2595 2015-10-07  Chris Dumez  <cdumez@apple.com>
2596
2597         Partial revert of r187626 as it caused a PLT regression
2598         https://bugs.webkit.org/show_bug.cgi?id=149898
2599
2600         Reviewed by Myles C. Maxfield.
2601
2602         Do a partial revert of r187626 as it caused a regression on PLT.
2603
2604         * platform/graphics/FontCache.h:
2605         (WebCore::FontDescriptionKey::operator==):
2606         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
2607         (WebCore::FontDescriptionKey::computeHash): Deleted.
2608
2609 2015-10-07  Zalan Bujtas  <zalan@apple.com>
2610
2611         RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
2612         https://bugs.webkit.org/show_bug.cgi?id=149883
2613
2614         Reviewed by Simon Fraser.
2615
2616         Reduces code complexity at the calling sites.
2617  
2618         No change in functionality.
2619
2620         * rendering/RenderBox.cpp:
2621         (WebCore::RenderBox::clippedOverflowRectForRepaint):
2622         (WebCore::RenderBox::computeRectForRepaint):
2623         * rendering/RenderBox.h:
2624         * rendering/RenderInline.cpp:
2625         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2626         (WebCore::RenderInline::computeRectForRepaint):
2627         * rendering/RenderInline.h:
2628         * rendering/RenderListMarker.cpp:
2629         (WebCore::RenderListMarker::selectionRectForRepaint):
2630         * rendering/RenderObject.cpp:
2631         (WebCore::RenderObject::repaintRectangle):
2632         (WebCore::RenderObject::computeRectForRepaint):
2633         (WebCore::RenderObject::computeFloatRectForRepaint):
2634         * rendering/RenderObject.h:
2635         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2636         * rendering/RenderReplaced.cpp:
2637         (WebCore::RenderReplaced::selectionRectForRepaint):
2638         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
2639         * rendering/RenderTableCell.cpp:
2640         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2641         (WebCore::RenderTableCell::computeRectForRepaint):
2642         * rendering/RenderTableCell.h:
2643         * rendering/RenderText.cpp:
2644         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
2645         * rendering/RenderView.cpp:
2646         (WebCore::RenderView::computeRectForRepaint):
2647         * rendering/RenderView.h:
2648         * rendering/svg/RenderSVGForeignObject.cpp:
2649         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
2650         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2651         * rendering/svg/RenderSVGForeignObject.h:
2652         * rendering/svg/RenderSVGInline.cpp:
2653         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
2654         * rendering/svg/RenderSVGInline.h:
2655         * rendering/svg/RenderSVGModelObject.cpp:
2656         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
2657         * rendering/svg/RenderSVGModelObject.h:
2658         * rendering/svg/RenderSVGRoot.cpp:
2659         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
2660         * rendering/svg/RenderSVGRoot.h:
2661         * rendering/svg/RenderSVGText.cpp:
2662         (WebCore::RenderSVGText::computeRectForRepaint):
2663         (WebCore::RenderSVGText::computeFloatRectForRepaint):
2664         * rendering/svg/RenderSVGText.h:
2665         * rendering/svg/SVGRenderSupport.cpp:
2666         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2667         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
2668         * rendering/svg/SVGRenderSupport.h:
2669
2670 2015-10-07  Antti Koivisto  <antti@apple.com>
2671
2672         Implement :host pseudo class
2673         https://bugs.webkit.org/show_bug.cgi?id=149440
2674         rdar://problem/22731953
2675
2676         Reviewed by Ryosuke Niwa.
2677
2678         This implements the basic non-function :host syntax.
2679
2680         * css/CSSSelector.cpp:
2681         (WebCore::CSSSelector::selectorText):
2682         * css/CSSSelector.h:
2683         * css/ElementRuleCollector.cpp:
2684         (WebCore::ElementRuleCollector::matchAuthorRules):
2685         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
2686         (WebCore::ElementRuleCollector::matchUserRules):
2687         * css/ElementRuleCollector.h:
2688         * css/RuleSet.cpp:
2689         (WebCore::computeMatchBasedOnRuleHash):
2690         (WebCore::RuleSet::addRule):
2691         * css/RuleSet.h:
2692         (WebCore::RuleSet::cuePseudoRules):
2693         (WebCore::RuleSet::hostPseudoClassRules):
2694         (WebCore::RuleSet::focusPseudoClassRules):
2695         (WebCore::RuleSet::universalRules):
2696         * css/SelectorChecker.cpp:
2697         (WebCore::SelectorChecker::checkOne):
2698         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2699         * cssjit/SelectorCompiler.cpp:
2700         (WebCore::SelectorCompiler::addPseudoClassType):
2701
2702 2015-10-07  Nan Wang  <n_wang@apple.com>
2703
2704         AX: ARIA 1.1 @aria-placeholder
2705         https://bugs.webkit.org/show_bug.cgi?id=148970
2706
2707         Reviewed by Chris Fleizach.
2708
2709         Added support for aria-placeholder attribute.
2710
2711         Modified accessibility/placeholder.html test.
2712
2713         * accessibility/AccessibilityObject.cpp:
2714         (WebCore::AccessibilityObject::placeholderValue):
2715         * html/HTMLAttributeNames.in:
2716
2717 2015-10-07  Commit Queue  <commit-queue@webkit.org>
2718
2719         Unreviewed, rolling out r190664.
2720         https://bugs.webkit.org/show_bug.cgi?id=149877
2721
2722         mac build is sometimes borken due to missing generated header
2723         file (Requested by youenn on #webkit).
2724
2725         Reverted changeset:
2726
2727         "Automate WebCore JS builtins generation and build system"
2728         https://bugs.webkit.org/show_bug.cgi?id=149751
2729         http://trac.webkit.org/changeset/190664
2730
2731 2015-10-06  Simon Fraser  <simon.fraser@apple.com>
2732
2733         will-change should trigger stacking context based purely on properties
2734         https://bugs.webkit.org/show_bug.cgi?id=148068
2735
2736         Reviewed by Zalan Bujtas.
2737
2738         Previously, our will-change implementation didn't trigger stacking context
2739         on an inline if the will-change property didn't apply to inlines (like 'transform').
2740         However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
2741         
2742         Change behavior to have stacking context creation behavior for will-change be
2743         identical for inlines and blocks.
2744
2745         Test: fast/css/will-change/will-change-creates-stacking-context-inline.html
2746
2747         * rendering/RenderInline.cpp:
2748         (WebCore::inFlowPositionedInlineAncestor):
2749         * rendering/RenderInline.h:
2750         (WebCore::RenderInline::willChangeCreatesStackingContext):
2751         * rendering/style/WillChangeData.cpp:
2752         (WebCore::propertyCreatesStackingContext):
2753         (WebCore::WillChangeData::addFeature):
2754         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Deleted.
2755         * rendering/style/WillChangeData.h:
2756         (WebCore::WillChangeData::canCreateStackingContextOnInline): Deleted.
2757
2758 2015-10-07  Javier Fernandez  <jfernandez@igalia.com>
2759
2760         [CSS Grid Layout] Modify grid item height doesn't work
2761         https://bugs.webkit.org/show_bug.cgi?id=149840
2762
2763         Reviewed by Sergio Villar Senin.
2764
2765         When computing the logical height of content-sized grid tracks we
2766         need to clear grid item's override height if it needs to be laid
2767         out again.
2768
2769         Currently we are doing so only in the case of percentage heights
2770         or when the grid track's width has changed; these situations would
2771         obviously mark grid items as needing layout.
2772
2773         However, there are other situations, like the one defined in this
2774         bug, which would imply a new layout of the grid items; hence we
2775         need to clear its override value if we want the layout logic to be
2776         computed correctly.
2777
2778         * rendering/RenderGrid.cpp:
2779         (WebCore::RenderGrid::logicalContentHeightForChild):
2780
2781 2015-10-07  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2782
2783         Automate WebCore JS builtins generation and build system
2784         https://bugs.webkit.org/show_bug.cgi?id=149751
2785
2786         Reviewed by Darin Adler.
2787
2788         Adding annotations to JS files to know whether they should be under a compilation flag and
2789         whether they are JS internals or JS tied to WebIDL.
2790         If a file is said as JS internals, all function names are exported automatically.
2791         Added auto generation of WebCoreJSBuiltins.cpp
2792         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
2793         WebCoreJSClientData as wrapper for builtins. Renamed WebCoreJSClientData to JSClientData.
2794         Added auto generation of PrivateWebCoreJSBuiltins that is a wrapper around all private functions, used by
2795         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
2796
2797         The remaining manual part for private functions is the pairing between private identifiers and
2798         the private JS functions within JSDOMWindowBase::finishCreation.
2799
2800         Covered by existing tests.
2801
2802         * CMakeLists.txt:
2803         * DerivedSources.make:
2804         * Modules/streams/ByteLengthQueuingStrategy.js:
2805         * Modules/streams/CountQueuingStrategy.js:
2806         * Modules/streams/ReadableStream.js:
2807         * Modules/streams/ReadableStreamInternals.js:
2808         * WebCore.order:
2809         * WebCore.vcxproj/WebCore.vcxproj:
2810         * WebCore.xcodeproj/project.pbxproj:
2811         * bindings/js/DOMWrapperWorld.cpp:
2812         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
2813         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
2814         (WebCore::normalWorld):
2815         * bindings/js/JSDOMWindowBase.cpp:
2816         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2817         (WebCore::JSDOMWindowBase::finishCreation):
2818         (WebCore::JSDOMWindowBase::visitChildren):
2819         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2820         * bindings/js/JSDOMWindowBase.h:
2821         * bindings/js/ScriptController.cpp:
2822         (WebCore::ScriptController::getAllWorlds):
2823         * bindings/js/SerializedScriptValue.cpp:
2824         (WebCore::SerializedScriptValue::transferArrayBuffers):
2825         * bindings/js/WebCoreJSClientData.h:
2826         (WebCore::JSClientData::JSClientData):
2827         (WebCore::JSClientData::~JSClientData):
2828         (WebCore::JSClientData::builtinFunctions):
2829         (WebCore::initNormalWorldClientData):
2830         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
2831         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
2832         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
2833         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
2834         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
2835         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
2836         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
2837         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
2838         * generate-js-builtins-allinone: Added.
2839         (retrieveGenerationParameters):
2840         (retrieveFilesWithParameters):
2841         (retrieveFilesWithParameters.FileInput):
2842         (writeConditional):
2843         (JSBuiltinFunctions):
2844         (Private):
2845         (JSBuiltinInternalFunctions):
2846         (copytempfile):
2847
2848 2015-10-05  Sergio Villar Senin  <svillar@igalia.com>
2849
2850         [css-grid] Implement grid gutters
2851         https://bugs.webkit.org/show_bug.cgi?id=149800
2852
2853         Reviewed by Darin Adler.
2854
2855         Authors can now specify the gutters between grid lines, i.e.,
2856         the space between two consecutive grid lines. This can be done
2857         using the new '-webkit-grid-column-gap 'and
2858         '-webkit-grid-row-gap' properties (or the '-webkit-grid-gap'
2859         shorthand).
2860
2861         From the track sizing algorithm POV, gutters are treated as
2862         fixed size columns. The primary consequence is that grids are
2863         enlarged (depending on the number of tracks). Gutters also
2864         affect the sizing of content-sized tracks and fr tracks as
2865         long as the grid have spanning items. Those tracks will become
2866         smaller as gutters will consume part of the item's size, so
2867         the tracks won't need to grow as much as they used to.
2868
2869         Tests: fast/css-grid-layout/grid-gutters-and-alignment.html
2870                fast/css-grid-layout/grid-gutters-and-flex-content.html
2871                fast/css-grid-layout/grid-gutters-and-tracks.html
2872                fast/css-grid-layout/grid-gutters-get-set.html
2873
2874         * css/CSSComputedStyleDeclaration.cpp:
2875         (WebCore::valueForGridTrackList):
2876         (WebCore::ComputedStyleExtractor::propertyValue):
2877         * css/CSSParser.cpp:
2878         (WebCore::isSimpleLengthPropertyID):
2879         (WebCore::CSSParser::parseValue):
2880         (WebCore::CSSParser::parseGridGapShorthand):
2881         * css/CSSParser.h:
2882         * css/CSSPropertyNames.in:
2883         * rendering/RenderGrid.cpp:
2884         (WebCore::RenderGrid::guttersSize):
2885         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2886         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2887         (WebCore::RenderGrid::layoutGridItems):
2888         (WebCore::RenderGrid::gridAreaBreadthForChild):
2889         (WebCore::RenderGrid::populateGridPositions):
2890         (WebCore::RenderGrid::columnAxisOffsetForChild):
2891         (WebCore::RenderGrid::rowAxisOffsetForChild):
2892         * rendering/RenderGrid.h:
2893         * rendering/style/RenderStyle.h:
2894         * rendering/style/StyleGridData.cpp:
2895         (WebCore::StyleGridData::StyleGridData):
2896         * rendering/style/StyleGridData.h:
2897         (WebCore::StyleGridData::operator==):
2898
2899 2015-10-07  ChangSeok Oh  <changseok.oh@collabora.com>
2900
2901         [GTK] Progress bar is broken on recent GTK+
2902         https://bugs.webkit.org/show_bug.cgi?id=149831
2903
2904         Reviewed by Carlos Garcia Campos.
2905
2906         The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
2907         the way of rendering progress bar changed after gtk+-3.13.7. See more
2908         https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
2909         gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
2910         It should be done with gtk_render_background and gtk_render_frame.
2911
2912         Test: fast/dom/HTMLProgressElement/native-progress-bar.html
2913
2914         * rendering/RenderThemeGtk.cpp:
2915         (WebCore::RenderThemeGtk::paintProgressBar):
2916
2917 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2918
2919         [GTK] Add autocleanups
2920         https://bugs.webkit.org/show_bug.cgi?id=149588
2921
2922         Reviewed by Darin Adler.
2923
2924         * PlatformGTK.cmake:
2925         * bindings/scripts/gobject-generate-headers.pl:
2926
2927 2015-10-06  Zalan Bujtas  <zalan@apple.com>
2928
2929         Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
2930         https://bugs.webkit.org/show_bug.cgi?id=149535
2931         rdar://problem/22874920
2932
2933         Reviewed by Simon Fraser.
2934
2935         When due to some style change, a renderer's self-painting layer is getting destroyed 
2936         and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
2937
2938         When a renderer has a self-painting layer, the parent stops tracking the child's 
2939         visual overflow rect. All overflow painting is delegated to the self-painting layer.
2940         However when this layer gets destroyed, no-one issues repaint to clean up
2941         the overflow bits.
2942         This patch ensures that we issue a repaint when the self-painting layer is destroyed
2943         and the triggering style change requires full repaint.
2944
2945         Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html
2946
2947         * rendering/RenderLayer.h:
2948         * rendering/RenderLayerModelObject.cpp:
2949         (WebCore::RenderLayerModelObject::styleDidChange):
2950
2951 2015-10-06  Jer Noble  <jer.noble@apple.com>
2952
2953         [Mac] REGRESSION(r173318): Seeks never complete for media loaded with QTKit.
2954         https://bugs.webkit.org/show_bug.cgi?id=149845
2955
2956         Reviewed by Darin Adler.
2957
2958         When converting from time-as-double to MediaTime, a regression was introduced
2959         when checking whether m_seekTo was set to a valid value or not. The clause
2960         `time != -1` should be translated to `time.isValid()`, not `!time.isValid()`.
2961
2962         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2963         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2964
2965 2015-10-06  Brady Eidson  <beidson@apple.com>
2966
2967         Rename IDBRequestIdentifier to IDBResourceIdentifier.
2968         https://bugs.webkit.org/show_bug.cgi?id=149861
2969
2970         Reviewed by Alex Christensen.
2971
2972         No new tests (No change in behavior).
2973
2974         Turns out having an object representing a (connection ID + unique ID pair) is useful for more than just IDBRequests.
2975
2976         * CMakeLists.txt:
2977         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2978         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
2979         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
2980         * Modules/indexeddb/client/IDBConnectionToServer.h:
2981         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2982         (WebCore::IDBClient::IDBRequest::IDBRequest):
2983         * Modules/indexeddb/client/IDBRequestImpl.h:
2984         (WebCore::IDBClient::IDBRequest::resourceIdentifier):
2985         (WebCore::IDBClient::IDBRequest::requestIdentifier): Deleted.
2986         * Modules/indexeddb/shared/IDBRequestData.h:
2987         (WebCore::IDBRequestData::requestIdentifier):
2988         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.cpp.
2989         (WebCore::nextResourceNumber):
2990         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
2991         (WebCore::IDBResourceIdentifier::emptyValue):
2992         (WebCore::IDBResourceIdentifier::deletedValue):
2993         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue):
2994         * Modules/indexeddb/shared/IDBResourceIdentifier.h: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.h.
2995         (WebCore::IDBResourceIdentifier::isEmpty):
2996         (WebCore::IDBResourceIdentifier::hash):
2997         (WebCore::IDBResourceIdentifier::operator==):
2998         (WebCore::IDBResourceIdentifier::connectionIdentifier):
2999         (WebCore::IDBResourceIdentifierHash::hash):
3000         (WebCore::IDBResourceIdentifierHash::equal):
3001         (WebCore::IDBResourceIdentifierHashTraits::emptyValue):
3002         (WebCore::IDBResourceIdentifierHashTraits::isEmptyValue):
3003         (WebCore::IDBResourceIdentifierHashTraits::constructDeletedValue):
3004         (WebCore::IDBResourceIdentifierHashTraits::isDeletedValue):
3005         * Modules/indexeddb/shared/IDBResultData.cpp:
3006         (WebCore::IDBResultData::IDBResultData):
3007         * Modules/indexeddb/shared/IDBResultData.h:
3008         (WebCore::IDBResultData::requestIdentifier):
3009         * WebCore.xcodeproj/project.pbxproj:
3010
3011 2015-10-06  Nan Wang  <n_wang@apple.com>
3012
3013         AX: ARIA 1.1: aria-orientation now defaults to undefined, supported on more elements, and role-specific defaults are defined.
3014         https://bugs.webkit.org/show_bug.cgi?id=132177
3015
3016         Reviewed by Chris Fleizach.
3017
3018         Added role-specific defaults and changed general default to undefined.
3019         Also added more elements to support aria-orientation on Mac.
3020
3021         Test: accessibility/mac/aria-orientation.html
3022
3023         * accessibility/AccessibilityObject.cpp:
3024         (WebCore::AccessibilityObject::orientation):
3025         (WebCore::AccessibilityObject::isDescendantOfObject):
3026         * accessibility/AccessibilityObject.h:
3027         (WebCore::AccessibilityObject::isColorWell):
3028         (WebCore::AccessibilityObject::isSplitter):
3029         (WebCore::AccessibilityObject::isToolbar):
3030         (WebCore::AccessibilityObject::isChecked):
3031         (WebCore::AccessibilityObject::isEnabled):
3032         * accessibility/AccessibilityRenderObject.cpp:
3033         (WebCore::AccessibilityRenderObject::orientation):
3034         * accessibility/AccessibilityScrollView.cpp:
3035         (WebCore::AccessibilityScrollView::scrollBar):
3036         * accessibility/AccessibilityScrollbar.cpp:
3037         (WebCore::AccessibilityScrollbar::orientation):
3038         (WebCore::AccessibilityScrollbar::isEnabled):
3039         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3040         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3041         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3042
3043 2015-10-06  Per Arne Vollan  <peavo@outlook.com>
3044
3045         [WinCairo] GStreamer compile errors.
3046         https://bugs.webkit.org/show_bug.cgi?id=149839
3047
3048         Reviewed by Alex Christensen.
3049
3050         Help MSVC to resolve ambiguous calls.
3051
3052         * platform/graphics/MediaPlayer.h:
3053         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3054         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3055         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3056         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
3057         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3058         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
3059         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
3060         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
3061         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
3062         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
3063         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
3064         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
3065         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3066         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
3067         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
3068         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
3069         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3070         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
3071         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3072         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
3073         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3074         (webkitVideoSinkRender):
3075         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3076         (webKitWebSrcChangeState):
3077         (webKitWebSrcNeedDataCb):
3078         (webKitWebSrcEnoughDataMainCb):
3079         (webKitWebSrcEnoughDataCb):
3080         (webKitWebSrcSeekMainCb):
3081         (webKitWebSrcSeekDataCb):
3082
3083 2015-10-06  Chris Dumez  <cdumez@apple.com>
3084
3085         Refactor TokenPreloadScanner::StartTagScanner::processAttribute()
3086         https://bugs.webkit.org/show_bug.cgi?id=149847
3087
3088         Reviewed by Antti Koivisto.
3089
3090         Refactor TokenPreloadScanner::StartTagScanner::processAttribute() to only
3091         process attributes that make sense given the current tagId. In particular,
3092         - We only process the charset parameter if the tag is a link or a script.
3093         - We only process the sizes / srcset attributes if the tag is an img.
3094
3095         * html/parser/HTMLPreloadScanner.cpp:
3096         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3097         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
3098
3099 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3100
3101         Binding generator XXConstructor::finishCreation should take references as parameters
3102         https://bugs.webkit.org/show_bug.cgi?id=149838
3103
3104         Reviewed by Darin Adler.
3105
3106         Updated the binding generator so that XXConstructor::finishCreation
3107         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
3108
3109         Covered by rebased binding tests.
3110
3111         * bindings/scripts/CodeGeneratorJS.pm:
3112         (GenerateConstructorDeclaration):
3113         (GenerateConstructorHelperMethods):
3114         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3115         (WebCore::JSTestActiveDOMObjectConstructor::create):
3116         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3117         * bindings/scripts/test/JS/JSTestCallback.cpp:
3118         (WebCore::JSTestCallbackConstructor::create):
3119         (WebCore::JSTestCallbackConstructor::finishCreation):
3120         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3121         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3122         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3123         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3124         (WebCore::JSTestCustomNamedGetterConstructor::create):
3125         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3126         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3127         (WebCore::JSTestEventConstructorConstructor::create):
3128         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3129         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3130         (WebCore::JSTestEventTargetConstructor::create):
3131         (WebCore::JSTestEventTargetConstructor::finishCreation):
3132         * bindings/scripts/test/JS/JSTestException.cpp:
3133         (WebCore::JSTestExceptionConstructor::create):
3134         (WebCore::JSTestExceptionConstructor::finishCreation):
3135         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3136         (WebCore::JSTestGenerateIsReachableConstructor::create):
3137         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3138         * bindings/scripts/test/JS/JSTestInterface.cpp:
3139         (WebCore::JSTestInterfaceConstructor::create):
3140         (WebCore::JSTestInterfaceConstructor::finishCreation):
3141         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3142         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
3143         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
3144         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3145         (WebCore::JSTestMediaQueryListListenerConstructor::create):
3146         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3147         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3148         (WebCore::JSTestNamedConstructorConstructor::create):
3149         (WebCore::JSTestNamedConstructorNamedConstructor::create):
3150         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3151         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3152         * bindings/scripts/test/JS/JSTestNode.cpp:
3153         (WebCore::JSTestNodeConstructor::create):
3154         (WebCore::JSTestNodeConstructor::finishCreation):
3155         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3156         (WebCore::JSTestNondeterministicConstructor::create):
3157         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3158         * bindings/scripts/test/JS/JSTestObj.cpp:
3159         (WebCore::JSTestObjConstructor::create):
3160         (WebCore::JSTestObjConstructor::finishCreation):
3161         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3162         (WebCore::JSTestOverloadedConstructorsConstructor::create):
3163         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3164         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3165         (WebCore::JSTestOverrideBuiltinsConstructor::create):
3166         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
3167         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3168         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
3169         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3170         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3171         (WebCore::JSTestTypedefsConstructor::create):
3172         (WebCore::JSTestTypedefsConstructor::finishCreation):
3173         * bindings/scripts/test/JS/JSattribute.cpp:
3174         (WebCore::JSattributeConstructor::create):
3175         (WebCore::JSattributeConstructor::finishCreation):
3176         * bindings/scripts/test/JS/JSreadonly.cpp:
3177         (WebCore::JSreadonlyConstructor::create):
3178         (WebCore::JSreadonlyConstructor::finishCreation):
3179
3180 2015-10-06  Jiewen Tan  <jiewen_tan@apple.com>
3181
3182         Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange()
3183         https://bugs.webkit.org/show_bug.cgi?id=149300
3184         <rdar://problem/22747046>
3185
3186         Reviewed by Chris Dumez.
3187
3188         This is a merge of Blink r167845 and r194944:
3189         https://codereview.chromium.org/177093016
3190         https://codereview.chromium.org/1124863003
3191
3192         Test: editing/style/apply-style-crash2.html
3193               editing/style/apply-style-crash3.html
3194
3195         * editing/ApplyStyleCommand.cpp:
3196         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3197         The issue was that we would traverse the DOM tree past the beyondEnd 
3198         under some circumstances and thus NodeTraversal::next() would return 
3199         null unexpectedly. This CL adds a check to make sure startNode != beyondEnd 
3200         before traversing to avoid the problem.
3201
3202         Besides that, this CL hardens changing font style over unknown elements.
3203         When adjusting the start node position of where to apply a font style
3204         command, check that we haven't stepped off the end.
3205
3206         This CL also adds a few more assertions to catch similar issues 
3207         more easily in the future.
3208
3209 2015-10-06  Javier Fernandez  <jfernandez@igalia.com>
3210
3211         [CSS Grid Layout] Don't need to reset auto-margins during grid items layout
3212         https://bugs.webkit.org/show_bug.cgi?id=149764
3213
3214         Reviewed by Darin Adler.
3215
3216         This patch implements a refactoring of the auto-margin alignment code for grid
3217         items so it uses start/end and before/after margin logic terms.
3218
3219         I addition, it avoids resetting the auto-margin values, which requires an extra
3220         layout, before applying the alignment logic.
3221
3222         No new tests because there is no behavior change.
3223
3224         * rendering/RenderGrid.cpp:
3225         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Computing margins if child needs layout.
3226         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
3227         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): Using start/end logical margins.
3228         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): Using before/after logical margins.
3229         (WebCore::RenderGrid::columnAxisOffsetForChild): Just added comment.
3230         (WebCore::RenderGrid::rowAxisOffsetForChild): Just added comment.
3231
3232 2015-10-06  Tim Horton  <timothy_horton@apple.com>
3233
3234         Tile map shows a green rect when threaded scrolling is disabled
3235         https://bugs.webkit.org/show_bug.cgi?id=149716
3236
3237         Reviewed by Darin Adler.
3238
3239         Green is supposed to indicate that we're using the fast path; if threaded
3240         scrolling is disabled, we're definitely not doing that.
3241
3242         * platform/graphics/TiledBacking.h:
3243         * platform/graphics/ca/TileController.cpp:
3244         (WebCore::TileController::TileController):
3245         * platform/graphics/ca/TileCoverageMap.cpp:
3246         (WebCore::TileCoverageMap::update):
3247         Default to the "we have no ScrollingCoordinator" purple indication;
3248         if a ScrollingCoordinator comes along it will setScrollingModeIndication
3249         and change it from this default.
3250
3251 2015-10-06  Zalan Bujtas  <zalan@apple.com>
3252
3253         Remove redundant isComposited() function and replace
3254         hasLayer() && layer()->isComposited() with RenderObject::isComposited().
3255         https://bugs.webkit.org/show_bug.cgi?id=149846
3256
3257         Reviewed by Simon Fraser.
3258
3259         No change in functionality.
3260
3261         * rendering/RenderLayerCompositor.cpp:
3262         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
3263         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
3264         * rendering/RenderObject.cpp:
3265         (WebCore::RenderObject::repaintUsingContainer):
3266         * rendering/RenderThemeMac.mm:
3267         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3268         * rendering/RenderView.cpp:
3269         (WebCore::rendererObscuresBackground):
3270         (WebCore::isComposited): Deleted.
3271         * rendering/RenderWidget.cpp:
3272         (WebCore::RenderWidget::setWidgetGeometry):
3273
3274 2015-10-06  Commit Queue  <commit-queue@webkit.org>
3275
3276         Unreviewed, rolling out r190619.
3277         https://bugs.webkit.org/show_bug.cgi?id=149849
3278
3279         borke the binding tests on iOS at least (Requested by youenn
3280         on #webkit).
3281
3282         Reverted changeset:
3283
3284         "Binding generator XXConstructor::finishCreation should take
3285         references as parameters"
3286         https://bugs.webkit.org/show_bug.cgi?id=149838
3287         http://trac.webkit.org/changeset/190619
3288
3289 2015-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3290
3291         Slider knobs should scale when rendering while zoomed
3292         https://bugs.webkit.org/show_bug.cgi?id=149835
3293         <rdar://problem/22897080>
3294
3295         Reviewed by Darin Adler.
3296
3297         Make slider knobs follow suit with the rest of the unscaled form controls
3298         by rendering to an offscreen buffer when the page is zoomed or scaled and
3299         then rendering a scaled version of the offscreen buffer onto the page.
3300
3301         * platform/mac/ThemeMac.mm:
3302         (WebCore::drawCellOrFocusRingIntoRectWithView): Helper function for drawing
3303             cells and/or focus rings.
3304         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Refactored to
3305             handle drawing slider knobs as well.
3306         * rendering/RenderThemeMac.mm:
3307         (WebCore::RenderThemeMac::paintSliderThumb): Use scaled rendering when necessary.
3308
3309 2015-10-06  Chris Dumez  <cdumez@apple.com>
3310
3311         [Web IDL] 'length' property is wrong for variadic operations
3312         https://bugs.webkit.org/show_bug.cgi?id=149714
3313
3314         Reviewed by Darin Adler.
3315
3316         The value of the 'length' property was wrong for variadic operations:
3317         - https://heycam.github.io/webidl/#dfn-optional-argument
3318
3319         The final argument of a variadic operation is considered to be an
3320         optional argument. Therefore, we should not account for it when
3321         computing the value of the 'length' property. This patch fixes WebKit's
3322         behavior to match the specification.
3323
3324         Test: fast/dom/variadic-operations-length.html
3325
3326         * bindings/scripts/CodeGeneratorJS.pm:
3327         (GetFunctionLength):
3328         * bindings/scripts/test/JS/JSTestObj.cpp:
3329         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3330         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3331
3332 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3333
3334         Binding generator should add builtin header for JSBuiltin attributes
3335         https://bugs.webkit.org/show_bug.cgi?id=149837
3336
3337         Reviewed by Darin Adler.
3338
3339         Ensured XXBuiltins.h header is included for builtin attributes.
3340         Renamed AddIncludesForJSBuiltinMethods as AddJSBuiltinIncludesIfNeeded.
3341         Test loop is done through all functions and attributes to handle conditional correctly.
3342
3343         Covered by existing and added binding tests.
3344
3345         * bindings/scripts/CodeGeneratorJS.pm:
3346         (GenerateImplementation):
3347         (AddJSBuiltinIncludesIfNeeded):
3348         * bindings/scripts/test/JS/JSTestObj.cpp:
3349         * bindings/scripts/test/ObjC/DOMTestObj.h:
3350         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3351         * bindings/scripts/test/TestObj.idl:
3352
3353 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3354
3355         Binding generator XXConstructor::finishCreation should take references as parameters
3356         https://bugs.webkit.org/show_bug.cgi?id=149838
3357
3358         Reviewed by Darin Adler.
3359
3360         Updated the binding generator so that XXConstructor::finishCreation
3361         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
3362
3363         Covered by rebased binding tests.
3364
3365         * bindings/scripts/CodeGeneratorJS.pm:
3366         (GenerateConstructorDeclaration):
3367         (GenerateConstructorHelperMethods):
3368         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3369         (WebCore::JSTestActiveDOMObjectConstructor::create):
3370         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3371         * bindings/scripts/test/JS/JSTestCallback.cpp:
3372         (WebCore::JSTestCallbackConstructor::create):
3373         (WebCore::JSTestCallbackConstructor::finishCreation):
3374         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3375         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3376         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3377         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3378         (WebCore::JSTestCustomNamedGetterConstructor::create):
3379         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3380         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3381         (WebCore::JSTestEventConstructorConstructor::create):
3382         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3383         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3384         (WebCore::JSTestEventTargetConstructor::create):
3385         (WebCore::JSTestEventTargetConstructor::finishCreation):
3386         * bindings/scripts/test/JS/JSTestException.cpp:
3387         (WebCore::JSTestExceptionConstructor::create):
3388         (WebCore::JSTestExceptionConstructor::finishCreation):
3389         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3390         (WebCore::JSTestGenerateIsReachableConstructor::create):
3391         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3392         * bindings/scripts/test/JS/JSTestInterface.cpp:
3393         (WebCore::JSTestInterfaceConstructor::create):
3394         (WebCore::JSTestInterfaceConstructor::finishCreation):
3395         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3396         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
3397         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
3398         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3399         (WebCore::JSTestMediaQueryListListenerConstructor::create):
3400         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3401         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3402         (WebCore::JSTestNamedConstructorConstructor::create):
3403         (WebCore::JSTestNamedConstructorNamedConstructor::create):
3404         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3405         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3406         * bindings/scripts/test/JS/JSTestNode.cpp:
3407         (WebCore::JSTestNodeConstructor::create):
3408         (WebCore::JSTestNodeConstructor::finishCreation):
3409         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3410         (WebCore::JSTestNondeterministicConstructor::create):
3411         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3412         * bindings/scripts/test/JS/JSTestObj.cpp:
3413         (WebCore::JSTestObjConstructor::create):
3414         (WebCore::JSTestObjConstructor::finishCreation):
3415         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3416         (WebCore::JSTestOverloadedConstructorsConstructor::create):
3417         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3418         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3419         (WebCore::JSTestOverrideBuiltinsConstructor::create):
3420         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
3421         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3422         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
3423         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3424         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3425         (WebCore::JSTestTypedefsConstructor::create):
3426         (WebCore::JSTestTypedefsConstructor::finishCreation):
3427         * bindings/scripts/test/JS/JSattribute.cpp:
3428         (WebCore::JSattributeConstructor::create):
3429         (WebCore::JSattributeConstructor::finishCreation):
3430         * bindings/scripts/test/JS/JSreadonly.cpp:
3431         (WebCore::JSreadonlyConstructor::create):
3432         (WebCore::JSreadonlyConstructor::finishCreation):
3433
3434 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
3435
3436         [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
3437         https://bugs.webkit.org/show_bug.cgi?id=149752
3438
3439         Reviewed by Carlos Garcia Campos.
3440
3441         CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
3442
3443         * html/canvas/CanvasRenderingContext2D.cpp:
3444         (WebCore::CanvasRenderingContext2D::State::State):
3445
3446 2015-10-06  Daniel Bates  <dbates@webkit.org>
3447
3448         Enable XSLT when building WebKit for iOS using the public iOS SDK
3449         https://bugs.webkit.org/show_bug.cgi?id=149827
3450
3451         Reviewed by Alexey Proskuryakov.
3452
3453         * Configurations/FeatureDefines.xcconfig:
3454
3455 2015-10-06  Brent Fulgham  <bfulgham@apple.com>
3456
3457         [Win] Correct positioning error introduced in r190235
3458         https://bugs.webkit.org/show_bug.cgi?id=149631
3459         <rdar://problem/22635080>
3460
3461         Reviewed by Simon Fraser.
3462
3463         Covered by existing compositing tests:
3464           css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
3465           fast/layers/no-clipping-overflow-hidden-added-after-transform.html
3466           fast/layers/no-clipping-overflow-hidden-added-after-transition.html
3467           fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
3468           transforms/2d/preserve3d-not-fixed-container.html
3469
3470         * platform/graphics/ca/TileGrid.cpp:
3471         (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
3472         on Windows.
3473         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3474         (PlatformCALayerWinInternal::displayCallback): We should always flip the
3475         coordinate system when drawing these layers on Windows.
3476         (shouldInvertBeforeDrawingContent): Deleted.
3477         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
3478         (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
3479         for these tiled layers; that's already accounted for in common tile drawing code.
3480
3481 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
3482
3483         Fix ENABLE_OPENGL=OFF builds
3484         https://bugs.webkit.org/show_bug.cgi?id=146511
3485
3486         Reviewed by Darin Adler.
3487
3488         * platform/graphics/texmap/BitmapTextureGL.h:
3489         * platform/graphics/texmap/BitmapTextureGL.cpp:
3490         * platform/graphics/texmap/TextureMapperGL.h:
3491         * platform/graphics/texmap/TextureMapperGL.cpp:
3492         * platform/graphics/texmap/TextureMapperShaderProgram.h:
3493         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
3494         Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
3495         ENABLE_OPENGL=OFF only disables the GL-related parts.
3496
3497 2015-10-06  Alex Christensen  <achristensen@webkit.org>
3498
3499         Fix Windows build after r190611.
3500
3501         * PlatformWin.cmake:
3502         Forward headers from contentextensions.
3503
3504 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
3505
3506         Use modern for-loops in WebCore/html.
3507         https://bugs.webkit.org/show_bug.cgi?id=149662
3508
3509         Reviewed by Darin Adler.
3510
3511         No new tests because there is no behavior change.
3512
3513         * html/DOMFormData.cpp:
3514         (WebCore::DOMFormData::DOMFormData):
3515         * html/EmailInputType.cpp:
3516         (WebCore::EmailInputType::typeMismatchFor):
3517         * html/FileInputType.cpp:
3518         (WebCore::FileInputType::receiveDroppedFiles):
3519         * html/FormController.cpp:
3520         (WebCore::FormControlState::serializeTo):
3521         (WebCore::FormControlState::deserialize):
3522         (WebCore::SavedFormState::serializeTo):
3523         (WebCore::SavedFormState::getReferencedFilePaths):
3524         (WebCore::FormController::createSavedFormStateMap):
3525         (WebCore::FormController::formElementsState):
3526         (WebCore::FormController::restoreControlStateIn):
3527         (WebCore::FormController::getReferencedFilePaths):
3528         * html/HTMLAnchorElement.cpp:
3529         (WebCore::hasNonEmptyBox):
3530         * html/HTMLCanvasElement.cpp:
3531         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
3532         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
3533         (WebCore::HTMLCanvasElement::reset):
3534         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
3535         * html/HTMLFieldSetElement.cpp:
3536         (WebCore::HTMLFieldSetElement::length):
3537         * html/HTMLFormControlsCollection.cpp:
3538         (WebCore::firstNamedItem):
3539         * html/HTMLFormElement.cpp:
3540         (WebCore::HTMLFormElement::~HTMLFormElement):
3541         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
3542         (WebCore::HTMLFormElement::removedFrom):
3543         (WebCore::HTMLFormElement::length):
3544         (WebCore::HTMLFormElement::submitImplicitly):
3545         (WebCore::HTMLFormElement::validateInteractively):
3546         (WebCore::HTMLFormElement::getTextFieldValues):
3547         (WebCore::HTMLFormElement::submit):
3548         (WebCore::HTMLFormElement::reset):
3549         (WebCore::HTMLFormElement::defaultButton):
3550         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3551         (WebCore::HTMLFormElement::removeFromPastNamesMap):
3552         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
3553         * html/HTMLInputElement.cpp:
3554         (WebCore::parseAcceptAttribute):
3555         * html/HTMLKeygenElement.cpp:
3556         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3557         * html/HTMLMediaElement.cpp:
3558         (WebCore::HTMLMediaElement::setMediaGroup):
3559         * html/HTMLOptionElement.cpp:
3560         (WebCore::HTMLOptionElement::index):
3561         * html/HTMLSelectElement.cpp:
3562         (WebCore::HTMLSelectElement::saveLastSelection):
3563         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3564         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3565         (WebCore::HTMLSelectElement::selectedIndex):
3566         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3567         (WebCore::HTMLSelectElement::saveFormControlState):
3568         (WebCore::HTMLSelectElement::restoreFormControlState):
3569         (WebCore::HTMLSelectElement::appendFormData):
3570         (WebCore::HTMLSelectElement::reset):
3571         * html/HTMLTextAreaElement.cpp:
3572         (WebCore::HTMLTextAreaElement::setDefaultValue):
3573         * html/InputType.cpp:
3574         (WebCore::populateInputTypeFactoryMap):
3575         * html/MediaController.cpp:
3576         (MediaController::duration):
3577         (MediaController::setCurrentTime):
3578         (MediaController::play):
3579         (MediaController::setPlaybackRate):
3580         (MediaController::setVolume):
3581         (MediaController::setMuted):
3582         (playbackStateWaiting):
3583         (MediaController::updateMediaElements):
3584         (MediaController::bringElementUpToSpeed):
3585         (MediaController::isBlocked):
3586         (MediaController::hasEnded):
3587         (MediaController::asyncEventTimerFired):
3588         (MediaController::clearPositionTimerFired):
3589         (MediaController::hasAudio):
3590         (MediaController::hasVideo):
3591         (MediaController::hasClosedCaptions):
3592         (MediaController::setClosedCaptionsVisible):
3593         (MediaController::supportsScanning):
3594         (MediaController::beginScrubbing):
3595         (MediaController::endScrubbing):
3596         (MediaController::canPlay):
3597         (MediaController::isLiveStream):
3598         (MediaController::hasCurrentSrc):
3599         (MediaController::returnToRealtime):
3600         * html/MediaFragmentURIParser.cpp:
3601         (WebCore::MediaFragmentURIParser::parseTimeFragment):
3602         * html/PublicURLManager.cpp:
3603         (WebCore::PublicURLManager::revoke):
3604         (WebCore::PublicURLManager::stop):
3605         * html/canvas/WebGLBuffer.cpp:
3606         (WebCore::WebGLBuffer::getCachedMaxIndex):
3607         (WebCore::WebGLBuffer::setCachedMaxIndex):
3608         (WebCore::WebGLBuffer::setTarget):
3609         * html/canvas/WebGLContextGroup.cpp:
3610         (WebCore::WebGLContextGroup::loseContextGroup):
3611         * html/canvas/WebGLDrawBuffers.cpp:
3612         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
3613         * html/canvas/WebGLFramebuffer.cpp:
3614         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
3615         (WebCore::WebGLFramebuffer::checkStatus):
3616         (WebCore::WebGLFramebuffer::deleteObjectImpl):
3617         (WebCore::WebGLFramebuffer::initializeAttachments):
3618         (WebCore::WebGLFramebuffer::drawBuffers):
3619         * html/canvas/WebGLRenderingContextBase.cpp:
3620         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
3621         (WebCore::WebGLRenderingContextBase::deleteTexture):
3622         * html/canvas/WebGLVertexArrayObject.cpp:
3623         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
3624         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3625         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
3626         * html/parser/AtomicHTMLToken.h:
3627         (WebCore::AtomicHTMLToken::initializeAttributes):
3628         * html/parser/HTMLConstructionSite.cpp:
3629         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3630         * html/parser/HTMLFormattingElementList.cpp:
3631         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
3632         * html/parser/HTMLPreloadScanner.cpp:
3633         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3634         * html/parser/XSSAuditor.cpp:
3635         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
3636         * html/shadow/ContentDistributor.cpp:
3637         (WebCore::ContentDistributor::distribute):
3638         (WebCore::ContentDistributor::invalidate):
3639         * html/shadow/MediaControlElements.cpp:
3640         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
3641         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
3642         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
3643         * html/track/AudioTrackList.cpp:
3644         (AudioTrackList::getTrackById):
3645         * html/track/LoadableTextTrack.cpp:
3646         (WebCore::LoadableTextTrack::newCuesAvailable):
3647         (WebCore::LoadableTextTrack::newRegionsAvailable):
3648         * html/track/TextTrackCueList.cpp:
3649         (WebCore::TextTrackCueList::getCueById):
3650         (WebCore::TextTrackCueList::activeCues):
3651         * html/track/TextTrackList.cpp:
3652         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
3653         (TextTrackList::invalidateTrackIndexesAfterTrack):
3654         * html/track/TrackListBase.cpp:
3655         (TrackListBase::isAnyTrackEnabled):
3656         * html/track/VideoTrackList.cpp:
3657         (VideoTrackList::getTrackById):
3658
3659 2015-10-06  Alex Christensen  <achristensen@webkit.org>
3660
3661         Report error when main resource is blocked by content blocker
3662         https://bugs.webkit.org/show_bug.cgi?id=149719
3663         rdar://problem/21970595
3664
3665         Reviewed by Brady Eidson.
3666
3667         Test: http/tests/contentextensions/main-resource.html
3668
3669         * English.lproj/Localizable.strings:
3670         * contentextensions/ContentExtensionActions.h:
3671         * contentextensions/ContentExtensionError.h:
3672         (WebCore::ContentExtensions::make_error_code):
3673         * contentextensions/ContentExtensionsBackend.cpp:
3674         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
3675         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
3676         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
3677         now returns a status indicating whether the request should be blocked.
3678         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
3679         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
3680         * contentextensions/ContentExtensionsBackend.h:
3681         * html/HTMLMediaElement.cpp:
3682         (WebCore::HTMLMediaElement::loadResource):
3683         * loader/DocumentLoader.cpp:
3684         (WebCore::DocumentLoader::startLoadingMainResource):
3685         Dispatch an error if the resource is blocked by a content blocker.
3686         * loader/EmptyClients.h:
3687         * loader/FrameLoader.cpp:
3688         (WebCore::FrameLoader::loadResourceSynchronously):
3689         (WebCore::FrameLoader::cancelledError):
3690         (WebCore::FrameLoader::blockedByContentBlockerError):
3691         (WebCore::FrameLoader::connectionProperties):
3692         * loader/FrameLoader.h:
3693         * loader/FrameLoaderClient.h:
3694         * loader/ResourceLoader.cpp:
3695         (WebCore::ResourceLoader::willSendRequestInternal):
3696         * loader/cache/CachedResourceLoader.cpp:
3697         (WebCore::CachedResourceLoader::requestResource):
3698         * page/UserContentController.cpp:
3699         (WebCore::UserContentController::removeAllUserContentExtensions):
3700         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3701         (WebCore::UserContentController::actionsForResourceLoad):
3702         * page/UserContentController.h:
3703         * platform/efl/ErrorsEfl.cpp:
3704         (WebCore::blockedError):
3705         (WebCore::blockedByContentBlockerError):
3706         (WebCore::cannotShowURLError):
3707         * platform/efl/ErrorsEfl.h:
3708         * platform/gtk/ErrorsGtk.cpp:
3709         (WebCore::blockedError):
3710         (WebCore::blockedByContentBlockerError):
3711         (WebCore::cannotShowURLError):
3712         * platform/gtk/ErrorsGtk.h:
3713
3714 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3715
3716         JSBuiltinConstructor must always add builtin header
3717         https://bugs.webkit.org/show_bug.cgi?id=149759
3718
3719         Reviewed by Darin Adler.
3720
3721         Covered by TestJSBuiltinConstructor.idl.
3722
3723         * bindings/scripts/CodeGeneratorJS.pm:
3724         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
3725         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
3726
3727 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3728
3729         Migrate streams API to JS Builtins
3730         https://bugs.webkit.org/show_bug.cgi?id=147092
3731
3732         Reviewed by Darin Adler.
3733
3734         Moved ReadableStream implementation from C++ to JS Builtins.
3735         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
3736         Added these constructors to  JSDOMWindowBase.
3737         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
3738
3739         Covered by existing tests.
3740
3741         * CMakeLists.txt:
3742         * DerivedSources.make:
3743         * Modules/streams/ReadableStream.cpp: Removed.
3744         * Modules/streams/ReadableStream.h: Removed.
3745         * Modules/streams/ReadableStream.idl:
3746         * Modules/streams/ReadableStream.js:
3747         (strategy.size):
3748         (initializeReadableStream):
3749         (cancel):
3750         (getReader):
3751         (pipeTo):
3752         (tee):
3753         (locked):
3754         * Modules/streams/ReadableStreamController.h:
3755         * Modules/streams/ReadableStreamController.idl:
3756         * Modules/streams/ReadableStreamController.js: Added.
3757         (enqueue):
3758         (error):
3759         (close):
3760         (desiredSize):
3761         * Modules/streams/ReadableStreamInternals.js:
3762         (privateInitializeReadableStreamReader):
3763         (privateInitializeReadableStreamController):
3764         (isReadableStream):
3765         (isReadableStreamReader):
3766         (isReadableStreamController):
3767         (errorReadableStream):
3768         (requestReadableStreamPull):
3769         (getReadableStreamDesiredSize):
3770         (releaseReadableStreamReader):
3771         (cancelReadableStream):
3772         (finishClosingReadableStream):
3773         (closeReadableStream):
3774         (closeReadableStreamReader):
3775         (enqueueInReadableStream):
3776         (readFromReadableStreamReader):
3777         (invokeOrNoop):
3778         (promiseInvokeOrNoop):
3779         * Modules/streams/ReadableStreamReader.cpp: Removed.
3780         * Modules/streams/ReadableStreamReader.h:
3781         * Modules/streams/ReadableStreamReader.idl:
3782         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
3783         (cancel):
3784         (read):
3785         (releaseLock):
3786         (closed):
3787         * WebCore.vcxproj/WebCore.vcxproj:
3788         * WebCore.vcxproj/WebCore.vcxproj.filters:
3789         * WebCore.xcodeproj/project.pbxproj:
3790         * bindings/js/JSBindingsAllInOne.cpp:
3791         * bindings/js/JSDOMConstructor.h: Added.
3792         (WebCore::JSBuiltinConstructor::create):
3793         (WebCore::JSBuiltinConstructor::createStructure):
3794         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
3795         (WebCore::JSBuiltinConstructor::initializeProperties):
3796         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
3797         (WebCore::JSBuiltinConstructor<JSClass>::construct):
3798         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
3799         * bindings/js/JSDOMWindowBase.cpp:
3800         (WebCore::JSDOMWindowBase::finishCreation):
3801         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
3802         * bindings/js/JSReadableStreamCustom.cpp: Removed.
3803         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
3804         (WebCore::constructJSReadableStreamController):
3805         (WebCore::constructJSReadableStreamReader):
3806         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
3807         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
3808         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
3809         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
3810         (WebCore::createReadableStreamReaderPrivateConstructor):
3811         (WebCore::createReadableStreamControllerPrivateConstructor):
3812         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
3813         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
3814         * bindings/js/ReadableJSStream.cpp: Removed.
3815         * bindings/js/ReadableJSStream.h: Removed.
3816         * bindings/js/WebCoreBuiltinNames.h: Added.
3817         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
3818         * bindings/js/WebCoreJSBuiltins.cpp:
3819         * bindings/js/WebCoreJSClientData.h:
3820         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
3821         (WebCore::WebCoreJSClientData::builtinNames):
3822         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
3823         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
3824
3825 2015-10-05  Chris Dumez  <cdumez@apple.com>
3826
3827         data: URLs should not be preloaded
3828         https://bugs.webkit.org/show_bug.cgi?id=149829
3829
3830         Reviewed by Ryosuke Niwa.
3831
3832         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
3833         There is no need as the data is already available.
3834
3835         Test: fast/preloader/image-data-url.html
3836
3837         * html/parser/HTMLPreloadScanner.cpp:
3838         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
3839
3840 2015-10-05  Jer Noble  <jer.noble@apple.com>
3841
3842         [iOS] REGRESSION(r190434): Media continues to play when locking screen
3843         https://bugs.webkit.org/show_bug.cgi?id=149822
3844
3845         Reviewed by Brent Fulgham.
3846
3847         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
3848         -applicationDidBecomeActive: called
3849         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
3850         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
3851
3852         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
3853         applicationDidEnterForeground() to more correctly reflect when this notification will be
3854         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
3855         whose paramater is whether the screen was locked. This allows the beginInterruption() and
3856         endInterruption() methods to be correctly balanced.
3857
3858         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
3859         from PlatformMediaSession.h.
3860
3861         * platform/audio/PlatformMediaSession.h:
3862         * platform/audio/PlatformMediaSessionManager.cpp:
3863         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
3864         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
3865         * platform/audio/PlatformMediaSessionManager.h:
3866         * platform/audio/ios/MediaSessionManagerIOS.h:
3867         * platform/audio/ios/MediaSessionManagerIOS.mm:
3868         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
3869         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
3870         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
3871         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
3872         * testing/Internals.cpp:
3873         (WebCore::Internals::applicationDidEnterForeground):
3874         (WebCore::Internals::applicationWillEnterForeground): Deleted.
3875         * testing/Internals.h:
3876         * testing/Internals.idl:
3877
3878 2015-10-05  Alex Christensen  <achristensen@webkit.org>
3879
3880         Invalid CSS Selector for Content Blockers invalidates others
3881         https://bugs.webkit.org/show_bug.cgi?id=148446
3882         rdar://problem/22918235
3883
3884         Reviewed by Benjamin Poulain.
3885
3886         Test: http/tests/contentextensions/invalid-selector.html
3887
3888         * contentextensions/ContentExtensionParser.cpp:
3889         (WebCore::ContentExtensions::loadTrigger):
3890         (WebCore::ContentExtensions::isValidSelector):
3891         (WebCore::ContentExtensions::loadAction):
3892         (WebCore::ContentExtensions::loadRule):
3893         Add a check to see if a selector is valid before adding it.
3894
3895 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3896
3897         CSSGradientValue should check whether gradientLength is zero or not.
3898         https://bugs.webkit.org/show_bug.cgi?id=149373
3899         <rdar://problem/22771418>
3900
3901         Reviewed by Darin Adler.
3902
3903         This is a merge of Blink r158220,
3904         https://chromiumcodereview.appspot.com/24350008
3905
3906         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
3907
3908         * css/CSSGradientValue.cpp:
3909         (WebCore::CSSGradientValue::addStops):
3910         Check whether gradientLength > 0 before using it as denominator.
3911
3912 2015-10-05  Dean Jackson  <dino@apple.com>
3913
3914         EXT_texture_filter_anisotropic extension exposed with WEBKIT_ prefix
3915         https://bugs.webkit.org/show_bug.cgi?id=149765
3916         <rdar://problem/22983722>
3917
3918         Reviewed by Beth Dakin.
3919
3920         We can now remove the WEBKIT_ prefix from this extension.
3921
3922         Test: fast/canvas/webgl/unprefixed-anisotropic-extension.html
3923
3924         * html/canvas/WebGL2RenderingContext.cpp: Support the prefixed and unprefixed form.
3925         (WebCore::WebGL2RenderingContext::getExtension):
3926         * html/canvas/WebGLRenderingContext.cpp:
3927         (WebCore::WebGLRenderingContext::getExtension):
3928         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3929
3930 2015-10-05  Dean Jackson  <dino@apple.com>
3931
3932         Reference cycles during SVG dependency invalidation
3933         https://bugs.webkit.org/show_bug.cgi?id=149824
3934         <rdar://problem/22771412>
3935
3936         Reviewed by Tim Horton.
3937
3938         Detect any reference cycles as we are invalidating.
3939
3940         This is mostly a merge of the following Blink commit:
3941         https://chromium.googlesource.com/chromium/blink/+/a4bc83453bda89823b672877dc02247652a02d51
3942
3943         Test: svg/custom/reference-cycle.svg
3944
3945         * rendering/svg/RenderSVGResource.cpp:
3946         (WebCore::removeFromCacheAndInvalidateDependencies): Keep around a hash
3947         table of dependencies, so that we can detect if an element is already
3948         present before marking it.
3949
3950 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3951
3952         Fix null pointer dereference in WebSocket::connect()        
3953         https://bugs.webkit.org/show_bug.cgi?id=149311
3954         <rdar://problem/22748858>
3955
3956         Reviewed by Chris Dumez.
3957
3958         This is a merge of Blink r187441,
3959         https://codereview.chromium.org/785933005
3960
3961         Test: http/tests/websocket/construct-in-detached-frame.html
3962
3963         * Modules/websockets/WebSocket.cpp:
3964         (WebCore::WebSocket::connect):
3965         Call function implemented below instead of duplicating the code.
3966         * page/ContentSecurityPolicy.cpp:
3967         (WebCore::ContentSecurityPolicy::shouldBypassMainWorldContentSecurityPolicy):
3968         * page/ContentSecurityPolicy.h:
3969         Factor the logic to check shouldBypassMainWorldContentSecurityPolicy into 
3970         a function in this class. Check Frame pointers are not null before getting 
3971         shouldBypassMainWorldContentSecurityPolicy via those pointers.
3972         * page/EventSource.cpp:
3973         (WebCore::EventSource::create):
3974         This got fixed as a bonus.
3975         * xml/XMLHttpRequest.cpp:
3976         (WebCore::XMLHttpRequest::open):
3977         This got fixed as a bonus too.
3978
3979 2015-10-05  Beth Dakin  <bdakin@apple.com>
3980
3981         WebCore::IOSurface should ask the IOSurface for the pixel format instead of 
3982         caching it
3983         https://bugs.webkit.org/show_bug.cgi?id=149820
3984         -and corresponding-
3985         rdar://problem/22976230
3986
3987         Reviewed by Tim Horton.
3988
3989         Also there is no reason to make YUV be iOS only, so this patch removes those 
3990         PLATFORM checks.
3991
3992         * platform/graphics/cocoa/IOSurface.h:
3993         * platform/graphics/cocoa/IOSurface.mm:
3994         (IOSurface::IOSurface):
3995         (IOSurface::format):
3996         * platform/spi/cocoa/IOSurfaceSPI.h:
3997
3998 2015-10-02  Ryosuke Niwa  <rniwa@webkit.org>
3999
4000         ShadowRoot with leading or trailing white space cause a crash
4001         https://bugs.webkit.org/show_bug.cgi?id=149782
4002
4003         Reviewed by Chris Dumez.
4004
4005         Fixed the crash by adding a null pointer check since a TextNode that appears as a direct child
4006         of a ShadowRoot doesn't have a parent element.
4007
4008         Test: fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html
4009
4010         * style/RenderTreePosition.cpp:
4011         (WebCore::RenderTreePosition::previousSiblingRenderer):
4012
4013 2015-10-05  Beth Dakin  <bdakin@apple.com>
4014