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