Fix lifetime handling of SVGPropertyTearOffs
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-01  David Kilzer  <ddkilzer@apple.com>
2
3         Fix lifetime handling of SVGPropertyTearOffs
4         <http://webkit.org/b/129211>
5         <rdar://problem/15696025>
6
7         Reviewed by Maciej Stachowiak.
8
9         Merged from Blink (patch by Ojan Vafai):
10         https://src.chromium.org/viewvc/blink?revision=157801&view=revision
11         http://crbug.com/288771
12
13             -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
14             since it's only used in that one place. This means we can get rid
15             of the templatizing and the method pointer.
16             -Change SVGPropertyTearOff to keep track of it's child tearoffs
17             and call detachWrapper on its child tearoffs when it's destroyed
18             or when it's wrapper is detached.
19             -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
20             to avoid having a cycle.
21
22         Test: svg/transforms/svg-matrix-tearoff-crash.html
23
24         * GNUmakefile.list.am:
25         * WebCore.vcxproj/WebCore.vcxproj:
26         * WebCore.vcxproj/WebCore.vcxproj.filters:
27         * WebCore.xcodeproj/project.pbxproj:
28         * bindings/scripts/CodeGeneratorJS.pm:
29         (NativeToJSValue):
30         * svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
31         (WebCore::SVGMatrixTearOff::create):
32         (WebCore::SVGMatrixTearOff::commitChange):
33         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
34         * svg/properties/SVGPropertyTearOff.h:
35         (WebCore::SVGPropertyTearOff::addChild):
36         (WebCore::SVGPropertyTearOff::detachChildren):
37
38 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
39
40         Unreviewed build fix after r164913.
41
42         * platform/CountedUserActivity.h: Some ports don't (yet) support forwarding headers for WebCore,
43         so UserActivity.h should be included as non-forwarding.
44
45 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
46
47         Change PageActivityAssertionToken to use a WeakPtr
48         https://bugs.webkit.org/show_bug.cgi?id=129526
49
50         Reviewed by Sam Weinig.
51
52         PageThrottler effectively implements a bespoke weak pointer mechanism; remove this & just use WeakPtr.
53
54         * page/PageActivityAssertionToken.cpp:
55         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
56         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
57             - addActivityToken->incrementActivityCount, removeActivityToken->decrementActivityCount
58         * page/PageActivityAssertionToken.h:
59             - removed invalidate, made m_throttler a WeakPtr
60         * page/PageThrottler.cpp:
61         (WebCore::PageThrottler::PageThrottler):
62             - initialize m_weakPtrFactory, m_activityCount.
63         (WebCore::PageThrottler::~PageThrottler):
64             - removed called to invalidate.
65         (WebCore::PageThrottler::startThrottleHysteresisTimer):
66             - m_activityTokens.size()->m_activityCount
67         (WebCore::PageThrottler::throttleHysteresisTimerFired):
68             - m_activityTokens.size()->m_activityCount
69         (WebCore::PageThrottler::incrementActivityCount):
70             - m_activityTokens.add->++
71         (WebCore::PageThrottler::decrementActivityCount):
72             - m_activityTokens.remove->--
73         * page/PageThrottler.h:
74         (WebCore::PageThrottler::weakPtr):
75             - replaced HashSet with WeakPtrFactory & count.
76
77 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
78
79         Split UserActivity/CountedUserActivity
80         https://bugs.webkit.org/show_bug.cgi?id=129520
81
82         Reviewed by Sam Weinig.
83
84         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
85         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
86
87         * WebCore.exp.in:
88             - beginActivity->start, endActivity->stop.
89         * WebCore.xcodeproj/project.pbxproj:
90         * page/PageThrottler.cpp:
91         (WebCore::PageThrottler::PageThrottler):
92         (WebCore::PageThrottler::~PageThrottler):
93         (WebCore::PageThrottler::throttlePage):
94         (WebCore::PageThrottler::unthrottlePage):
95         (WebCore::PageThrottler::setIsVisuallyIdle):
96             - beginActivity->increment, endActivity->decrement.
97         * page/PageThrottler.h:
98             - UserActivity->CountedUserActivity for m_pageActivity
99         * platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
100         (WebCore::CountedUserActivity::CountedUserActivity):
101         (WebCore::CountedUserActivity::increment):
102         (WebCore::CountedUserActivity::decrement):
103             - Added, provides counted interface to UserActivity.
104         * platform/UserActivity.cpp:
105         (WebCore::UserActivity::UserActivity):
106             - m_count removed
107         (WebCore::UserActivity::start):
108         (WebCore::UserActivity::stop):
109             - beginActivity->start, endActivity->stop, implentation now empty.
110         * platform/UserActivity.h:
111             - beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
112         * platform/mac/UserActivityMac.mm:
113         (WebCore::UserActivity::UserActivity):
114             - m_count->m_started
115         (WebCore::UserActivity::isValid):
116             - m_count->m_started
117         (WebCore::UserActivity::start):
118         (WebCore::UserActivity::stop):
119             - beginActivity->start, endActivity->stop, no longer nest
120
121
122 2014-02-28  Benjamin Poulain  <benjamin@webkit.org>
123
124         Caller saved registers can be accidentally discarded when clearing the local stack
125         https://bugs.webkit.org/show_bug.cgi?id=129532
126
127         Reviewed by Andreas Kling.
128
129         Tests: fast/selectors/tree-modifying-case-insensitive-selectors.html
130                fast/selectors/tree-modifying-selectors.html
131
132         StackAllocator::discard() no longer make sense now that we can use caller saved regsiter.
133         We should instead discard everything up to the beginning of the local stack.
134
135         * cssjit/SelectorCompiler.cpp:
136         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
137         * cssjit/StackAllocator.h:
138         (WebCore::StackAllocator::popAndDiscardUpTo):
139
140 2014-02-28  Andy Estes  <aestes@apple.com>
141
142         [iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesizedDocument()
143         https://bugs.webkit.org/show_bug.cgi?id=129534
144
145         Reviewed by Simon Fraser.
146
147         No new tests because TestWebKitAPI does not yet support iOS. See <http://webkit.org/b/129535>.
148
149         * loader/FrameLoader.cpp:
150         (WebCore::FrameLoader::initForSynthesizedDocument): Create a FrameProgressTracker.
151
152 2014-02-28  Sam Weinig  <sam@webkit.org>
153
154         ASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and WebKit2 in the same process
155         https://bugs.webkit.org/show_bug.cgi?id=129528
156
157         Reviewed by Andreas Kling.
158
159         * platform/mac/Language.mm:
160         (WebCore::preferredLanguagesMutex):
161         (WebCore::preferredLanguages):
162         (+[WebLanguageChangeObserver languagePreferencesDidChange:]):
163         (WebCore::httpStyleLanguageCode):
164         (WebCore::platformUserPreferredLanguages):
165         Add a mutex and do an isolated copy of the strings to allow this function to be called from multiple threads.
166
167 2014-02-28  Dean Jackson  <dino@apple.com>
168
169         Crash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsContext3D::getExtensions + 10
170         https://bugs.webkit.org/show_bug.cgi?id=129523
171
172         Reviewed by Simon Fraser.
173
174         * html/canvas/WebGLRenderingContext.cpp:
175         (WebCore::WebGLRenderingContext::getSupportedExtensions): Early return if the
176         context is pending policy resolution.
177
178 2014-02-28  Andreas Kling  <akling@apple.com>
179
180         Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
181         <https://webkit.org/b/129518>
182
183         Only do image and audio element specific checks for element nodes.
184         Time spent in here goes from 0.8% to 0.5% on DYEB.
185
186         Reviewed by Benjamin Poulain.
187
188         * bindings/js/JSNodeCustom.cpp:
189         (WebCore::isReachableFromDOM):
190
191 2014-02-28  Geoffrey Garen  <ggaren@apple.com>
192
193         JSC Assertion failure every time I start Safari (r164846)
194         https://bugs.webkit.org/show_bug.cgi?id=129510
195
196         Reviewed by Mark Hahnenberg.
197
198         Take the lock before allocating objects because afterward is too late.
199
200         * bindings/js/ScriptController.cpp:
201         (WebCore::ScriptController::evaluateInWorld):
202         (WebCore::ScriptController::windowScriptNPObject):
203         (WebCore::ScriptController::jsObjectForPluginElement):
204
205 2014-02-28  Joseph Pecoraro  <pecoraro@apple.com>
206
207         Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
208         https://bugs.webkit.org/show_bug.cgi?id=129512
209
210         Reviewed by Simon Fraser.
211
212         * page/PageDebuggable.cpp:
213         (WebCore::PageDebuggable::connect):
214         (WebCore::PageDebuggable::disconnect):
215
216 2014-02-28  Anders Carlsson  <andersca@apple.com>
217
218         VisitedLinkStore should be able to invalidate link styles for associated pages
219         https://bugs.webkit.org/show_bug.cgi?id=129515
220
221         Reviewed by Dan Bernstein.
222
223         * page/Page.cpp:
224         (WebCore::Page::Page):
225         Add the VisitedLinkStore if we have one.
226
227         (WebCore::Page::~Page):
228         Remove the VisitedLinkStore if we have one.
229
230         * page/VisitedLinkStore.cpp:
231         (WebCore::VisitedLinkStore::~VisitedLinkStore):
232         Assert that we don't have any pages.
233
234         (WebCore::VisitedLinkStore::addPage):
235         Add the page to the set.
236
237         (WebCore::VisitedLinkStore::removePage):
238         Remove the page from the set.
239
240         (WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
241         Traverse all the pages and invalidate the style for all links.
242
243         (WebCore::VisitedLinkStore::invalidateStylesForLink):
244         Traverse all the pages and invalidate the style for a given link.
245
246         * page/VisitedLinkStore.h:
247         Add new members.
248
249 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
250
251         [iOS][WK2] highlight rects should never big bigger than the view
252         https://bugs.webkit.org/show_bug.cgi?id=129472
253
254         Reviewed by Enrica Casucci.
255
256         * WebCore.exp.in:
257
258 2014-02-28  Beth Dakin  <bdakin@apple.com>
259
260         Turn off margin tiles on iOS
261         https://bugs.webkit.org/show_bug.cgi?id=129509
262         -and corresponding-
263         <rdar://problem/16200383>
264
265         Reviewed by Simon Fraser.
266
267         * page/FrameView.cpp:
268         (WebCore::FrameView::needsExtendedBackgroundRectForPainting):
269
270 2014-02-28  Zalan Bujtas  <zalan@apple.com>
271
272         Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
273         https://bugs.webkit.org/show_bug.cgi?id=129226
274
275         Reviewed by Simon Fraser.
276
277         This is the conversion of double, inset, outset, groove and ridge border type
278         painting to support device pixel precision width/height.
279
280         Regression is covered by existing tests.
281
282         * rendering/RenderObject.cpp:
283         (WebCore::RenderObject::drawLineForBoxSide):
284         * rendering/RenderObject.h:
285
286 2014-02-28  Adenilson Cavalcanti  <cavalcantii@gmail.com>
287
288         Filters should test for area instead of single dimension
289         https://bugs.webkit.org/show_bug.cgi?id=123716
290
291         Reviewed by Dirk Schulze.
292
293         A filtered SVG element with a sigle dimension bigger than 5000
294         (counting the margin/border) will fail to render. So an element
295         with 4000x4000 will render fine, while another with 5000x10
296         won't. This patch instead tests against the total element area,
297         which fixes such cases.
298
299         It also fixes some layer violations where FilterEffectRenderer and
300         RenderSVGResourceFilter were directly accessing the maximum filter
301         size in FilterEffect. Since before a somewhat bigger filter would
302         be aborted, it required to change the maximum kernel size
303         for blur filter (some filters are slower to run than others for
304         bigger SVGs).
305
306         Tests: svg/filters/big-height-filter-expected.svg
307                svg/filters/big-height-filter.svg
308                svg/filters/big-width-filter-expected.svg
309                svg/filters/big-width-filter.svg
310
311         * platform/graphics/filters/FEGaussianBlur.cpp:
312         * platform/graphics/filters/FilterEffect.cpp:
313         (WebCore::FilterEffect::maxFilterArea): New function, returns the
314         maximum allowed element area (currently is 4096 x 4096).
315         (WebCore::FilterEffect::isFilterSizeValid): Now it tests for
316         element area instead of a single dimension. This code is reused by
317         FilterEffectRenderer.
318         * platform/graphics/filters/FilterEffect.h:
319         * rendering/FilterEffectRenderer.cpp:
320         (WebCore::FilterEffectRenderer::updateBackingStoreRect): Uses the
321         new function in FilterEffect to test for valid sizes.
322         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Same case.
323         * rendering/svg/RenderSVGResourceFilter.cpp:
324         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Test
325         for maximum area and properly changes the scale of transformed
326         element to fit.
327
328 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
329
330         [Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
331         https://bugs.webkit.org/show_bug.cgi?id=129501
332         <rdar://problem/16198587>
333
334         Reviewed by Eric Carlson.
335
336         * html/HTMLMediaElement.cpp:
337         (WebCore::HTMLMediaElement::parseAttribute): Correct order of arguments
338         to PlatformTextTrack.
339
340 2014-02-28  Bem Jones-Bey  <bjonesbe@adobe.com>
341
342         Properly clear m_logicallyLastRun to remove use-after-free possibility
343         https://bugs.webkit.org/show_bug.cgi?id=129489
344
345         Reviewed by David Hyatt.
346
347         A use-after-free issue was caught in Blink because m_logicallyLastRun
348         is not cleared when the item it points to is deleted. Clearing it
349         turns the use-after-free into a segfault, and prevents any future
350         use-after-frees from happening.
351
352         * platform/text/BidiRunList.h:
353         (WebCore::BidiRunList<Run>::deleteRuns):
354
355 2014-02-28  Jer Noble  <jer.noble@apple.com>
356
357         [Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
358         https://bugs.webkit.org/show_bug.cgi?id=129491
359
360         Reviewed by Alexey Proskuryakov.
361
362         -[NSWindow contentView] returns a bare id, leading to ambiguity when calling
363         certain methods, including -layer and -setLayer:. Resolve the ambiguity by
364         explicitly casting the -contentView call to a NSView*.
365
366         * platform/mac/WebVideoFullscreenController.mm:
367         (-[WebVideoFullscreenController setupVideoOverlay:]):
368         (-[WebVideoFullscreenController windowDidLoad]):
369         (-[WebVideoFullscreenController windowDidExitFullscreen]):
370
371 2014-02-28  Andreas Kling  <akling@apple.com>
372
373         MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
374         <https://webkit.org/b/129477>
375
376         There's no need to compute the exact target-relative coordinates for
377         simulated mouse events, e.g those fired by HTMLElement.click().
378
379         The offsetX/Y properties are not supported by Firefox.
380
381         Test: fast/events/relative-offset-of-simulated-click.html
382
383         Reviewed by Alexey Proskuryakov.
384
385         * dom/MouseRelatedEvent.cpp:
386         (WebCore::MouseRelatedEvent::offsetX):
387         (WebCore::MouseRelatedEvent::offsetY):
388
389 2014-02-27  Sergio Villar Senin  <svillar@igalia.com>
390
391         [CSS Grid Layout] Fix positioning grid items using named grid lines/areas
392         https://bugs.webkit.org/show_bug.cgi?id=129372
393
394         Reviewed by Darin Adler.
395
396         Our code was assuming that a <custom-ident> in
397         -webkit-grid-{column|row}-{start|end} and
398         -webkit-grid-{column|row} was always a grid area name. That's
399         wrong because the <custom-ident> could be also a explicitly named
400         grid line or the an implicitly named grid line created by a grid
401         area definition.
402
403         The style resolution code was not correct either. This patch fixes
404         it so it now matches the spec, which means that:
405         - first we try to match any existing grid area.
406         - then if there is a named grid line with the name
407         <custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
408         defined before the grid area then we use it instead of the grid
409         area.
410         - otherwise if there is a named grid line we resolve to the first such line.
411         - otherwise we treat it as 'auto'.
412
413         Fixing this uncovered a bug in GridPosition, we were not using the
414         name of the stored grid area to check if two GridPositions were
415         the same.
416
417         Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
418                fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html
419
420         * css/StyleResolver.cpp:
421         (WebCore::gridLineDefinedBeforeGridArea): New function to check if
422         a given named grid line was defined before an implicit named grid
423         line created by a grid area definition.
424         (WebCore::StyleResolver::adjustNamedGridItemPosition): New
425         function that adjusts the position of a GridPosition parsed as a
426         grid area.
427         (WebCore::StyleResolver::adjustGridItemPosition): Use the new
428         function adjustNamedGridItemPosition to adjust the positions of
429         named grid lines.
430         * css/StyleResolver.h:
431         * rendering/RenderGrid.cpp:
432         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
433         (WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
434         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
435         * rendering/RenderGrid.h:
436         * rendering/style/GridPosition.h:
437         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
438         (WebCore::GridPosition::adjustGridPositionForSide): Ditto.
439         (WebCore::GridPosition::operator==): Use the named grid line to check equality.
440
441 2014-02-28  Zoltan Horvath  <zoltan@webkit.org>
442
443         [CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
444         https://bugs.webkit.org/show_bug.cgi?id=129461
445
446         Reviewed by David Hyatt.
447
448         Shape-inside can make a line only narrower than the original line width, thus we don't need
449         to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
450         This patch adds a helper function, which updates the line segments, furthermore it updates the
451         line segments only when the content would fit without the shape.
452
453         No new tests, no behavior change.
454
455         * rendering/line/BreakingContextInlineHeaders.h: Use new helper.
456         (WebCore::updateSegmentsForShapes):
457         * rendering/line/LineWidth.cpp: Use new helper.
458         (WebCore::LineWidth::updateLineSegment): Add new helper.
459         (WebCore::LineWidth::fitBelowFloats):
460
461 2014-02-28  Mario Sanchez Prada  <mario.prada@samsung.com>
462
463         paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
464         https://bugs.webkit.org/show_bug.cgi?id=71194
465
466         Reviewed by David Hyatt.
467
468         Merged from Blink r157263 by <igor.o@sisa.samsung.com>
469         <https://src.chromium.org/viewvc/blink?revision=157263&view=revision>
470
471         In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):
472
473         The start and end edges of a line box are determined by the inline
474         base direction of the line box. In most cases, this is given by
475         its containing block's computed ‘direction’. However if its
476         containing block has ‘unicode-bidi: plaintext’, the inline base
477         direction the line box must be determined by the base direction of
478         the bidi paragraph to which it belongs: that is, the bidi
479         paragraph for which the line box holds content.
480
481         This patch just implements the behavior described above modifying
482         updateLogicalWidthForAlignment and setting the bidi level of the
483         RootInlineBox.
484
485         * rendering/RenderBlockFlow.h:
486         * rendering/RenderBlockLineLayout.cpp:
487         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
488         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
489         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
490         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
491         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
492         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
493         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
494
495 2014-02-28  Jochen Eisinger  <jochen@chromium.org>
496
497         Update meta-referrer behavior for invalid policies
498         https://bugs.webkit.org/show_bug.cgi?id=129475
499
500         This patch aligns the behavior with the CSP 1.1 referrer directive,
501         where the fallback for an invalid value is the "never" policy.
502
503         Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627
504
505         Reviewed by Alexey Proskuryakov.
506
507         Test: http/tests/security/referrer-policy-invalid.html
508
509         * dom/Document.cpp:
510         (WebCore::Document::processReferrerPolicy):
511
512 2014-02-28  Daniel Bates  <dabates@apple.com>
513
514         SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
515         https://bugs.webkit.org/show_bug.cgi?id=127029
516
517         Reviewed by Darin Adler.
518
519         SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
520         failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
521         the maximum decoded size (Settings::maximumDecodedImageSize()).
522
523         Test: fast/images/decoded-size-exceeds-max-decoded-size.html
524
525         * loader/SubresourceLoader.cpp:
526         (WebCore::SubresourceLoader::didFinishLoading):
527
528 2014-02-28  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
529
530         ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in WebCore::RenderGeometryMap::mapToContainer
531         https://bugs.webkit.org/show_bug.cgi?id=119626
532
533         SVGRenderSupport::mapLocalToContainer() was trying to apply transforms
534         in the incorrect order. Specifically, it would attempt to apply its
535         localToParentTransform before its localToBorderBoxTransform. This
536         was causing an ASSERT to fail when the computed transforms didn't
537         match up to those computed by RenderGeometryMap.
538
539         Backported from Blink: https://codereview.chromium.org/143363004
540
541         Reviewed by Simon Fraser.
542
543         Test: svg/transforms/svg-geometry-crash.html
544
545         * rendering/svg/SVGRenderSupport.cpp:
546         (WebCore::SVGRenderSupport::mapLocalToContainer):
547
548 2014-02-28  Mihnea Ovidenie  <mihnea@adobe.com>
549
550         [CSSRegions] ASSERTION FAILED: !m_regionsInvalidated in RenderFlowThread::regionAtBlockOffset
551         https://bugs.webkit.org/show_bug.cgi?id=129371
552
553         Reviewed by Andrei Bucur.
554
555         regionAtBlockOffset method is meant to be used after the flow thread validated
556         its region chain, otherwise we cannot rely on regionAtBlockOffset to determine correctly
557         the target region based on the offset in flow thread coordinates.
558
559         When the video element is collected in a named flow and displayed in a region, we ensure
560         that the region's decorations are taken into account to properly position the video.
561         However, we have to do that only if the named flow regions are validated.
562
563         I changed the method cachedRegionForCompositedLayer to check only the "cached" region
564         for a layer and not update the layer to region mappings before returning the region.
565         Because method cachedRegionForCompositedLayer does not update the region - layer mappings,
566         the code does not call regionAtBlockOffset in situations where the region chain is not validated yet.
567
568         Test: compositing/regions/video-in-overflow-region.html
569
570         * rendering/RenderFlowThread.cpp:
571         (WebCore::RenderFlowThread::getLayerListForRegion): Make it a getter that relies on
572         cached information and refrain from updating the mappings. Make it const too.
573         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
574         * rendering/RenderFlowThread.h:
575
576 2014-02-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
577
578         [GTK] Finetune captions menu as per design team
579         https://bugs.webkit.org/show_bug.cgi?id=129432
580
581         Reviewed by Eric Carlson.
582
583         Some design fine tuning of the captions dialog was required.
584         
585         No new tests, current suffice.
586
587         * Modules/mediacontrols/mediaControlsApple.js:
588         Added out class.
589         * Modules/mediacontrols/mediaControlsGtk.js:
590         (ControllerGtk.prototype.buildCaptionMenu): Setting out class when
591         menu is going to show overlap the panel right border.
592         * css/mediaControlsGtk.css:
593         (video::-webkit-media-controls-closed-captions-container.out):
594         Setting all borders to 5px;
595         (video::-webkit-media-controls-closed-captions-container h3):
596         Reduced font size and increasing top padding.
597         (video::-webkit-media-controls-closed-captions-container ul):
598         Increased top padding.
599
600 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
601
602         Element::attributeChanged shouldn't do any work when attribute value didn't change
603         https://bugs.webkit.org/show_bug.cgi?id=129467
604
605         Reviewed by Geoffrey Garen.
606
607         Exit early in childrenChanged when the attribute value didn't change.
608
609         * dom/Attr.cpp:
610         (WebCore::Attr::setValue):
611         (WebCore::Attr::childrenChanged):
612         * dom/Element.cpp:
613         (WebCore::Element::setAttributeInternal):
614         (WebCore::Element::attributeChanged):
615         (WebCore::Element::parserSetAttributes):
616         (WebCore::Element::removeAttributeInternal):
617         (WebCore::Element::didAddAttribute):
618         (WebCore::Element::didModifyAttribute):
619         (WebCore::Element::didRemoveAttribute):
620         (WebCore::Element::cloneAttributesFromElement):
621         * dom/Element.h:
622         * dom/StyledElement.cpp:
623         (WebCore::StyledElement::attributeChanged):
624         * dom/StyledElement.h:
625         * html/HTMLInputElement.cpp:
626         (WebCore::HTMLInputElement::updateType):
627         * mathml/MathMLElement.cpp:
628         (WebCore::MathMLElement::attributeChanged):
629         * mathml/MathMLElement.h:
630         * mathml/MathMLSelectElement.cpp:
631         (WebCore::MathMLSelectElement::attributeChanged):
632         * mathml/MathMLSelectElement.h:
633         * svg/SVGElement.cpp:
634         (WebCore::SVGElement::attributeChanged):
635         * svg/SVGElement.h:
636
637 2014-02-27  Jinwoo Song  <jinwoo7.song@samsung.com>
638
639         [EFL] Remove duplicated keyboard string key from keyMap
640         https://bugs.webkit.org/show_bug.cgi?id=129469
641
642         Reviewed by Gyuyoung Kim.
643
644         "Down" key is duplicated in keyMap().
645
646         * platform/efl/EflKeyboardUtilities.cpp:
647         (WebCore::createKeyMap):
648
649 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
650
651         Unify the three call sites of SelectorQueryCache
652         https://bugs.webkit.org/show_bug.cgi?id=129249
653
654         Reviewed by Andreas Kling.
655
656         The three call sites of SelectorQueryCache were doing the exact same thing.
657         That code is mvoed to a new function Document::selectorQueryForString().
658
659         Also use String instead of AtomicString for querySelector() and querySelectorAll().
660         This prevent the call sites from creating AtomicString just for the time of the call.
661         This causes a tiny slow down on microbenchmarks that continuously query the same string
662         but has no negative impact on realistic/good test cases (and the bindings are simplified).
663
664         * dom/ContainerNode.cpp:
665         (WebCore::ContainerNode::querySelector):
666         (WebCore::ContainerNode::querySelectorAll):
667         * dom/ContainerNode.h:
668         * dom/Document.cpp:
669         (WebCore::Document::selectorQueryForString):
670         * dom/Document.h:
671         * dom/Element.cpp:
672         (WebCore::Element::webkitMatchesSelector):
673         * dom/SelectorQuery.cpp:
674         (WebCore::SelectorQueryCache::add):
675         * dom/SelectorQuery.h:
676
677 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
678
679         JSC ignores the extra memory cost of HTMLCollection after a major GC
680         https://bugs.webkit.org/show_bug.cgi?id=129450
681
682         Reviewed by Andreas Kling.
683
684         Report the extra memory cost of HTMLCollection to JSC.
685
686         Unfortunately, the existing mechanism to report the extra memory cost in toJS is insufficient for
687         HTMLCollection since collection caches are populated later when HTMLCollection is accessed. Also,
688         the extra memory cost reported by Heap::reportExtraMemoryCost will be thrown away after a major GC.
689
690         To work around this limitation, added a visitor.reportExtraMemoryUsage call inside visitChildren
691         for interfaces with a newly added ReportExtraMemoryCost IDL extension flag to report the extra cost.
692
693         Since we may need to generate visitChildren when this flag is set, we can't automatically detect
694         and generate calls using C++ template as done in r148648.
695
696         * CMakeLists.txt:
697         * GNUmakefile.list.am:
698         * Modules/webaudio/AudioBuffer.idl:
699         * WebCore.vcxproj/WebCore.vcxproj:
700         * WebCore.xcodeproj/project.pbxproj:
701         * bindings/js/JSDOMBinding.h:
702         * bindings/scripts/CodeGeneratorJS.pm:
703         (InstanceNeedsVisitChildren):
704         (GenerateHeader):
705         (GenerateImplementation):
706         * bindings/scripts/IDLAttributes.txt:
707         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
708         (WebCore::toJS):
709         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
710         (WebCore::toJS):
711         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
712         (WebCore::toJS):
713         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
714         (WebCore::toJS):
715         * bindings/scripts/test/JS/JSTestException.cpp:
716         (WebCore::toJS):
717         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
718         (WebCore::toJS):
719         * bindings/scripts/test/JS/JSTestInterface.cpp:
720         (WebCore::toJS):
721         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
722         (WebCore::toJS):
723         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
724         (WebCore::toJS):
725         * bindings/scripts/test/JS/JSTestObj.cpp:
726         (WebCore::toJS):
727         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
728         (WebCore::toJS):
729         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
730         (WebCore::toJS):
731         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
732         (WebCore::toJS):
733         * bindings/scripts/test/JS/JSattribute.cpp:
734         (WebCore::toJS):
735         * bindings/scripts/test/JS/JSreadonly.cpp:
736         (WebCore::toJS):
737         * dom/ChildNodeList.h:
738         * dom/CollectionIndexCache.cpp: Added.
739         (WebCore::reportExtraMemoryCostForCollectionIndexCache):
740         * dom/CollectionIndexCache.h:
741         (WebCore::CollectionIndexCache::memoryCost):
742         (WebCore::NodeType>::CollectionIndexCache):
743         (WebCore::NodeType>::nodeCount):
744         (WebCore::NodeType>::computeNodeCountUpdatingListCache):
745         (WebCore::NodeType>::nodeAt):
746         (WebCore::NodeType>::invalidate):
747         * dom/DOMAllInOne.cpp:
748         * dom/LiveNodeList.cpp:
749         (WebCore::LiveNodeList::memoryCost):
750         * dom/LiveNodeList.h:
751         * dom/NodeList.h:
752         (WebCore::NodeList::memoryCost):
753         * dom/NodeList.idl:
754         * html/HTMLCollection.cpp:
755         (WebCore::HTMLCollection::updateNamedElementCache):
756         * html/HTMLCollection.h:
757         (WebCore::CollectionNamedElementCache::didPopulate):
758         (WebCore::CollectionNamedElementCache::memoryCost):
759         (WebCore::CollectionNamedElementCache::find):
760         (WebCore::HTMLCollection::memoryCost):
761         * html/HTMLCollection.idl:
762         * html/HTMLFormControlsCollection.cpp:
763         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
764
765 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
766
767         Compile attribute value matching
768         https://bugs.webkit.org/show_bug.cgi?id=129228
769
770         Reviewed by Geoffrey Garen.
771
772         Add support for compiling value matching when matching attributes in Selector.
773         This patch only adds exact matching, the other cases will follow.
774
775         There is a little infrastructure changes since FunctionCall now needs to support
776         calls taking 2 arguments. The fun begins when the arguments are not in the right
777         registers and need to be moved to the right place. Otherwise the code is straightforward.
778
779         In SelectorCompiler, it is necessary to handle two different cases of matching: case sensitive
780         and case insensitive. The choice is done in part at compilation time by asking HTMLDocument
781         if the name filter can include case insensitive attribute. The other part is done at runtime
782         by querying the element for its type and document.
783
784         Test: fast/selectors/case-insensitive-value-matching.html
785
786         * css/SelectorChecker.cpp:
787         (WebCore::attributeValueMatches): Null values matching should never happen, when an attribute
788         has no value, its value is empty.
789
790         * cssjit/FunctionCall.h:
791         (WebCore::FunctionCall::FunctionCall):
792         Add support for calls with two arguments.
793         (WebCore::FunctionCall::setOneArgument):
794         (WebCore::FunctionCall::setTwoArguments):
795         (WebCore::FunctionCall::swapArguments):
796         Here we need to swap two registers, but we cannot allocate a new register (because the context
797         of the function call may have taken all the available registers already).
798
799         On x86, the solution is simple, we can swap the two registers without side effects.
800
801         On other platforms, it is a little more complex. If there is any available register, we can just
802         use it as a temporary to make the swap.
803         If there are no available registers, we know that all the registers are taken. Since swapArguments()
804         was called after pushing all the arguments on the stack, we can safely trash the value of any of those.
805         We take the first available register that is not a function argument and use it as a temporary.
806
807         (WebCore::FunctionCall::prepareAndCall):
808         This is the fun part, we have two registers where the values must go before the function call. The values
809         can be in any combination of the allocated registers. The code here needs to move the two values to
810         their target register while avoiding conflicts.
811
812         * cssjit/SelectorCompiler.cpp:
813         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
814         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch):
815         (WebCore::SelectorCompiler::AttributeMatchingInfo::selector):
816         The value of HTMLDocument::isCaseSensitiveAttribute is needed at compilation time to compute the number
817         of required registers. As a result, we need to keep it along in the selector fragment.
818
819         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
820         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
821         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
822         (WebCore::SelectorCompiler::minimumRegisterRequirements):
823         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
824         (WebCore::SelectorCompiler::canMatchStyleAttribute):
825         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
826         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
827         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
828         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
829         The matching code is moved in a local scope. This is done to recover the register of qualifiedNameImpl
830         before doing any value matching. That register can then be used to store the expected value when matching
831         an attribute value.
832         It is unfortunate there is so much register pressure in this part.
833
834         Value matching is done outside the loop. The idea is to keep the loop really small since in the vast majority
835         of cases, name matching fails.
836         If the value matching fails, we jump back into the tight loop.
837
838         This is not ideal in all situation. For example trivial name matching with trivial value matching should
839         be done in loop. There is a FIXME to improve those cases later.
840
841         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
842         (WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
843         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
844         In the case sensitive branch, things are really simple. We have to AtomicStringImpl pointers, if they
845         don't match, it is a failure.
846
847         The case sensitive branch start by comparing the pointers in case the values are equal. This is a common
848         case and it simplifies the cases for SVG, XHTML, etc.
849         If the two values are not equal, we must first find if the context requires case insensitive comparison
850         (HTMLElement in HTMLDocument). If the conditions require case insensitive matching, we then fall back
851         to a function call.
852
853         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
854         * dom/Attribute.h:
855         (WebCore::Attribute::valueMemoryOffset):
856         * dom/Document.h:
857         (WebCore::Document::documentClassesMemoryOffset):
858         (WebCore::Document::isHTMLDocumentClassFlag):
859         * dom/Node.h:
860         (WebCore::Node::treeScopeMemoryOffset):
861         * dom/TreeScope.h:
862         (WebCore::TreeScope::documentScopeMemoryOffset):
863
864 2014-02-27  Ryuan Choi  <ryuan.choi@samsung.com>
865
866         Build break when disabled CSS_GRID_LAYOUT
867         https://bugs.webkit.org/show_bug.cgi?id=129459
868
869         Reviewed by Gyuyoung Kim.
870
871         * css/CSSValue.h: Added guards of CSS_GRID_LAYOUT for GridTemplateAreasClass.
872
873 2014-02-17  Myles C. Maxfield  <mmaxfield@apple.com>
874
875         text-decoration-skip: ink does not skip over SVG fonts
876         https://bugs.webkit.org/show_bug.cgi?id=128936
877
878         Reviewed by Darin Adler.
879
880         When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
881         the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
882         for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
883         to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
884         which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
885         rather than if the FontData itself is SVG or not.
886
887         Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html
888
889         * platform/graphics/Font.h:
890         (WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
891         * platform/graphics/cg/PathCG.cpp:
892         (WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
893         * platform/graphics/Path.h:
894         * platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
895         instance
896         * platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
897         regular (CoreText) glyphs
898         (WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
899         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
900         (WebCore::MacGlyphToPathTranslator::incrementIndex):
901         (WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
902         to successively generate Paths
903         * rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
904         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
905         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
906         (WebCore::SVGGlyphToPathTranslator::incrementIndex):
907         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
908         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
909         * rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration
910
911 2014-02-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
912
913         [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
914         https://bugs.webkit.org/show_bug.cgi?id=129449
915
916         Reviewed by Eric Carlson.
917
918         According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
919         constructor.
920
921         Existing tests were updated.
922
923         * Modules/mediastream/RTCPeerConnection.cpp:
924         (WebCore::RTCPeerConnection::create):
925         (WebCore::RTCPeerConnection::RTCPeerConnection):
926         (WebCore::RTCPeerConnection::updateIce):
927         (WebCore::RTCPeerConnection::addStream):
928         * Modules/mediastream/RTCPeerConnection.h:
929         * Modules/mediastream/RTCPeerConnection.idl:
930         * bindings/js/JSRTCPeerConnectionCustom.cpp:
931         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
932         * platform/mediastream/RTCPeerConnectionHandler.h:
933         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
934         (WebCore::RTCPeerConnectionHandlerMock::initialize):
935         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
936         (WebCore::RTCPeerConnectionHandlerMock::addStream):
937         * platform/mock/RTCPeerConnectionHandlerMock.h:
938
939 2014-02-27  Radu Stavila  <stavila@adobe.com>
940
941         [CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
942         https://bugs.webkit.org/show_bug.cgi?id=129428
943
944         Reviewed by Andreas Kling.
945
946         Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
947         sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
948         generic RenderFlowThread.
949
950         No new tests required. No new functionality.
951
952         * rendering/RenderBlock.cpp:
953         (WebCore::RenderBlock::paintObject):
954         * rendering/RenderFlowThread.cpp:
955         * rendering/RenderFlowThread.h:
956         * rendering/RenderNamedFlowThread.cpp:
957         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
958         * rendering/RenderNamedFlowThread.h:
959
960 2014-02-27  Zoltan Horvath  <zoltan@webkit.org>
961
962         Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
963         https://bugs.webkit.org/show_bug.cgi?id=129433
964
965         Reviewed by Darin Adler.
966
967         This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.
968
969         No new tests, no behavior change.
970
971         * rendering/line/LineWidth.cpp:
972         (WebCore::availableWidthAtOffset):
973         (WebCore::LineWidth::updateLineDimension):
974         (WebCore::LineWidth::wrapNextToShapeOutside):
975         (WebCore::LineWidth::fitBelowFloats):
976         * rendering/line/LineWidth.h:
977
978 2014-02-27  Andreas Kling  <akling@apple.com>
979
980         Micro-optimize elementAffectsDirectionality().
981         <https://webkit.org/b/129444>
982
983         Tweak this function to skip an unnecessary bit check and use
984         fastHasAttribute() instead of hasAttribute() for looking up dirAttr.
985
986         ~1% speedup on DYEB/AngularJS.
987
988         Reviewed by Ryosuke Niwa.
989
990         * html/HTMLElement.cpp:
991         (WebCore::elementAffectsDirectionality):
992
993 2014-02-27  Brian Burg  <bburg@apple.com>
994
995         Web Inspector: model tests should use a special Test.html inspector page
996         https://bugs.webkit.org/show_bug.cgi?id=129190
997
998         Reviewed by Timothy Hatcher.
999
1000         Convert InspectorController::isUnderTest() into a flag, and expose an
1001         Internals method so it can be set by the test before opening the inspector.
1002
1003         Test: inspector/test-harness-trivially-works.html
1004
1005         * inspector/InspectorController.cpp:
1006         (WebCore::InspectorController::evaluateForTestInFrontend):
1007         * inspector/InspectorController.h:
1008         * testing/Internals.cpp:
1009         (WebCore::Internals::setInspectorIsUnderTest): Added.
1010         * testing/Internals.h:
1011         * testing/Internals.idl:
1012
1013 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1014
1015         Unreviewed build fix after r164824.
1016
1017         Accidentally re-added some code that was removed.
1018
1019         * page/ContentSecurityPolicy.cpp:
1020
1021 2014-02-26  Alex Christensen  <achristensen@webkit.org>
1022
1023         Compile fix when not using TEXTURE_MAPPER_GL.
1024         https://bugs.webkit.org/show_bug.cgi?id=129417
1025
1026         Reviewed by Darin Adler.
1027
1028         * platform/graphics/texmap/TextureMapperGL.cpp:
1029         Protect platformCreateAccelerated with USE(TEXTURE_MAPPER_GL).
1030
1031 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1032
1033         Web Inspector: JSContext inspection should report exceptions in the console
1034         https://bugs.webkit.org/show_bug.cgi?id=128776
1035
1036         Reviewed by Timothy Hatcher.
1037
1038         Include some clean up of ConsoleMessage and ScriptCallStack construction.
1039
1040         Covered by existing tests.
1041
1042         * bindings/js/JSDOMBinding.cpp:
1043         (WebCore::reportException):
1044         Simplify code now that createStackTraceFromException handles it.
1045
1046         * page/ContentSecurityPolicy.cpp:
1047         (WebCore::gatherSecurityPolicyViolationEventData):
1048         (WebCore::ContentSecurityPolicy::reportViolation):
1049         ScriptCallStack can give us the first non-native callframe.
1050
1051         * inspector/InspectorResourceAgent.cpp:
1052         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1053         * inspector/PageDebuggerAgent.cpp:
1054         (WebCore::PageDebuggerAgent::breakpointActionLog):
1055         * inspector/TimelineRecordFactory.cpp:
1056         (WebCore::TimelineRecordFactory::createGenericRecord):
1057         * page/Console.cpp:
1058         (WebCore::internalAddMessage):
1059         (WebCore::Console::profile):
1060         (WebCore::Console::profileEnd):
1061         (WebCore::Console::timeEnd):
1062         * page/ContentSecurityPolicy.cpp:
1063         (WebCore::gatherSecurityPolicyViolationEventData):
1064         (WebCore::ContentSecurityPolicy::reportViolation):
1065         * page/DOMWindow.cpp:
1066         (WebCore::DOMWindow::postMessage):
1067
1068 2014-02-27  Andreas Kling  <akling@apple.com>
1069
1070         Remove FeatureObserver.
1071         <https://webkit.org/b/129439>
1072
1073         This code was only used by the Chromium port and nobody else is
1074         making use of it.
1075
1076         Reviewed by Anders Carlsson.
1077
1078         * CMakeLists.txt:
1079         * GNUmakefile.list.am:
1080         * WebCore.vcxproj/WebCore.vcxproj:
1081         * WebCore.vcxproj/WebCore.vcxproj.filters:
1082         * WebCore.xcodeproj/project.pbxproj:
1083         * dom/EventTarget.cpp:
1084         (WebCore::EventTarget::fireEventListeners):
1085         * dom/EventTarget.h:
1086         * html/ColorInputType.cpp:
1087         * html/ColorInputType.h:
1088         * html/DateInputType.cpp:
1089         * html/DateInputType.h:
1090         * html/DateTimeInputType.cpp:
1091         * html/DateTimeInputType.h:
1092         * html/DateTimeLocalInputType.cpp:
1093         * html/DateTimeLocalInputType.h:
1094         * html/EmailInputType.cpp:
1095         * html/EmailInputType.h:
1096         * html/HTMLDataListElement.cpp:
1097         (WebCore::HTMLDataListElement::create):
1098         * html/HTMLFormControlElement.cpp:
1099         (WebCore::HTMLFormControlElement::parseAttribute):
1100         * html/HTMLInputElement.cpp:
1101         (WebCore::HTMLInputElement::parseAttribute):
1102         * html/HTMLTextFormControlElement.cpp:
1103         (WebCore::HTMLTextFormControlElement::parseAttribute):
1104         * html/InputType.cpp:
1105         * html/InputType.h:
1106         * html/MonthInputType.cpp:
1107         * html/MonthInputType.h:
1108         * html/NumberInputType.cpp:
1109         * html/NumberInputType.h:
1110         * html/RangeInputType.cpp:
1111         * html/RangeInputType.h:
1112         * html/SearchInputType.cpp:
1113         * html/SearchInputType.h:
1114         * html/TelephoneInputType.cpp:
1115         * html/TelephoneInputType.h:
1116         * html/TextInputType.cpp:
1117         * html/TextInputType.h:
1118         * html/TimeInputType.cpp:
1119         * html/TimeInputType.h:
1120         * html/URLInputType.cpp:
1121         * html/URLInputType.h:
1122         * html/WeekInputType.cpp:
1123         * html/WeekInputType.h:
1124         * loader/DocumentLoader.cpp:
1125         (WebCore::DocumentLoader::responseReceived):
1126         * loader/FrameLoader.cpp:
1127         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1128         (WebCore::FrameLoader::dispatchDidCommitLoad):
1129         * page/ContentSecurityPolicy.cpp:
1130         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1131         * page/EventHandler.cpp:
1132         (WebCore::EventHandler::selectCursor):
1133         * page/FeatureObserver.cpp: Removed.
1134         * page/FeatureObserver.h: Removed.
1135         * page/Page.h:
1136         * rendering/RenderDeprecatedFlexibleBox.cpp:
1137         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
1138         * rendering/RenderLayer.cpp:
1139         (WebCore::RenderLayer::calculateClipRects):
1140         * workers/SharedWorker.cpp:
1141         (WebCore::SharedWorker::create):
1142         * workers/Worker.cpp:
1143         (WebCore::Worker::create):
1144
1145 2014-02-27  Chris Fleizach  <cfleizach@apple.com>
1146
1147         speechSynthesis.speak of a zero length utterance kills future speech
1148         https://bugs.webkit.org/show_bug.cgi?id=129403
1149
1150         Reviewed by Mario Sanchez Prada.
1151
1152         Empty length strings may choke a synthesizer and result in didFinishSpeaking not being called. 
1153         The WebKit code should be proactive about screening out empty length strings.
1154
1155         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak-empty-string.html
1156
1157         * Modules/speech/SpeechSynthesis.cpp:
1158         (WebCore::SpeechSynthesis::startSpeakingImmediately):
1159
1160 2014-02-27  Commit Queue  <commit-queue@webkit.org>
1161
1162         Unreviewed, rolling out r164783.
1163         http://trac.webkit.org/changeset/164783
1164         https://bugs.webkit.org/show_bug.cgi?id=129425
1165
1166         Broke number of multicol tests (Requested by anttik on
1167         #webkit).
1168
1169         * rendering/RenderBlock.cpp:
1170         (WebCore::RenderBlock::containingColumnsBlock):
1171
1172 2014-02-27  Antoine Quint  <graouts@webkit.org>
1173
1174         Respect SVG fragment identifiers in <img> src attribute
1175         https://bugs.webkit.org/show_bug.cgi?id=129387
1176
1177         Reviewed by Antti Koivisto.
1178
1179         Test: svg/css/svg-resource-fragment-identifier-img-src.html
1180
1181         When providing an SVG image for a given renderer, check that the URL used to load
1182         that image is taken into account in case it featured a fragment identifier, ensuring
1183         that the CSS :target pseudo-class is correctly handled for SVG resources. This patch
1184         is specific to <img> elements, specific support will also need to be added for various
1185         CSS properties that support SVG images.
1186
1187         * svg/graphics/SVGImageCache.cpp:
1188         (WebCore::SVGImageCache::imageForRenderer):
1189         Check if the provided renderer is attached to an <img> element and, if so, pass the
1190         resolved <img> source URL, taking into account srcset, to the SVGImageForContainer.
1191
1192         * svg/graphics/SVGImageForContainer.cpp:
1193         (WebCore::SVGImageForContainer::setURL):
1194         Trigger the FrameView machinery to ensure that the :target pseudo-class is respected
1195         should the provided URL feature a fragment identifier.
1196
1197         * svg/graphics/SVGImageForContainer.h:
1198         Declare the new setURL() method.
1199
1200 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
1201
1202         [ATK] Fix style errors in enum members
1203         https://bugs.webkit.org/show_bug.cgi?id=129421
1204
1205         Reviewed by Mario Sanchez Prada.
1206
1207         No new tests. No new functionality.
1208
1209         Enum members should use InterCaps with an initial capital letter.
1210
1211         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1212         (getInterfaceMaskFromObject):
1213
1214 2014-02-27  Mihai Tica  <mitica@adobe.com>
1215
1216         [CSS Blending] Parse and implement the -webkit-isolation CSS property.
1217
1218         https://bugs.webkit.org/show_bug.cgi?id=128958
1219
1220         Reviewed by Dirk Schulze.
1221
1222         Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec.
1223         This patch adds functionality for HTML and SVG.
1224         -webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element.
1225
1226         Tests: css3/compositing/isolation-isolate-blended-child.html
1227                css3/compositing/isolation-parsing.html
1228                css3/compositing/svg-isolation-default.html
1229                css3/compositing/svg-isolation-isolated-group.html
1230                css3/compositing/svg-isolation-simple.html
1231
1232         * css/CSSComputedStyleDeclaration.cpp:
1233         (WebCore::ComputedStyleExtractor::propertyValue):
1234         * css/CSSParser.cpp:
1235         (WebCore::isValidKeywordPropertyAndValue):
1236         (WebCore::isKeywordPropertyID):
1237         (WebCore::CSSParser::parseValue):
1238         * css/CSSPrimitiveValueMappings.h:
1239         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1240         (WebCore::CSSPrimitiveValue::operator Isolation):
1241         * css/CSSPropertyNames.in: Add -webkit-isolation.
1242         * css/CSSValueKeywords.in: Add the isolate value.
1243         * css/DeprecatedStyleBuilder.cpp:
1244         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1245         * css/StyleResolver.cpp:
1246         (WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context.
1247         * rendering/style/RenderStyle.cpp:
1248         (WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint.
1249         * rendering/style/RenderStyle.h: Setters and getters for isolation.
1250         * rendering/style/RenderStyleConstants.h: Add Isolation enum.
1251         * rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation.
1252         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1253         (WebCore::StyleRareNonInheritedData::operator==):
1254         * rendering/style/StyleRareNonInheritedData.h:
1255         * rendering/svg/SVGRenderingContext.cpp:
1256         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer.
1257
1258 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
1259
1260         [ATK] Utilize AtkTableCell to expose directly AccessibilityTableCell to AT
1261         https://bugs.webkit.org/show_bug.cgi?id=129250
1262
1263         Reviewed by Mario Sanchez Prada.
1264
1265         Test: accessibility/table-scope.html
1266
1267         Exposing AtkTableCell to AT. Implementing possibility to get column headers and row headers
1268         as an array of cells.
1269
1270         * GNUmakefile.list.am:
1271         * PlatformEfl.cmake:
1272         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Added.
1273         (convertToGPtrArray):
1274         (core):
1275         (webkitAccessibleTableCellGetColumnHeaderCells):
1276         (webkitAccessibleTableCellGetRowHeaderCells):
1277         (webkitAccessibleTableCellInterfaceInit):
1278         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Added.
1279         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1280         (getInterfaceMaskFromObject):
1281
1282 2014-02-27  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1283
1284         Improving containing column block determination
1285         https://bugs.webkit.org/show_bug.cgi?id=125449
1286
1287         Reviewed by Darin Adler.
1288
1289         Making sure that the containing column block of any elements
1290         can not be oneself.
1291
1292         Test: fast/css/crash-on-column-splitting.html
1293
1294         * rendering/RenderBlock.cpp:
1295         (WebCore::RenderBlock::containingColumnsBlock):
1296         (WebCore::RenderBlock::splitFlow):
1297
1298 2014-02-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1299
1300         [GTK] Improve JavaScript multimedia controls
1301         https://bugs.webkit.org/show_bug.cgi?id=129044
1302
1303         Reviewed by Jer Noble.
1304
1305         After webkit.org/b/123097 a follow up was needed to improve
1306         accessibily and some other cosmetic problems, like cleaner CSS and
1307         new missing baselines.
1308
1309         No new tests because of no new functionality.
1310
1311         * Modules/mediacontrols/mediaControlsApple.js:
1312         Added hiding class name.
1313         * Modules/mediacontrols/mediaControlsGtk.js:
1314         (ControllerGtk.prototype.createControls): Set remaining time as
1315         hidden by default and turned volumebox hidden into hiding.
1316         (ControllerGtk.prototype.updateTime): Simplified the hiding and
1317         showing by removing the show class and using hidden only.
1318         (ControllerGtk.prototype.handleMuteButtonMouseOver):
1319         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden
1320         into hiding.
1321         (ControllerGtk.prototype.updateReadyState): Changed coding style
1322         and added down class for the panel too.
1323         (ControllerGtk.prototype.updatePlaying): Change for coding style
1324         coherence.
1325         (ControllerGtk.prototype.handleCaptionButtonClicked): Call
1326         handleCaptionButtonShowMenu.
1327         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Call
1328         handleCaptionButtonShowMenu.
1329         (ControllerGtk.prototype.handleCaptionButtonShowMenu): Created
1330         with the former behavior of handleCaptionButtonMouseOver.
1331         * css/mediaControlsGtk.css:
1332         (.hidden): Set display none for all objects with hidden class.
1333         (audio::-webkit-media-controls-panel *:focus):
1334         (audio::-webkit-media-controls-panel.down *:focus): Added gradient
1335         for the active and focus status.
1336         (audio::-webkit-media-controls-time-remaining-display)
1337         (video::-webkit-media-controls-time-remaining-display): Set
1338         display block.
1339         (audio::-webkit-media-controls-volume-slider-container)
1340         (video::-webkit-media-controls-volume-slider-container): Set
1341         display flex.
1342         (video::-webkit-media-controls-volume-slider-container.hiding):
1343         Changed from hidden.
1344         (video::-webkit-media-controls-panel .hiding.down): Changed from
1345         hidden.
1346         * platform/gtk/RenderThemeGtk.cpp:
1347         (WebCore::RenderThemeGtk::paintMediaButton): Returning true to
1348         allow CSS painting the gradient.
1349
1350 2014-02-27  Zan Dobersek  <zdobersek@igalia.com>
1351
1352         Unreviewed. Fixing the GTK build fix after r164757.
1353
1354         * platform/network/NetworkStateNotifier.cpp: r164757 introduced a layering violation by including
1355         the Settings.h header. The use of that class is guarded by PLATFORM(IOS), so the header inclusion
1356         should be guarded as well.
1357
1358 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1359
1360         Extract named items caches in HTMLCollection as a class
1361         https://bugs.webkit.org/show_bug.cgi?id=129365
1362
1363         Reviewed by Antti Koivisto.
1364
1365         Extracted CollectionNamedElementCache, like CollectionIndexCache, out of HTMLCollection.
1366         We can move more named item related functions into this class in the future.
1367
1368         HTMLCollection's member variables m_isNameCacheValid, m_idCache, and m_nameCache were replaced by
1369         a single unique_ptr that holds an instance of CollectionNamedElementCache since this object rarely
1370         exists in most HTMLCollections.
1371
1372         Also removed m_isItemRefElementsCacheValid since it was only used by Microdata API removed in r153772
1373         and renamed a whole bunch of member functions and variables for consistency.
1374
1375         * dom/Document.cpp:
1376         (WebCore::Document::collectionCachedIdNameMap):
1377         (WebCore::Document::collectionWillClearIdNameMap):
1378         * dom/Document.h:
1379         * dom/NodeRareData.h:
1380         (WebCore::NodeListsNodeData::adoptDocument):
1381         * html/HTMLAllCollection.cpp:
1382         (WebCore::HTMLAllCollection::namedItemWithIndex):
1383         * html/HTMLCollection.cpp:
1384         (WebCore::HTMLCollection::HTMLCollection):
1385         (WebCore::HTMLCollection::~HTMLCollection):
1386         (WebCore::HTMLCollection::invalidateCache):
1387         (WebCore::HTMLCollection::invalidateNamedElementCache): Renamed from invalidateIdNameCacheMaps.
1388         (WebCore::HTMLCollection::namedItem):
1389         (WebCore::HTMLCollection::updateNamedElementCache): Renamed from updateNameCache.
1390         (WebCore::HTMLCollection::namedItems):
1391
1392         * html/HTMLCollection.h:
1393         (WebCore::CollectionNamedElementCache::findElementsWithId): Renamed from HTMLCollection::idCache.
1394         (WebCore::CollectionNamedElementCache::findElementsWithName): Renamed from HTMLCollection::nameCache.
1395         (WebCore::CollectionNamedElementCache::appendIdCache): Moved from HTMLCollection.
1396         (WebCore::CollectionNamedElementCache::appendNameCache): Ditto.
1397         (WebCore::CollectionNamedElementCache::find): Ditto.
1398         (WebCore::CollectionNamedElementCache::append): Ditto.
1399
1400         (WebCore::HTMLCollection::invalidateCache):
1401         (WebCore::HTMLCollection::hasNamedElementCache): Renamed from hasIdNameCache.
1402         (WebCore::HTMLCollection::createNameItemCache): Added.
1403         (WebCore::HTMLCollection::namedItemCaches): Added.
1404
1405         * html/HTMLFormControlsCollection.cpp:
1406         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
1407         * html/HTMLFormControlsCollection.h:
1408
1409 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1410
1411         Indenting an indented image element resulted in an extra indentation
1412         https://bugs.webkit.org/show_bug.cgi?id=129201
1413
1414         Reviewed by Enrica Casucci.
1415
1416         The bug was caused by endOfParagraph returning a position at the beginning of a block when the position
1417         passed into the function was at the beginning of the block. Consider the following DOM:
1418         <blockquote><img></blockquote>
1419
1420         When endOfParagraph is called on (blockquote, 0), the condition r->isBR() || isBlock(n) in endOfParagraph
1421         matches immediately on startNode and it returns (blockquote, 0) again.
1422
1423         This resulted in moveParagraphWithClones invoked by indentIntoBlockquote to erroneously clone the inner
1424         blockquote. Worked around this bug in ApplyBlockElementCommand::formatSelection by checking this specific
1425         condition and moving the position to the end of the block. Unfortunately, a lot of existing code depends
1426         on the current behavior of endOfParagraph so fixing the function itself was not possible.
1427
1428         There was another bug in indentIntoBlockquote to incorrectly insert a new blockquote into the existing
1429         blockquote due to the code introduced in r99594 to avoid inserting before the root editable element.
1430         Since this happens only if outerBlock is the root editable element, which is nodeToSplitTo or an ancestor
1431         of nodeToSplitTo, explicitly look for this condition.
1432
1433         Test: editing/execCommand/indent-img-twice.html
1434
1435         * editing/ApplyBlockElementCommand.cpp:
1436         (WebCore::ApplyBlockElementCommand::formatSelection):
1437         (WebCore::isNewLineAtPosition):
1438         * editing/IndentOutdentCommand.cpp:
1439         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
1440         * editing/VisibleUnits.cpp:
1441         (WebCore::endOfParagraph): Added a FIXME.
1442
1443 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1444
1445         Fix two assertions/crashes in compositing code
1446         https://bugs.webkit.org/show_bug.cgi?id=129414
1447
1448         Reviewed by Dean Jackson.
1449
1450         Fix two issues introduced in r164759.
1451
1452         * rendering/RenderLayerCompositor.cpp:
1453         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): Don't call
1454         ourselves recursively!
1455         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): We call this
1456         function unconditionally on layer teardown, so this assertion is bogus.
1457
1458 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1459
1460         Fix the build with some compiler configurations.
1461
1462         * platform/mac/ScrollAnimatorMac.mm:
1463         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1464         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1465         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1466
1467 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1468
1469         Ranges given to createMarkupInternal might not be canonicalized
1470         https://bugs.webkit.org/show_bug.cgi?id=129408
1471
1472         Reviewed by Ryosuke Niwa.
1473
1474         When WebKit clients (such as Mail) call WKWebArchiveCreateFromRange() with a range,
1475         that range is not necessarily canonicalized. Therefore, comparing it for equality
1476         with a canonicalized range might return a false negative. Instead, we should compare
1477         canonicalized ranges.
1478
1479         No new tests because this codepath will only be reached via SPI.
1480
1481         * editing/markup.cpp:
1482         (WebCore::createMarkupInternal):
1483
1484 2014-02-26  Enrica Casucci  <enrica@apple.com>
1485
1486         [iOS WebKit2] Form controls handling: implement date and time controls.
1487         https://bugs.webkit.org/show_bug.cgi?id=129344
1488
1489         Reviewed by Simon Fraser and Joseph Pecoraro.
1490
1491         Adding one localizable string.
1492
1493         * English.lproj/Localizable.strings:
1494
1495 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1496
1497         Prepare for overflow scrolling nodes in the scrolling tree
1498         https://bugs.webkit.org/show_bug.cgi?id=129398
1499
1500         Reviewed by Tim Horton.
1501
1502         Lay some groundwork for overflow:scrolling nodes in the scrolling tree.
1503         Change terminology to refer to "scroll-coordinatored" layers now, not just viewport-constrained
1504         layers.
1505         
1506         A given layer can be both viewport-constrained and overflow-scrolling (e.g. position:fixed,
1507         overflow:scroll), so handle that in RenderLayerBacking, and use some "reason" flags
1508         in RenderLayerCompositor.
1509
1510         * page/FrameView.cpp:
1511         (WebCore::FrameView::scrollLayerID): Rename
1512         * page/scrolling/ScrollingStateTree.cpp:
1513         (WebCore::ScrollingStateTree::attachNode): Remove invalid assertion.
1514         * rendering/RenderLayerBacking.cpp:
1515         (WebCore::RenderLayerBacking::RenderLayerBacking):
1516         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1517         (WebCore::RenderLayerBacking::updateScrollingLayers): Simplify the logic with
1518         an early return.
1519         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1520         Allow a layer to play both viewport-constrained and scrolling roles
1521         in the scrolling tree.
1522         * rendering/RenderLayerBacking.h:
1523         (WebCore::RenderLayerBacking::viewportConstrainedNodeID):
1524         (WebCore::RenderLayerBacking::setViewportConstrainedNodeID):
1525         (WebCore::RenderLayerBacking::scrollingNodeID):
1526         (WebCore::RenderLayerBacking::setScrollingNodeID):
1527         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren):
1528         * rendering/RenderLayerCompositor.cpp:
1529         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1530         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1531         (WebCore::RenderLayerCompositor::updateBacking):
1532         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1533         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
1534         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
1535         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1536         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
1537         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1538         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling):
1539         (WebCore::isViewportConstrainedFixedOrStickyLayer):
1540         (WebCore::isMainFrameScrollingOrOverflowScrolling):
1541         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1542         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1543         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1544         (WebCore::nearestScrollCoordinatedAncestor):
1545         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1546         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1547         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1548         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
1549         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1550         * rendering/RenderLayerCompositor.h:
1551
1552 2014-02-26  Andy Estes  <aestes@apple.com>
1553
1554         [iOS] Support network state notification using CPNetworkObserver
1555         https://bugs.webkit.org/show_bug.cgi?id=129358
1556
1557         Reviewed by Dan Bernstein.
1558
1559         Add iOS support for navigator.onLine and online/offline events. Since
1560         it can be expensive to query CPNetworkObserver, wait to do so until
1561         someone calls NetworkStateObserver::onLine() or
1562         NetworkStateObserver::addNetworkStateChangeListener(). For clients that
1563         don't wish to observe network reachability at all, add a global opt-out.
1564         These clients will only pay the cost of CPNetworkObserver if they load
1565         a page that explicitly accesses navigator.onLine.
1566
1567         No new tests. Covered by existing tests.
1568
1569         * WebCore.exp.in: Stopped exporting NetworkStateNotifier::setIsOnLine()
1570         and started exporting Settings::gShouldOptOutOfNetworkStateObservation.
1571         * WebCore.xcodeproj/project.pbxproj: Renamed NetworkStateNotifierIOS.cpp
1572         to NetworkStateNotifierIOS.mm.
1573         * page/Settings.cpp: Defaulted gShouldOptOutOfNetworkStateObservation
1574         to false.
1575         * page/Settings.h:
1576         (WebCore::Settings::setShouldOptOutOfNetworkStateObservation):
1577         (WebCore::Settings::shouldOptOutOfNetworkStateObservation):
1578         * platform/network/NetworkStateNotifier.cpp:
1579         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener): Ignored
1580         the listener if Settings::shouldOptOutOfNetworkStateObservation().
1581         Called registerObserverIfNecessary() and added the listener otherwise.
1582         (WebCore::NetworkStateNotifier::notifyNetworkStateChange): Const qualified.
1583         * platform/network/NetworkStateNotifier.h
1584         (NetworkStateNotifier::onLine):
1585         * platform/network/ios/NetworkStateNotifierIOS.cpp: Removed.
1586         * platform/network/ios/NetworkStateNotifierIOS.mm: Added.
1587         (-[NetworkStateObserver initWithNotifier:WebCore::]): Registered self
1588         as a network reachable observer on CPNetworkObserver.
1589         (-[NetworkStateObserver dealloc]): Removed self as a network reachable
1590         observer.
1591         (-[NetworkStateObserver networkStateChanged:]): Called setOnLine() on
1592         the web thread, passing the reachability value from the notification.
1593         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1594         (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Cleared
1595         m_observer's pointer back to us.
1596         (WebCore::NetworkStateNotifier::registerObserverIfNecessary): Initialized
1597         m_observer if necessary.
1598         (WebCore::NetworkStateNotifier::onLine): Called
1599         registerObserverIfNecessary() and set an initial value for m_isOnLine
1600         if m_isOnLineInitialized is false. Returned m_isOnLine.
1601         (WebCore::setOnLine): Set m_isOnLine and called
1602         notifyNetworkStateChange() if needed. Unconditionally set
1603         m_isOnLineInitialized to true.
1604
1605 2014-02-26  Brian Burg  <bburg@apple.com>
1606
1607         Unreviewed build fix for !ENABLE(CONTEXT_MENUS).
1608
1609         I forgot to add guards to handleContextMenuEvent().
1610
1611         * replay/UserInputBridge.cpp:
1612         * replay/UserInputBridge.h:
1613
1614 2014-02-26  Dean Jackson  <dino@apple.com>
1615
1616         [WebGL] Only skip context error retrieval if a pending context
1617         https://bugs.webkit.org/show_bug.cgi?id=129397
1618
1619         Reviewed by Tim Horton.
1620
1621         A lost context should still ask the GC3D what the error is. Only
1622         a pending context should return early.
1623
1624         * html/canvas/WebGLRenderingContext.cpp:
1625         (WebCore::WebGLRenderingContext::getError):
1626
1627 2014-02-26  Brian Burg  <bburg@apple.com>
1628
1629         Web Replay: route through UserInputBridge when delivering user inputs to WebCore
1630         https://bugs.webkit.org/show_bug.cgi?id=128150
1631
1632         Reviewed by Timothy Hatcher.
1633
1634         Add an UserInputBridge instance to each Page. WebKit2 routes a page's user inputs through
1635         the WebCore page's user input bridge so that the inputs can be selectively captured, filtered,
1636         and replayed using instrumentation inside the UserInputBridge.
1637
1638         For now, the routing methods of UserInputBridge have no replay-specific code paths, and just
1639         put the input delivery code inside WebCore rather than its external clients. Replay-specific
1640         code paths will be added once https://bugs.webkit.org/show_bug.cgi?id=128782 is fixed. However,
1641         once complete the code will work as follows:
1642
1643         - When neither capturing or replaying, behavior is unchanged.
1644
1645         - When capturing user inputs, each external input is saved into a replay log as it crosses
1646         the bridge from outside WebCore.
1647
1648         - When replaying, the bridge closes and user inputs from WebKit2 are not accepted. Instead,
1649         the saved inputs from the replay log are re-dispatched as if they had crossed the bridge.
1650
1651         * CMakeLists.txt:
1652         * GNUmakefile.am:
1653         * GNUmakefile.list.am:
1654         * WebCore.exp.in: Add symbols for input routing methods.
1655         * WebCore.vcxproj/WebCore.vcxproj:
1656         * WebCore.vcxproj/WebCore.vcxproj.filters:
1657         * WebCore.xcodeproj/project.pbxproj:
1658         * page/Page.cpp:
1659         (WebCore::Page::Page): Initialize the owned UserInputBridge in the Page constructor.
1660         * page/Page.h:
1661         (WebCore::Page::inputBridge): Added a by-reference getter.
1662         * replay/UserInputBridge.cpp: Added.
1663         (WebCore::UserInputBridge::UserInputBridge):
1664         (WebCore::UserInputBridge::~UserInputBridge):
1665         (WebCore::UserInputBridge::handleContextMenuEvent):
1666         (WebCore::UserInputBridge::handleMousePressEvent):
1667         (WebCore::UserInputBridge::handleMouseReleaseEvent):
1668         (WebCore::UserInputBridge::handleMouseMoveEvent):
1669         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
1670         (WebCore::UserInputBridge::handleKeyEvent):
1671         (WebCore::UserInputBridge::handleAccessKeyEvent):
1672         (WebCore::UserInputBridge::handleWheelEvent):
1673         (WebCore::UserInputBridge::focusSetActive):
1674         (WebCore::UserInputBridge::focusSetFocused):
1675         (WebCore::UserInputBridge::scrollRecursively):
1676         (WebCore::UserInputBridge::logicalScrollRecursively):
1677         (WebCore::UserInputBridge::loadRequest):
1678         (WebCore::UserInputBridge::reloadFrame):
1679         (WebCore::UserInputBridge::stopLoadingFrame):
1680         (WebCore::UserInputBridge::tryClosePage):
1681         * replay/UserInputBridge.h: Added.
1682
1683 2014-02-26  Dean Jackson  <dino@apple.com>
1684
1685         [WebGL] Protect more WebGL entry points for pending contexts
1686         https://bugs.webkit.org/show_bug.cgi?id=129386
1687
1688         Reviewed by Tim Horton.
1689
1690         There are entry points into a WebGLRenderingContext that don't
1691         come from the web-exposed API directly, such as drawImage with
1692         the WebGL canvas. Protect these by returning early if we're
1693         a pending context.
1694
1695         Also a bunch of drive-by 0 -> nullptr changes.
1696
1697         * html/canvas/WebGLRenderingContext.cpp:
1698         (WebCore::WebGLRenderingContext::markLayerComposited):
1699         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
1700         (WebCore::WebGLRenderingContext::paintRenderingResultsToImageData):
1701         (WebCore::WebGLRenderingContext::reshape):
1702         (WebCore::WebGLRenderingContext::createBuffer):
1703         (WebCore::WebGLRenderingContext::createFramebuffer):
1704         (WebCore::WebGLRenderingContext::createTexture):
1705         (WebCore::WebGLRenderingContext::createProgram):
1706         (WebCore::WebGLRenderingContext::createRenderbuffer):
1707         (WebCore::WebGLRenderingContext::createShader):
1708         (WebCore::WebGLRenderingContext::getActiveAttrib):
1709         (WebCore::WebGLRenderingContext::getActiveUniform):
1710         (WebCore::WebGLRenderingContext::getContextAttributes):
1711         (WebCore::WebGLRenderingContext::getError):
1712         (WebCore::WebGLRenderingContext::getExtension):
1713         (WebCore::WebGLRenderingContext::getShaderPrecisionFormat):
1714         (WebCore::WebGLRenderingContext::getUniformLocation):
1715         (WebCore::WebGLRenderingContext::drawImageIntoBuffer):
1716         (WebCore::WebGLRenderingContext::videoFrameToImage):
1717         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
1718         (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
1719
1720 2014-02-26  Bem Jones-Bey  <bjonesbe@adobe.com>
1721
1722         [CSS Shapes] inset and inset-rectangle trigger assert with replaced element and large percentage dimension
1723         https://bugs.webkit.org/show_bug.cgi?id=129060
1724
1725         Reviewed by Simon Fraser.
1726
1727         A bounds check was omitted when computing the width and height for inset
1728         rectangles, making it possible for the width or height to end up being
1729         negative. This patch adds in that check for both. It seems that only
1730         replaced elements like iframe and img trigger this problem.
1731
1732         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-negative-width-crash.html
1733                fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-rectangle-negative-width-crash.html
1734
1735         * rendering/shapes/Shape.cpp:
1736         (WebCore::Shape::createShape):
1737
1738 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1739
1740         Underlines are too thick when zoomed in
1741         https://bugs.webkit.org/show_bug.cgi?id=129352
1742
1743         Reviewed by Dean Jackson.
1744
1745         The input to the underline drawing code is in user-space, not device-space.
1746         The underlines were getting scaled twice, once in InlineTextBox and the other
1747         in GraphicsContext.
1748
1749         Test: fast/css3-text/css3-text-decoration/text-decoration-scaled.html
1750
1751         * rendering/InlineTextBox.cpp:
1752         (WebCore::InlineTextBox::paintDecoration):
1753
1754 2014-02-26  Andreas Kling  <akling@apple.com>
1755
1756         Remove unused InspectorCounters.
1757         <https://webkit.org/b/129367>
1758
1759         The InspectorCounters code was only used to implement two layout test
1760         APIs (window.internals.numberOfLive{Nodes,Documents}) yet it had hooks
1761         in crazy places like Node construction and destruction.
1762
1763         Rewrote the internals APIs to iterate over all live Documents instead,
1764         totaling up their referencing Node count. Added a process-global
1765         Document::allDocuments() HashSet to make this whole thing possible.
1766
1767         Reviewed by Sam Weinig.
1768
1769         * CMakeLists.txt:
1770         * GNUmakefile.list.am:
1771         * WebCore.exp.in:
1772         * WebCore.vcxproj/WebCore.vcxproj:
1773         * WebCore.vcxproj/WebCore.vcxproj.filters:
1774         * WebCore.xcodeproj/project.pbxproj:
1775         * bindings/js/JSEventListener.cpp:
1776         * dom/Document.cpp:
1777         (WebCore::Document::allDocuments):
1778         (WebCore::Document::Document):
1779         (WebCore::Document::~Document):
1780         * dom/Document.h:
1781         (WebCore::Node::Node):
1782         * dom/Node.cpp:
1783         (WebCore::Node::~Node):
1784         * inspector/InspectorAllInOne.cpp:
1785         * inspector/InspectorCounters.cpp: Removed.
1786         * inspector/InspectorCounters.h: Removed.
1787         * inspector/InspectorTimelineAgent.cpp:
1788         (WebCore::InspectorTimelineAgent::start):
1789         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1790         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1791         * inspector/InspectorTimelineAgent.h:
1792         * inspector/protocol/Timeline.json:
1793         * platform/ThreadGlobalData.cpp:
1794         * testing/Internals.cpp:
1795         (WebCore::Internals::numberOfLiveNodes):
1796         (WebCore::Internals::numberOfLiveDocuments):
1797         * testing/Internals.h:
1798         * testing/Internals.idl:
1799
1800 2014-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1801
1802         Web Inspector: Remove console.profiles from window.console API
1803         https://bugs.webkit.org/show_bug.cgi?id=116883
1804
1805         Reviewed by Timothy Hatcher.
1806
1807         console.profiles has been removed or never implemented by other
1808         browsers. We should remove it as well. However, since tests
1809         rely on it, keep it as window.internals.consoleProfiles.
1810
1811         * WebCore.exp.in:
1812         * page/Console.idl:
1813         * testing/Internals.cpp:
1814         (WebCore::Internals::consoleProfiles):
1815         * testing/Internals.h:
1816         * testing/Internals.idl:
1817
1818 2014-02-26  Martin Hock  <mhock@apple.com>
1819
1820         Create SessionID value-style class for session IDs.
1821         https://bugs.webkit.org/show_bug.cgi?id=129141
1822
1823         Reviewed by Sam Weinig.
1824
1825         * GNUmakefile.list.am:
1826         * WebCore.exp.in:
1827         * WebCore.xcodeproj/project.pbxproj:
1828         * page/Page.cpp: Add SessionID member.
1829         (WebCore::Page::Page):
1830         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
1831         * page/Page.h:
1832         (WebCore::Page::isSessionIDSet):
1833         (WebCore::Page::setSessionID):
1834         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
1835         (WebCore::SessionID::SessionID):
1836         (WebCore::SessionID::isValid): Not empty.
1837         (WebCore::SessionID::isEphemeral):
1838         (WebCore::SessionID::sessionID):
1839         (WebCore::SessionID::operator==): Value-based equality.
1840         (WebCore::SessionID::operator!=):
1841         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
1842         (WebCore::SessionID::defaultSessionID):
1843         (WebCore::SessionID::legacyPrivateSessionID):
1844         * page/SessionIDHash.h:
1845         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
1846         (WTF::SessionIDHash::equal):
1847         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
1848         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
1849         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
1850
1851 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1852
1853         Fix builds that don't define IMAGE_CONTROLS.
1854
1855         * page/ContextMenuContext.cpp:
1856         (WebCore::ContextMenuContext::ContextMenuContext):
1857
1858 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1859
1860         Build fix for OS X after r164720.
1861
1862         * page/ContextMenuContext.cpp:
1863
1864 2014-02-26  Brady Eidson  <beidson@apple.com>
1865
1866         Pipe experimental image controls menu up to WebKit2
1867         https://bugs.webkit.org/show_bug.cgi?id=129339
1868
1869         Reviewed by Simon Fraser.
1870
1871         Handle events for the image control, starting down the context menu code path if appropriate:
1872         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1873         (WebCore::ImageControlsRootElementMac::defaultEventHandler):
1874         * html/shadow/mac/ImageControlsRootElementMac.h:
1875
1876         Add a class to hold a HitTestResult and addition info about the current ContextMenu invocation:
1877         * page/ContextMenuContext.cpp: Added.
1878         (WebCore::ContextMenuContext::ContextMenuContext):
1879         * page/ContextMenuContext.h: Added.
1880         (WebCore::ContextMenuContext::hitTestResult):
1881         (WebCore::ContextMenuContext::isImageControl):
1882
1883         Update ContextMenuController to work with ContextMenuContext instead of HitTestResult directly:
1884         * page/ContextMenuController.cpp:
1885         (WebCore::ContextMenuController::showContextMenu):
1886         (WebCore::ContextMenuController::createContextMenu):
1887         (WebCore::ContextMenuController::contextMenuItemSelected):
1888         (WebCore::ContextMenuController::populate):
1889         (WebCore::ContextMenuController::addInspectElementItem):
1890         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1891         (WebCore::ContextMenuController::showImageControlsMenu):
1892         * page/ContextMenuController.h:
1893         (WebCore::ContextMenuController::contextMenu):
1894         (WebCore::ContextMenuController::setContextMenuContext):
1895         (WebCore::ContextMenuController::context):
1896         (WebCore::ContextMenuController::hitTestResult):
1897
1898         * CMakeLists.txt:
1899         * GNUmakefile.list.am:
1900         * WebCore.vcxproj/WebCore.vcxproj:
1901         * WebCore.xcodeproj/project.pbxproj:
1902
1903 2014-02-26  Zan Dobersek  <zdobersek@igalia.com>
1904
1905         REGRESSION(r162947): Document::topDocument() returns an incorrect reference for cached Documents
1906         https://bugs.webkit.org/show_bug.cgi?id=128175
1907
1908         Reviewed by Antti Koivisto.
1909
1910         * dom/Document.cpp:
1911         (WebCore::Document::topDocument): Fall back to pre-r162947 way of determining the top document
1912         when the Document is in page cache or is in the middle of having its render tree destroyed.
1913         In the first case, the determined top document is actually the document currently loaded in the
1914         Frame to which the cached document is still connected, which is obviously not desired. In the
1915         second case the top document is similarly incorrectly deduced, leading to non-deletion of the
1916         proper top document's AXObjectCache. Because of this AccessibilityRenderObjects are not detached
1917         which results in assertions in RenderObject destructor where the objects are found to be still
1918         flagged as in use by the AX cache.
1919
1920 2014-02-26  Mihnea Ovidenie  <mihnea@adobe.com>
1921
1922         [CSSRegions] Remove unused method RenderFlowThread::updateLayerToRegionMappings()
1923         https://bugs.webkit.org/show_bug.cgi?id=129368
1924
1925         Reviewed by Andrei Bucur.
1926
1927         Remove unused code, no new tests.
1928
1929         * rendering/RenderFlowThread.h:
1930
1931 2014-02-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1932
1933         [GTK] Regression when showing the captions menu
1934         https://bugs.webkit.org/show_bug.cgi?id=129106
1935
1936         Reviewed by Martin Robinson.
1937
1938         In some cases, when clicking the captions button the menu was not
1939         shown.
1940
1941         Updated test: media/video-controls-captions-trackmenu.html
1942
1943         * Modules/mediacontrols/mediaControlsGtk.js:
1944         (ControllerGtk.prototype.buildCaptionMenu):
1945         (ControllerGtk.prototype.showCaptionMenu): Specify sizes in
1946         pixels.
1947
1948 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1949
1950         Avoid unnecessary HTML Collection invalidations for id and name attribute changes
1951         https://bugs.webkit.org/show_bug.cgi?id=129361
1952
1953         Reviewed by Benjamin Poulain.
1954
1955         Before this patch, setting id and name attributes resulted in traversing all the ancestors to invalidate
1956         HTML collections on those nodes whenever we had more than one HTMLCollection alive.
1957
1958         Avoid the traversal when HTMLCollections don't have any valid id and name map caches by making each
1959         HTMLCollection explicitly call collectionCachedIdNameMap and collectionWillClearIdNameMap when it caches
1960         or clears the id and name map.
1961
1962         Inspired by https://chromium.googlesource.com/chromium/blink/+/5b06b91b79098f7d42e480f85be32198315d2440
1963
1964         * dom/Document.cpp:
1965         (WebCore::Document::registerCollection): Takes a boolean to indicate whether collection has a valid cache
1966         for the id and name map.
1967         (WebCore::Document::unregisterCollection): Ditto.
1968         (WebCore::Document::collectionCachedIdNameMap): Added.
1969         (WebCore::Document::collectionWillClearIdNameMap): Added.
1970         * dom/Document.h:
1971
1972         * dom/NodeRareData.h:
1973         (WebCore::NodeListsNodeData::adoptDocument): Call invalidateCache on HTML collections after, not before,
1974         calling unregisterCollection and registerCollection since collections' owner nodes have already been
1975         moved to the new document here and invalidateCache uses owner node's document to call
1976         collectionWillClearIdNameMap. So calling invalidateCache before calling unregister/registerCollection
1977         would result in collectionWillClearIdNameMap getting called on a wrong document.
1978
1979         * html/HTMLCollection.cpp:
1980         (WebCore::HTMLCollection::HTMLCollection):
1981         (WebCore::HTMLCollection::~HTMLCollection):
1982         (WebCore::HTMLCollection::invalidateCache):
1983         (WebCore::HTMLCollection::invalidateIdNameCacheMaps): Added the code to uncount itself from the number
1984         of live node lists and HTML collections that need to be invalidated upon id and name attribute changes.
1985         (WebCore::HTMLCollection::updateNameCache):
1986
1987         * html/HTMLCollection.h:
1988         (WebCore::HTMLCollection::invalidateCache):
1989         (WebCore::HTMLCollection::hasIdNameCache): Renamed from hasNameCache.
1990         (WebCore::HTMLCollection::setHasIdNameCache): Renamed from setHasIdNameCache.
1991
1992         * html/HTMLFormControlsCollection.cpp:
1993         (WebCore::HTMLFormControlsCollection::updateNameCache):
1994
1995 2014-02-25  Frédéric Wang  <fred.wang@free.fr>
1996
1997         Add support for minsize/maxsize attributes.
1998         https://bugs.webkit.org/show_bug.cgi?id=122567
1999
2000         Reviewed by Chris Fleizach.
2001
2002         This change implements the minsize/maxsize attributes of the mo element.
2003         We also switch stretch sizes from int to LayoutUnit to improve accuracy.
2004
2005         Tests: mathml/presentation/stretchy-minsize-maxsize-dynamic.html
2006                mathml/presentation/stretchy-minsize-maxsize.html
2007
2008         * rendering/mathml/RenderMathMLOperator.cpp:
2009         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2010         (WebCore::RenderMathMLOperator::stretchTo):
2011         * rendering/mathml/RenderMathMLOperator.h:
2012         * rendering/mathml/RenderMathMLRow.cpp:
2013         (WebCore::RenderMathMLRow::layout):
2014
2015 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
2016
2017         [CSSRegions] Small clean-up of flow threads accelerated compositing code
2018         https://bugs.webkit.org/show_bug.cgi?id=129312
2019
2020         Reviewed by Andrei Bucur.
2021
2022         Some clean-up for the code used for regions in accelerated compositing functionality:
2023         1. Rename updateRenderFlowThreadLayersIfNeeded -> updateFlowThreadsLayerToRegionMappingsIfNeeded
2024         as the function updates the mapping between the flow threads layers and their corresponding regions
2025         2. Remove RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded and move the code in place
2026         at call site since the function body does not require a dedicated function.
2027
2028         No new functionality, no new tests.
2029
2030         * rendering/FlowThreadController.cpp:
2031         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
2032         Now that the regions are always layers, we do not need to iterate backwards.
2033         * rendering/FlowThreadController.h:
2034         * rendering/RenderLayerCompositor.cpp:
2035         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2036         * rendering/RenderLayerCompositor.h:
2037
2038 2014-02-25  Zalan Bujtas  <zalan@apple.com>
2039
2040         Subpixel rendering: Ensure consistent border painting width.
2041         https://bugs.webkit.org/show_bug.cgi?id=129259
2042
2043         Reviewed by Simon Fraser.
2044
2045         Border edges are painted as (semi)independent rectangles. When snapping an edge rectangle
2046         to device pixels, its painted dimensions depend on its size and its fractional position.
2047         Specific combination of position and border width can result in painting edges sized differently.
2048         Using device snapped border width to calculate inner/outer rectangles helps to maintain
2049         uniform border width.
2050
2051         Currently not testable.
2052
2053         * rendering/RenderBoxModelObject.cpp:
2054         (WebCore::BorderEdge::BorderEdge):
2055         (WebCore::BorderEdge::shouldRender):
2056         (WebCore::BorderEdge::presentButInvisible):
2057         (WebCore::BorderEdge::widthForPainting):
2058         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
2059         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2060         (WebCore::calculateSideRect):
2061         (WebCore::RenderBoxModelObject::paintBorderSides):
2062         (WebCore::RenderBoxModelObject::paintBorder):
2063         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2064         (WebCore::calculateSideRectIncludingInner):
2065
2066 2014-02-25  Zalan Bujtas  <zalan@apple.com>
2067
2068         Subpixel layout: Remove explicit static_cast<LayoutUnit> conversions.
2069         https://bugs.webkit.org/show_bug.cgi?id=129359
2070
2071         Reviewed by Simon Fraser.
2072
2073         No testable change in behavior.
2074
2075         * css/LengthFunctions.cpp:
2076         (WebCore::minimumValueForLength):
2077         * page/FrameView.cpp:
2078         (WebCore::FrameView::forceLayoutForPagination):
2079         * rendering/InlineFlowBox.cpp:
2080         (WebCore::InlineFlowBox::paintFillLayer):
2081         * rendering/InlineFlowBox.h:
2082         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
2083         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
2084         * rendering/InlineTextBox.cpp:
2085         (WebCore::InlineTextBox::isSelected):
2086         * rendering/RenderBlock.cpp:
2087         (WebCore::RenderBlock::computeColumnCountAndWidth):
2088         (WebCore::getBPMWidth):
2089         * rendering/RenderBlockFlow.cpp:
2090         (WebCore::RenderBlockFlow::adjustForBorderFit):
2091         * rendering/RenderDeprecatedFlexibleBox.cpp:
2092         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2093         * rendering/RenderFieldset.cpp:
2094         (WebCore::RenderFieldset::paintBoxDecorations):
2095         * rendering/RenderTable.h:
2096         (WebCore::RenderTable::borderSpacingInRowDirection):
2097         * rendering/RenderTextControlMultiLine.cpp:
2098         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
2099         * rendering/RenderTextControlSingleLine.cpp:
2100         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2101         * rendering/RootInlineBox.cpp:
2102         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
2103         (WebCore::RootInlineBox::ascentAndDescentForBox):
2104         * rendering/svg/RenderSVGRoot.cpp:
2105         (WebCore::resolveLengthAttributeForSVG):
2106
2107 2014-02-25  Anders Carlsson  <andersca@apple.com>
2108
2109         Build fixes.
2110
2111         * CMakeLists.txt:
2112         * GNUmakefile.list.am:
2113         * WebCore.vcxproj/WebCore.vcxproj:
2114         * WebCore.vcxproj/WebCore.vcxproj.filters:
2115
2116 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
2117
2118         Build fix for OS X after r164690
2119
2120         * WebCore.exp.in:
2121
2122 2014-02-25  Anders Carlsson  <andersca@apple.com>
2123
2124         Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
2125         https://bugs.webkit.org/show_bug.cgi?id=129357
2126
2127         Reviewed by Sam Weinig.
2128
2129         * WebCore.exp.in:
2130         * WebCore.xcodeproj/project.pbxproj:
2131         * dom/VisitedLinkState.cpp:
2132         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2133         * loader/HistoryController.cpp:
2134         (WebCore::addVisitedLink):
2135         * page/DefaultVisitedLinkStore.cpp: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.cpp.
2136         (WebCore::DefaultVisitedLinkStore::create):
2137         (WebCore::DefaultVisitedLinkStore::DefaultVisitedLinkStore):
2138         (WebCore::DefaultVisitedLinkStore::~DefaultVisitedLinkStore):
2139         (WebCore::DefaultVisitedLinkStore::isLinkVisited):
2140         (WebCore::DefaultVisitedLinkStore::addVisitedLink):
2141         * page/DefaultVisitedLinkStore.h: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.h.
2142         * page/Page.cpp:
2143         (WebCore::Page::Page):
2144         (WebCore::Page::visitedLinkStore):
2145         * page/Page.h:
2146         * page/PageGroup.cpp:
2147         (WebCore::PageGroup::visitedLinkStore):
2148         * page/PageGroup.h:
2149         * page/VisitedLinkStore.cpp: Renamed from Source/WebCore/page/VisitedLinkProvider.cpp.
2150         (WebCore::VisitedLinkStore::VisitedLinkStore):
2151         (WebCore::VisitedLinkStore::~VisitedLinkStore):
2152         * page/VisitedLinkStore.h: Renamed from Source/WebCore/page/VisitedLinkProvider.h.
2153
2154 2014-02-25  Enrica Casucci  <enrica@apple.com>
2155
2156         [WebKit2] Form controls handling.
2157         https://bugs.webkit.org/show_bug.cgi?id=129344
2158         <rdar://problem/16053643>
2159
2160         Reviewed by Simon Fraser and Joseph Pecoraro.
2161
2162         Adding some exports.
2163         
2164         * WebCore.exp.in:
2165
2166 2014-02-25  Samuel White  <samuel_white@apple.com>
2167
2168         Add accessibility search predicate support for AXOutlines
2169         https://bugs.webkit.org/show_bug.cgi?id=123748
2170
2171         Reviewed by Chris Fleizach.
2172
2173         Added new AXOutlineSearchKey to support finding elements with aria role=tree.
2174
2175         No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.
2176
2177         * accessibility/AccessibilityObject.cpp:
2178         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
2179         * accessibility/AccessibilityObject.h:
2180         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2181         (createAccessibilitySearchKeyMap):
2182
2183 2014-02-25  Mark Lam  <mark.lam@apple.com>
2184
2185         Need to initialize VM stack data even when the VM is on an exclusive thread.
2186         <https://webkit.org/b/129265>
2187
2188         Not reviewed.
2189
2190         No new tests.
2191
2192         Relanding r164627 now that <https://webkit.org/b/129341> is fixed.
2193
2194         * bindings/js/JSDOMBinding.cpp:
2195         (WebCore::reportException):
2196         * bindings/js/JSDOMWindowBase.cpp:
2197         (WebCore::JSDOMWindowBase::commonVM):
2198
2199 2014-02-25  Mark Lam  <mark.lam@apple.com>
2200
2201         JSDOMPromise methods should acquire VM lock before calling into JS.
2202         <https://webkit.org/b/129341>
2203
2204         Reviewed by Geoffrey Garen.
2205
2206         No new tests.
2207
2208         * bindings/js/JSDOMPromise.h:
2209         (WebCore::DeferredWrapper::resolve):
2210         (WebCore::DeferredWrapper::reject):
2211         (WebCore::DeferredWrapper::resolve<String>):
2212         (WebCore::DeferredWrapper::resolve<bool>):
2213         (WebCore::char>>):
2214         (WebCore::DeferredWrapper::reject<String>):
2215
2216 2014-02-25  Anders Carlsson  <andersca@apple.com>
2217
2218         Simplify visited link style invalidation
2219         https://bugs.webkit.org/show_bug.cgi?id=129340
2220
2221         Reviewed by Dan Bernstein.
2222
2223         Get rid of the static Page::allVisitedStateChanged and Page::visitedStateChanged
2224         member functions and add functions to invalidate all styles on a single page or the style
2225         for a single link hash on a single page.
2226
2227         * WebCore.exp.in:
2228         * page/Page.cpp:
2229         (WebCore::Page::invalidateStylesForAllLinks):
2230         (WebCore::Page::invalidateStylesForLink):
2231         * page/Page.h:
2232         * page/PageGroup.cpp:
2233         (WebCore::PageGroup::addVisitedLink):
2234         (WebCore::PageGroup::removeVisitedLink):
2235         (WebCore::PageGroup::removeVisitedLinks):
2236
2237 2014-02-25  Andreas Kling  <akling@apple.com>
2238
2239         Remove unused ThreadSpecificInspectorCounters.
2240         <https://webkit.org/b/129337>
2241
2242         We were keeping count of all the JS event listeners in every thread
2243         to support an old Chromium feature that's no longer relevant.
2244
2245         Removing this gets rid of expensive thread-local storage lookups.
2246
2247         Reviewed by Anders Carlsson.
2248
2249         * bindings/js/JSEventListener.cpp:
2250         (WebCore::JSEventListener::JSEventListener):
2251         (WebCore::JSEventListener::~JSEventListener):
2252         * inspector/InspectorCounters.cpp:
2253         * inspector/InspectorCounters.h:
2254         * inspector/InspectorTimelineAgent.cpp:
2255         (WebCore::InspectorTimelineAgent::setDOMCounters):
2256         * inspector/protocol/Timeline.json:
2257         * platform/ThreadGlobalData.cpp:
2258         (WebCore::ThreadGlobalData::ThreadGlobalData):
2259         (WebCore::ThreadGlobalData::destroy):
2260         * platform/ThreadGlobalData.h:
2261
2262 2014-02-25  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2263
2264         display:table with padding and/or borders in border-box calculates height incorrectly
2265         https://bugs.webkit.org/show_bug.cgi?id=126576
2266
2267         Reviewed by David Hyatt.
2268
2269         Based on blink issue https://codereview.chromium.org/25206002/
2270
2271         Tests: fast/box-sizing/css-table-collapse.html
2272                fast/box-sizing/css-table-no-collapse.html
2273                fast/box-sizing/table-collapse.html
2274                fast/box-sizing/table-no-collapse.html
2275
2276         * rendering/RenderBox.cpp:
2277         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2278
2279 2014-02-25  Anders Carlsson  <andersca@apple.com>
2280
2281         Get rid of VisitedLinkStrategy
2282         https://bugs.webkit.org/show_bug.cgi?id=129324
2283
2284         Reviewed by Dan Bernstein.
2285
2286         * GNUmakefile.list.am:
2287         * WebCore.vcxproj/WebCore.vcxproj:
2288         * WebCore.vcxproj/WebCore.vcxproj.filters:
2289         * WebCore.xcodeproj/project.pbxproj:
2290         * platform/PlatformStrategies.h:
2291         (WebCore::PlatformStrategies::PlatformStrategies):
2292         * platform/VisitedLinkStrategy.h: Removed.
2293
2294 2014-02-25  Alexey Proskuryakov  <ap@apple.com>
2295
2296         Rolling out http://trac.webkit.org/changeset/164611, because it broke
2297         WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
2298
2299         The change was for:
2300
2301         https://bugs.webkit.org/show_bug.cgi?id=129141
2302         Create SessionID class
2303
2304 2014-02-25  Commit Queue  <commit-queue@webkit.org>
2305
2306         Unreviewed, rolling out r164627.
2307         http://trac.webkit.org/changeset/164627
2308         https://bugs.webkit.org/show_bug.cgi?id=129325
2309
2310         Broke SubtleCrypto tests (Requested by ap on #webkit).
2311
2312         * bindings/js/JSDOMBinding.cpp:
2313         (WebCore::reportException):
2314         * bindings/js/JSDOMWindowBase.cpp:
2315         (WebCore::JSDOMWindowBase::commonVM):
2316
2317 2014-02-25  Anders Carlsson  <andersca@apple.com>
2318
2319         DefaultVisitedLinkProvider can just call into the page group directly
2320         https://bugs.webkit.org/show_bug.cgi?id=129320
2321
2322         Reviewed by Andreas Kling.
2323
2324         * page/DefaultVisitedLinkProvider.cpp:
2325         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
2326         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2327
2328 2014-02-25  Commit Queue  <commit-queue@webkit.org>
2329
2330         Unreviewed, rolling out r164638.
2331         http://trac.webkit.org/changeset/164638
2332         https://bugs.webkit.org/show_bug.cgi?id=129321
2333
2334         Broke Windows build. (Requested by bfulgham on #webkit).
2335
2336         * dom/ContainerNode.h:
2337         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2338         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2339         * dom/Element.cpp:
2340         (WebCore::ensureAttrNodeListForElement):
2341         (WebCore::Element::attributes):
2342         * dom/ElementIteratorAssertions.h:
2343         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2344         * dom/ElementRareData.h:
2345         (WebCore::ElementRareData::create):
2346         (WebCore::ElementRareData::setAttributeMap):
2347         * dom/MutationObserverRegistration.cpp:
2348         (WebCore::MutationObserverRegistration::create):
2349         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2350         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2351         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2352         * dom/MutationObserverRegistration.h:
2353         * dom/NamedNodeMap.h:
2354         (WebCore::NamedNodeMap::create):
2355         (WebCore::NamedNodeMap::NamedNodeMap):
2356         * dom/Node.cpp:
2357         (WebCore::Node::ensureRareData):
2358         (WebCore::Node::didMoveToNewDocument):
2359         (WebCore::Node::ensureEventTargetData):
2360         (WebCore::Node::mutationObserverRegistry):
2361         (WebCore::Node::registerMutationObserver):
2362         (WebCore::Node::unregisterMutationObserver):
2363         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2364         * dom/Node.h:
2365         * dom/NodeRareData.h:
2366         (WebCore::NodeListsNodeData::create):
2367         (WebCore::NodeListsNodeData::NodeListsNodeData):
2368         (WebCore::NodeMutationObserverData::create):
2369         (WebCore::NodeMutationObserverData::NodeMutationObserverData):
2370         (WebCore::NodeRareData::create):
2371         (WebCore::NodeRareData::clearNodeLists):
2372         (WebCore::NodeRareData::ensureNodeLists):
2373         (WebCore::NodeRareData::ensureMutationObserverData):
2374         (WebCore::NodeRareData::NodeRareData):
2375         * dom/StyledElement.cpp:
2376         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2377
2378 2014-02-25  Eric Carlson  <eric.carlson@apple.com>
2379
2380         [iOS] Show status image when playing video to external device
2381         https://bugs.webkit.org/show_bug.cgi?id=129277
2382
2383         Reviewed by Jer Noble.
2384
2385         * Modules/mediacontrols/mediaControlsApple.js:
2386         (Controller.prototype.handleEvent): Restructure the code so it is possible to handle events
2387             that target the video element which aren't in the HandledVideoEvents array.
2388
2389         * Modules/mediacontrols/mediaControlsiOS.js:
2390         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): webkitCurrentPlaybackTargetIsWireless
2391             is an attribute, not a function.
2392         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Fix style.
2393         (ControllerIOS.prototype.updateWirelessTargetAvailable): Ditto.
2394         (ControllerIOS.prototype.updateProgress): Ditto.
2395         (ControllerIOS.prototype.handleWrapperTouchStart): Show the controls if the wireless status
2396             display is touched.
2397         (ControllerIOS.prototype.handleFullscreenButtonClicked): Fix style
2398         (ControllerIOS.prototype.handleWirelessPlaybackChange): Ditto.
2399         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
2400         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto. Stop even propagation.
2401
2402         Move "playback target" logic into HTMLMediaSession.
2403         * html/HTMLMediaElement.cpp:
2404         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call media session.
2405         (WebCore::HTMLMediaElement::loadResource): Tell media session to apply media player
2406             restrictions now that it has a url.
2407         (WebCore::HTMLMediaElement::invalidateCachedTime): Only log when cached time is not 
2408             already invalie.
2409         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Call media session.
2410         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Ditto.
2411         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
2412         (WebCore::HTMLMediaElement::addEventListener): Ditto.
2413         (WebCore::HTMLMediaElement::removeEventListen): Ditto.
2414         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
2415         (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2416
2417         * html/HTMLMediaSession.cpp:
2418         (WebCore::restrictionName): Log new WirelessVideoPlaybackDisabled restriction.
2419         (WebCore::HTMLMediaSession::showingPlaybackTargetPickerPermitted): Return false if there
2420             is no page, or if wireless playback is disabled.
2421         (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): New, logic from HTMLMediaElement.
2422         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Ditto.
2423         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets): Ditto.
2424         (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Ditto.
2425         (WebCore::HTMLMediaSession::setWirelessVideoPlaybackDisabled): Ditto.
2426         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Ditto.
2427         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): New, apply media player specific
2428             restriction.
2429         * html/HTMLMediaSession.h:
2430
2431         Move "playback target" logic into HTMLMediaSession.
2432         * html/HTMLVideoElement.cpp:
2433         (WebCore::HTMLVideoElement::parseAttribute): Call media session.
2434         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Call media session.
2435
2436         * platform/audio/MediaSessionManager.h:
2437         (WebCore::MediaSessionManager::showPlaybackTargetPicker): New method, does nothing in base class.
2438
2439         * platform/audio/ios/MediaSessionManagerIOS.h:
2440         * platform/audio/ios/MediaSessionManagerIOS.mm:
2441         (WebCore::MediaSessionManageriOS::showPlaybackTargetPicker): Add non-functional stub.
2442
2443         Implement wireless playback control and status API.
2444         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2445         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Dispatch TargetIsWirelessChanged.
2446         (WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged): Pass through to
2447             media element.
2448         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2449
2450         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2451         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2452         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
2453             m_allowsWirelessVideoPlayback.
2454         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "externalPlaybackActive" observer.
2455         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Fix broken logging.
2456         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Add "externalPlaybackActive" observer,
2457             set initial wireless playback.
2458         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):  Fix broken logging.
2459         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Ditto.
2460         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): New.
2461         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled): New.
2462         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): New.
2463         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange): New.
2464         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Deal with 
2465             externalPlaybackActive.
2466
2467 2014-02-24  Brent Fulgham  <bfulgham@apple.com>
2468
2469         [Win] Gracefully recover from missing 'naturalSize' parameter for media
2470         https://bugs.webkit.org/show_bug.cgi?id=129278
2471
2472         Reviewed by Eric Carlson.
2473
2474         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add declaration for
2475         missing function call.
2476         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2477         (WebCore::MediaPlayerPrivateAVFoundationCF::assetStatus): Don't treat missing 'naturalSize'
2478         as a fatal error.
2479         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Handle case of asset track
2480         not being available yet. 
2481         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): If the 'naturalSize' is empty,
2482         use the Player Item's 'presentationSize' instead.
2483         (WebCore::AVFWrapper::processNotification): Add missing handler for duration changed.
2484
2485 2014-02-25  Sergio Villar Senin  <svillar@igalia.com>
2486
2487         [CSS Grid Layout] Add ENABLE flag
2488         https://bugs.webkit.org/show_bug.cgi?id=129153
2489
2490         Reviewed by Simon Fraser.
2491
2492         Added ENABLE_CSS_GRID_LAYOUT feature flag.
2493
2494         * Configurations/FeatureDefines.xcconfig:
2495         * css/CSSComputedStyleDeclaration.cpp:
2496         (WebCore::isLayoutDependent):
2497         (WebCore::ComputedStyleExtractor::propertyValue):
2498         * css/CSSGridTemplateAreasValue.cpp:
2499         * css/CSSGridTemplateAreasValue.h:
2500         * css/CSSParser.cpp:
2501         (WebCore::CSSParserContext::CSSParserContext):
2502         (WebCore::operator==):
2503         (WebCore::isValidKeywordPropertyAndValue):
2504         (WebCore::isKeywordPropertyID):
2505         (WebCore::CSSParser::parseValue):
2506         * css/CSSParser.h:
2507         * css/CSSParserMode.h:
2508         * css/CSSPrimitiveValueMappings.h:
2509         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2510         * css/CSSPropertyNames.in:
2511         * css/CSSValue.cpp:
2512         (WebCore::CSSValue::equals):
2513         (WebCore::CSSValue::cssText):
2514         (WebCore::CSSValue::destroy):
2515         * css/DeprecatedStyleBuilder.cpp:
2516         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2517         * css/StyleProperties.cpp:
2518         (WebCore::StyleProperties::getPropertyValue):
2519         * css/StylePropertyShorthand.cpp:
2520         (WebCore::shorthandForProperty):
2521         (WebCore::matchingShorthandsForLonghand):
2522         * css/StyleResolver.cpp:
2523         (WebCore::equivalentBlockDisplay):
2524         (WebCore::StyleResolver::adjustRenderStyle):
2525         (WebCore::StyleResolver::applyProperty):
2526         * css/StyleResolver.h:
2527         * dom/Document.cpp:
2528         * dom/Document.h:
2529         * rendering/RenderElement.cpp:
2530         (WebCore::RenderElement::createFor):
2531         * rendering/RenderGrid.cpp:
2532         * rendering/RenderGrid.h:
2533         * rendering/style/GridCoordinate.h:
2534         * rendering/style/GridLength.h:
2535         * rendering/style/GridPosition.h:
2536         * rendering/style/GridTrackSize.h:
2537         * rendering/style/RenderStyle.cpp:
2538         (WebCore::RenderStyle::changeRequiresLayout):
2539         * rendering/style/RenderStyle.h:
2540         * rendering/style/RenderStyleConstants.h:
2541         * rendering/style/StyleAllInOne.cpp:
2542         * rendering/style/StyleGridData.cpp:
2543         * rendering/style/StyleGridData.h:
2544         * rendering/style/StyleGridItemData.cpp:
2545         * rendering/style/StyleGridItemData.h:
2546         * rendering/style/StyleRareNonInheritedData.cpp:
2547         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2548         (WebCore::StyleRareNonInheritedData::operator==):
2549         * rendering/style/StyleRareNonInheritedData.h:
2550
2551 2014-02-25  Jer Noble  <jer.noble@apple.com>
2552
2553         [EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
2554         https://bugs.webkit.org/show_bug.cgi?id=129310
2555
2556         Reviewed by Eric Carlson.
2557
2558         Only send a 'keyerror' event if an actual error code was returned, not just
2559         when no key was added:
2560         * Modules/encryptedmedia/MediaKeySession.cpp:
2561         (WebCore::MediaKeySession::addKeyTimerFired):
2562
2563         The 'length' parameter to a typed ArrayBufferView is the number of entries
2564         in the array, not the byte length:
2565         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2566         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2567
2568         The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
2569         is autoreleased; do not wrap it in an adoptNS:
2570         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2571         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2572
2573 2014-02-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2574
2575         [MediaStream] Adding mock implementation of UserMediaClient
2576         https://bugs.webkit.org/show_bug.cgi?id=129274
2577
2578         Reviewed by Eric Carlson.
2579
2580         * platform/mock/UserMediaClientMock.h: Added.
2581         (WebCore::UserMediaClientRequestNotifier::UserMediaClientRequestNotifier):
2582         * testing/Internals.cpp:
2583         (WebCore::Internals::Internals):
2584
2585 2014-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2586
2587         Tighten bitfields in live NodeLists and HTMLCollections
2588         https://bugs.webkit.org/show_bug.cgi?id=129300
2589
2590         Reviewed by Geoffrey Garen.
2591
2592         Reduce the number of bits used for m_rootType and m_type in LiveNodeList.
2593         Also use enum class for LiveNodeList types. We keep "Type" suffix not to
2594         confuse old-ish compilers.
2595
2596         * dom/ClassNodeList.cpp:
2597         (WebCore::ClassNodeList::ClassNodeList):
2598         * dom/ContainerNode.cpp:
2599         (WebCore::ContainerNode::getElementsByTagName):
2600         (WebCore::ContainerNode::getElementsByName):
2601         (WebCore::ContainerNode::getElementsByClassName):
2602         (WebCore::ContainerNode::radioNodeList):
2603         * dom/LiveNodeList.cpp:
2604         (WebCore::LiveNodeList::collectionFirst):
2605         (WebCore::LiveNodeList::collectionTraverseForward):
2606         * dom/LiveNodeList.h:
2607         (WebCore::LiveNodeList::LiveNodeList):
2608         * dom/NameNodeList.cpp:
2609         (WebCore::NameNodeList::NameNodeList):
2610         * dom/NameNodeList.h:
2611         (WebCore::NameNodeList::create):
2612         * dom/NodeRareData.h:
2613         (WebCore::NodeListsNodeData::namedNodeListKey):
2614         * dom/TagNodeList.cpp:
2615         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
2616         * dom/TagNodeList.h:
2617         (WebCore::TagNodeList::create):
2618         (WebCore::HTMLTagNodeList::create):
2619         * html/HTMLCollection.h:
2620         * html/LabelableElement.cpp:
2621         (WebCore::LabelableElement::labels):
2622         * html/LabelsNodeList.cpp:
2623         (WebCore::LabelsNodeList::LabelsNodeList):
2624         * html/LabelsNodeList.h:
2625         * html/RadioNodeList.cpp:
2626         (WebCore::RadioNodeList::RadioNodeList):
2627         * html/RadioNodeList.h:
2628         (WebCore::RadioNodeList::create):
2629
2630 2014-02-24  Anders Carlsson  <andersca@apple.com>
2631
2632         Make it possible to set the visited link provider on a per page basis
2633         https://bugs.webkit.org/show_bug.cgi?id=129288
2634
2635         Reviewed by Andreas Kling.
2636
2637         * WebCore.exp.in:
2638         Export symbols needed by WebKit2.
2639
2640         * WebCore.xcodeproj/project.pbxproj:
2641         Make VisitedLinkProvider a private header.
2642
2643         * page/Page.cpp:
2644         (WebCore::Page::Page):
2645         Take the visited link provider from the PageClients object.
2646
2647         (WebCore::Page::visitedLinkProvider):
2648         If the page has a visited link provider set, return it.
2649
2650         * page/Page.h:
2651         Add VisitedLinkProvider to Page and PageClients.
2652
2653 2014-02-25  Morten Stenshorne  <mstensho@opera.com>
2654
2655         [New Multicolumn] -webkit-column-break-inside:avoid doesn't work
2656         https://bugs.webkit.org/show_bug.cgi?id=129299
2657
2658         Reviewed by Andrei Bucur.
2659
2660         adjustForUnsplittableChild() simply forgot to check whether we
2661         were inside flow thread based multicol.
2662
2663         Test: fast/multicol/newmulticol/avoid-column-break-inside.html
2664
2665         * rendering/RenderBlockFlow.cpp:
2666         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
2667
2668 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
2669
2670         [CSSRegions] Remove unused function RenderFlowThread::regionForCompositedLayer
2671         https://bugs.webkit.org/show_bug.cgi?id=129303
2672
2673         Reviewed by Andrei Bucur.
2674
2675         Cleanup, no funtionality change, no new tests.
2676
2677         * rendering/RenderFlowThread.h:
2678
2679 2014-02-25  Mihai Tica  <mitica@adobe.com>
2680
2681         [CSS Blending] -webkit-mix-blend-mode should force transform-style: flat.
2682         https://bugs.webkit.org/show_bug.cgi?id=126158
2683
2684         Reviewed by Mihnea Ovidenie.
2685
2686         As stated in the http://www.w3.org/TR/css3-transforms/#propdef-transform-style, an element with blending
2687         should force transform-style: flat.
2688
2689         Test: css3/compositing/blend-mode-transform-style.html
2690
2691         * css/StyleResolver.cpp:
2692         (WebCore::StyleResolver::adjustRenderStyle): If blending is detected, set transform-style to flat.
2693
2694 2014-02-25  Zan Dobersek  <zdobersek@igalia.com>
2695
2696         Move to using std::unique_ptr for Element, Node and related classes
2697         https://bugs.webkit.org/show_bug.cgi?id=129058
2698
2699         Reviewed by Anders Carlsson.
2700
2701         Replace uses of OwnPtr and PassOwnPtr in Element, Node and the related
2702         classes with std::unique_ptr and move semantics.
2703
2704         * dom/ContainerNode.h:
2705         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2706         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2707         * dom/Element.cpp:
2708         (WebCore::ensureAttrNodeListForElement):
2709         (WebCore::Element::attributes):
2710         * dom/ElementIteratorAssertions.h:
2711         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2712         * dom/ElementRareData.h:
2713         (WebCore::ElementRareData::setAttributeMap):
2714         * dom/MutationObserverRegistration.cpp:
2715         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2716         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2717         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2718         * dom/MutationObserverRegistration.h:
2719         * dom/NamedNodeMap.h:
2720         (WebCore::NamedNodeMap::NamedNodeMap):
2721         * dom/Node.cpp:
2722         (WebCore::Node::ensureRareData):
2723         (WebCore::Node::didMoveToNewDocument):
2724         (WebCore::Node::ensureEventTargetData):
2725         (WebCore::Node::mutationObserverRegistry):
2726         (WebCore::Node::registerMutationObserver):
2727         (WebCore::Node::unregisterMutationObserver):
2728         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2729         * dom/Node.h:
2730         * dom/NodeRareData.h:
2731         (WebCore::NodeListsNodeData::NodeListsNodeData):
2732         (WebCore::NodeRareData::NodeRareData):
2733         (WebCore::NodeRareData::clearNodeLists):
2734         (WebCore::NodeRareData::ensureNodeLists):
2735         (WebCore::NodeRareData::ensureMutationObserverData):
2736         * dom/StyledElement.cpp:
2737         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2738
2739 2014-02-25  Andreas Kling  <akling@apple.com>
2740
2741         Prune dead code for Web Inspector memory instrumentation.
2742         <https://webkit.org/b/129286>
2743
2744         This was leftover code from Chromium's inspector. It's not used by
2745         today's WebKit inspector.
2746
2747         Reviewed by Sam Weinig.
2748
2749         * CMakeLists.txt:
2750         * DerivedSources.make:
2751         * GNUmakefile.am:
2752         * GNUmakefile.list.am:
2753         * WebCore.vcxproj/WebCore.vcxproj:
2754         * WebCore.vcxproj/WebCore.vcxproj.filters:
2755         * WebCore.xcodeproj/project.pbxproj:
2756         * inspector/InspectorAllInOne.cpp:
2757         * inspector/InspectorController.cpp:
2758         (WebCore::InspectorController::InspectorController):
2759         * inspector/InspectorController.h:
2760         * inspector/InspectorMemoryAgent.cpp: Removed.
2761         * inspector/InspectorMemoryAgent.h: Removed.
2762         * inspector/InspectorTimelineAgent.cpp:
2763         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2764         * inspector/InspectorTimelineAgent.h:
2765         * inspector/WorkerInspectorController.cpp:
2766         (WebCore::WorkerInspectorController::WorkerInspectorController):
2767         * inspector/protocol/Memory.json: Removed.
2768
2769 2014-02-24  Chris Fleizach  <cfleizach@apple.com>
2770
2771         AX: Support abbr, acronym
2772         https://bugs.webkit.org/show_bug.cgi?id=128860
2773
2774         Reviewed by Mario Sanchez Prada.
2775
2776         Expose the data in <abbr>, <acronym> and <th abbr=""> as an 
2777         alternateTextValue() parameter.
2778
2779         Test: platform/mac/accessibility/abbr-acronym-tags.html
2780
2781         * accessibility/AccessibilityObject.cpp:
2782         (WebCore::AccessibilityObject::hasTagName):
2783         * accessibility/AccessibilityObject.h:
2784         (WebCore::AccessibilityObject::alternateTextValue):
2785         (WebCore::AccessibilityObject::supportsAlternateTextValue):
2786         * accessibility/AccessibilityRenderObject.cpp:
2787         (WebCore::AccessibilityRenderObject::alternateTextValue):
2788         (WebCore::AccessibilityRenderObject::supportsAlternateTextValue):
2789         * accessibility/AccessibilityRenderObject.h:
2790         * accessibility/AccessibilityTableCell.cpp:
2791         (WebCore::AccessibilityTableCell::alternateTextValue):
2792         (WebCore::AccessibilityTableCell::supportsAlternateTextValue):
2793         * accessibility/AccessibilityTableCell.h:
2794         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2795         (AXAttributeStringSetAlternateTextValue):
2796         (AXAttributedStringAppendText):
2797         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2798         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2799
2800 2014-02-24  Martin Robinson  <mrobinson@igalia.com>
2801
2802         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
2803         https://bugs.webkit.org/show_bug.cgi?id=128417
2804
2805         Reviewed by Carlos Garcia Campos.
2806
2807         * bindings/gobject/GNUmakefile.am: Generate a config file for webkitdom documentation generation.
2808
2809 2014-02-24  Mark Lam  <mark.lam@apple.com>
2810
2811         Need to initialize VM stack data even when the VM is on an exclusive thread.
2812         <https://webkit.org/b/129265>
2813
2814         Reviewed by Geoffrey Garen.
2815
2816         No new tests.
2817
2818         * bindings/js/JSDOMBinding.cpp:
2819         (WebCore::reportException):
2820         - Added an assertion to ensure that we are holding the JSLock.
2821         * bindings/js/JSDOMWindowBase.cpp:
2822         (WebCore::JSDOMWindowBase::commonVM):
2823         - Updated to use the new VM::setExclusiveThread().
2824
2825 2014-02-24  Anders Carlsson  <andersca@apple.com>
2826
2827         Add a DefaultVisitedLinkProvider and route visited link actions through it
2828         https://bugs.webkit.org/show_bug.cgi?id=129285
2829
2830         Reviewed by Dan Bernstein.
2831
2832         DefaultVisitedLinkProvider currently just forwards everything to the visited link strategy,
2833         but will soon take over the responsibilities of visited link handling from PageGroup.
2834         
2835         * CMakeLists.txt:
2836         * GNUmakefile.list.am:
2837         * WebCore.vcxproj/WebCore.vcxproj:
2838         * WebCore.vcxproj/WebCore.vcxproj.filters:
2839         * WebCore.xcodeproj/project.pbxproj:
2840         * dom/VisitedLinkState.cpp:
2841         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2842         * loader/HistoryController.cpp:
2843         (WebCore::addVisitedLink):
2844         (WebCore::HistoryController::updateForStandardLoad):
2845         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2846         (WebCore::HistoryController::updateForClientRedirect):
2847         (WebCore::HistoryController::updateForSameDocumentNavigation):
2848         (WebCore::HistoryController::pushState):
2849         (WebCore::HistoryController::replaceState):
2850         * page/DefaultVisitedLinkProvider.cpp: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2851         (WebCore::DefaultVisitedLinkProvider::create):
2852         (WebCore::DefaultVisitedLinkProvider::DefaultVisitedLinkProvider):
2853         (WebCore::DefaultVisitedLinkProvider::~DefaultVisitedLinkProvider):
2854         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
2855         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2856         * page/DefaultVisitedLinkProvider.h: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2857         * page/Page.cpp:
2858         (WebCore::Page::visitedLinkProvider):
2859         * page/Page.h:
2860         * page/PageGroup.cpp:
2861         (WebCore::PageGroup::PageGroup):
2862         (WebCore::PageGroup::visitedLinkProvider):
2863         * page/PageGroup.h:
2864         * page/VisitedLinkProvider.h:
2865
2866 2014-02-24  Jeremy Jones  <jeremyj@apple.com>
2867
2868         WK2 AVKit fullscreen doesn't display video.
2869         https://bugs.webkit.org/show_bug.cgi?id=128564
2870
2871         Reviewed by Simon Fraser.
2872
2873         * WebCore.exp.in:
2874         Export WebCore::PlatformCALayer::platformCALayer()
2875
2876         * platform/ios/WebVideoFullscreenInterface.h:
2877         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2878         Remove SetVideoLayerID(). 
2879
2880         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2881         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
2882         Wrap make video layer look like an AVAVPlayerLayer with WebAVPlayerLayer
2883
2884         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2885         (WebVideoFullscreenModelMediaElement::setMediaElement):
2886         Pass along the videoLayer before borrowing it so the interface will be ready to
2887         catch the transaction that removes it.
2888
2889 2014-02-24  Samuel White  <samuel_white@apple.com>
2890
2891         AX: AccessibilityObject::findMatchingObjects should never include 'this' in results.
2892         https://bugs.webkit.org/show_bug.cgi?id=129243
2893
2894         Reviewed by Chris Fleizach.
2895
2896         Fix removes the container object from the search results when searching backwards. This
2897         makes backwards & forwards search results consistent with each other.
2898
2899         Test: platform/mac/accessibility/search-predicate-container-not-included.html
2900
2901         * accessibility/AccessibilityObject.cpp:
2902         (WebCore::AccessibilityObject::findMatchingObjects):
2903
2904 2014-02-24  Samuel White  <samuel_white@apple.com>
2905
2906         AX: findMatchingObjects backwards start position inconsistent with forwards start position when startObject == nullptr.
2907         https://bugs.webkit.org/show_bug.cgi?id=129266
2908
2909         Reviewed by Chris Fleizach.
2910
2911         When searching forward with no start object, the first thing considered is the first child of
2912         the container. However, when searching backwards with no start object nothing in the container
2913         is considered; this basically negates the search. This patch makes backwards searching without
2914         a start object start from the last child of the container to match forward search expectations.
2915
2916         Test: platform/mac/accessibility/search-predicate-start-not-specified.html
2917
2918         * accessibility/AccessibilityObject.cpp:
2919         (WebCore::AccessibilityObject::findMatchingObjects):
2920
2921 2014-02-24  Andreas Kling  <akling@apple.com>
2922
2923         Prune dead code for Web Inspector canvas instrumentation.
2924         <https://webkit.org/b/129269>
2925
2926         This was leftover code from Chromium's inspector. It's not used by
2927         today's WebKit inspector.
2928
2929         Reviewed by Timothy Hatcher.
2930
2931         * CMakeLists.txt:
2932         * DerivedSources.make:
2933         * GNUmakefile.am:
2934         * GNUmakefile.list.am:
2935         * WebCore.vcxproj/WebCore.vcxproj:
2936         * WebCore.vcxproj/WebCore.vcxproj.filters:
2937         * WebCore.xcodeproj/project.pbxproj:
2938         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2939         (WebCore::JSHTMLCanvasElement::getContext):
2940         * inspector/InjectedScriptCanvasModule.cpp: Removed.
2941         * inspector/InjectedScriptCanvasModule.h: Removed.
2942         * inspector/InspectorAllInOne.cpp:
2943         * inspector/InspectorCanvasAgent.cpp: Removed.
2944         * inspector/InspectorCanvasAgent.h: Removed.
2945         * inspector/InspectorCanvasInstrumentation.h: Removed.
2946         * inspector/InspectorController.cpp:
2947         (WebCore::InspectorController::InspectorController):
2948         (WebCore::InspectorController::didBeginFrame):
2949         * inspector/InspectorInstrumentation.cpp:
2950         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
2951         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2952         * inspector/InspectorInstrumentation.h:
2953         * inspector/InstrumentingAgents.cpp:
2954         (WebCore::InstrumentingAgents::InstrumentingAgents):
2955         (WebCore::InstrumentingAgents::reset):
2956         * inspector/InstrumentingAgents.h:
2957
2958 2014-02-24  Zoltan Horvath  <zoltan@webkit.org>
2959
2960         [CSS Shapes] Adjust lineTop position to the next available wrapping location at shape-outsides
2961         https://bugs.webkit.org/show_bug.cgi?id=128693
2962
2963         Reviewed by David Hyatt.
2964
2965         When we don't have space next to the floating container, but we have space inside the floating-container next
2966         to the defined shape-outside, we should wrap around the shape-outside. This patch fixes the behavior both for
2967         cases when there is no space to fit at the first line, and for the additional lines cases.
2968
2969         Test: fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjustment.html
2970
2971         * rendering/line/BreakingContextInlineHeaders.h:
2972         (WebCore::BreakingContext::handleText):
2973         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2974         * rendering/line/LineWidth.cpp:
2975         (WebCore::availableWidthAtOffset):
2976         (WebCore::LineWidth::updateLineDimension): Added new helper.
2977         (WebCore::isWholeLineFit): Added new helper.
2978         (WebCore::LineWidth::wrapNextToShapeOutside): Added new helper.
2979         (WebCore::LineWidth::fitBelowFloats): Add optional parameter for the function.
2980         * rendering/line/LineWidth.h:
2981
2982 2014-02-24  Martin Hock  <mhock@apple.com>
2983
2984         Create SessionID value-style class for session IDs.
2985         https://bugs.webkit.org/show_bug.cgi?id=129141
2986
2987         Reviewed by Brady Eidson.
2988
2989         * GNUmakefile.list.am:
2990         * WebCore.exp.in:
2991         * WebCore.xcodeproj/project.pbxproj:
2992         * page/Page.cpp: Add SessionID member.
2993         (WebCore::Page::Page):
2994         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
2995         * page/Page.h:
2996         (WebCore::Page::setSessionID):
2997         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
2998         (WebCore::SessionID::SessionID):
2999         (WebCore::SessionID::isValid): Not empty.
3000         (WebCore::SessionID::isEphemeral):
3001         (WebCore::SessionID::sessionID):
3002         (WebCore::SessionID::operator==): Value-based equality.
3003         (WebCore::SessionID::operator!=):
3004         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
3005         (WebCore::SessionID::defaultSessionID):
3006         (WebCore::SessionID::legacyPrivateSessionID):
3007         * page/SessionIDHash.h:
3008         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
3009         (WTF::SessionIDHash::equal):
3010         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
3011         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
3012         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
3013
3014 2014-02-24  Javier Fernandez  <jfernandez@igalia.com>
3015
3016         [CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
3017         https://bugs.webkit.org/show_bug.cgi?id=128372
3018
3019         Reviewed by David Hyatt.
3020
3021         From Blink r165692 by <svillar@igalia.com>
3022
3023         The spec defines a different code path for the computeUsedBreadthOfGridTracks algorithm
3024         http://dev.w3.org/csswg/css-grid/#function-ComputeUsedBreadthOfGridTracks.
3025
3026         Basically the track breadth is different when the available size is undefined and thus,
3027         cannot be taken into account during the computations.
3028         The available size is undefined whenever the height is auto or the grid element has a
3029         shrink-to-fit behavior.
3030
3031         It was also renamed the function to match the specs so the function name starts with
3032         'compute' instead of 'computed'.
3033
3034         No new tests, but added new cases to some of them.
3035
3036         * rendering/RenderGrid.cpp:
3037         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3038         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3039         (WebCore::gridElementIsShrinkToFit):
3040         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3041         (WebCore::RenderGrid::layoutGridItems):
3042         * rendering/RenderGrid.h:
3043
3044 2014-02-24  Roger Fong  <roger_fong@apple.com>
3045
3046         [Windows] Unreviewed pre-emptive build fix.
3047
3048         * WebCore.vcxproj/WebCoreCommon.props: Add replay directory to include path.
3049
3050 2014-02-24  Brady Eidson  <beidson@apple.com>
3051
3052         Break out ImageControls style into an external stylesheet
3053         https://bugs.webkit.org/show_bug.cgi?id=129273
3054
3055         Reviewed by Jer Noble.
3056
3057         * DerivedSources.make:
3058         * WebCore.xcodeproj/project.pbxproj:
3059
3060         * css/CSSDefaultStyleSheets.cpp:
3061         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3062         * css/CSSDefaultStyleSheets.h:
3063
3064         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3065         (WebCore::ImageControlsRootElementMac::maybeCreate):
3066
3067         * html/shadow/mac/imageControlsMac.css:
3068         (.x-webkit-imagemenu):
3069         (.x-webkit-imagemenu:hover):
3070
3071         * rendering/RenderTheme.h:
3072         (WebCore::RenderTheme::mediaControlsScript):
3073         (WebCore::RenderTheme::imageControlsStyleSheet):
3074         * rendering/RenderThemeMac.h:
3075         * rendering/RenderThemeMac.mm:
3076         (WebCore::RenderThemeMac::imageControlsStyleSheet):
3077
3078 2014-02-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3079
3080         [WebRTC] Validating RTCConfiguration according to the spec
3081         https://bugs.webkit.org/show_bug.cgi?id=129182
3082
3083         Reviewed by Eric Carlson.
3084
3085         Spec states that:
3086             - iceServers should not be an empty list
3087             - the entry in the configuration dictionary is "urls", instead of "url"
3088             - urls can be either a list or a string
3089         Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection
3090
3091         Existing tests were updated.
3092
3093         * Modules/mediastream/RTCPeerConnection.cpp:
3094         (WebCore::appendIceServer): Added.
3095         (WebCore::processIceServer): Added.
3096         (WebCore::RTCPeerConnection::parseConfiguration):
3097
3098 2014-02-24  Radu Stavila  <stavila@adobe.com>
3099
3100         [CSS Regions] Relative positioned elements overflowing the region do not get painted into the next tile
3101         https://bugs.webkit.org/show_bug.cgi?id=129254
3102
3103         Reviewed by Antti Koivisto.
3104
3105         The painting of the region's layer should not be aborted so early if the region's fragment shouldn't be painted
3106         because that would prevent all the layer's children from being painted.
3107
3108         Another problem this patch addresses is that clipping should also be performed when the clip rect is empty,
3109         which is what happens when painting in a tile in which the flowed element would normally be painted
3110         if it wasn't clipped by the region.
3111
3112         Test: fast/regions/content-relative-next-tile.html
3113
3114         * rendering/RenderLayer.cpp:
3115         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
3116
3117 2014-02-24  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
3118         
3119         Get rid of the unused 'immediate' parameters from repaint related functions
3120         https://bugs.webkit.org/show_bug.cgi?id=129111
3121
3122         Reviewed by Simon Fraser.
3123
3124         Removing the 'immediate' parameters from repaint related functions - accoring
3125         to the FIXME in RenderView::repaintViewRectangle() - since they have no effect.
3126
3127         No new tests are necessary because there is no behavior change
3128
3129         * dom/Element.cpp:
3130         (WebCore::Element::setActive):
3131         * loader/EmptyClients.h:
3132         * page/Chrome.cpp:
3133         (WebCore::Chrome::invalidateRootView):
3134         (WebCore::Chrome::invalidateContentsAndRootView):
3135         (WebCore::Chrome::invalidateContentsForSlowScroll):
3136         * page/Chrome.h:
3137         * page/ChromeClient.h:
3138         * page/Frame.cpp:
3139         (WebCore::Frame::tiledBackingStorePaintEnd):
3140         * page/FrameView.cpp:
3141         (WebCore::FrameView::invalidateRect):
3142         (WebCore::FrameView::scrollContentsFastPath):
3143         (WebCore::FrameView::repaintContentRectangle):
3144         (WebCore::FrameView::shouldUpdate):
3145         * page/FrameView.h:
3146         * platform/HostWindow.h:
3147         * platform/ScrollView.cpp:
3148         (WebCore::ScrollView::scrollContents):
3149         (WebCore::ScrollView::scrollContentsSlowPath):
3150         (WebCore::ScrollView::repaintContentRectangle):
3151         (WebCore::ScrollView::updateOverhangAreas):
3152         (WebCore::ScrollView::addPanScrollIcon):
3153         (WebCore::ScrollView::removePanScrollIcon):
3154         (WebCore::ScrollView::platformRepaintContentRectangle):
3155         * platform/ScrollView.h:
3156         * rendering/RenderBox.cpp:
3157         (WebCore::RenderBox::repaintLayerRectsForImage):
3158         * rendering/RenderFlowThread.cpp:
3159         (WebCore::RenderFlowThread::repaintRectangleInRegions):
3160         * rendering/RenderFlowThread.h:
3161         * rendering/RenderLayer.cpp:
3162         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
3163         * rendering/RenderLayer.h:
3164         * rendering/RenderMultiColumnSet.cpp:
3165         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3166         * rendering/RenderMultiColumnSet.h:
3167         * rendering/RenderObject.cpp:
3168         (WebCore::RenderObject::repaintUsingContainer):
3169         (WebCore::RenderObject::repaint):
3170         (WebCore::RenderObject::repaintRectangle):
3171         (WebCore::RenderObject::repaintSlowRepaintObject):
3172         * rendering/RenderObject.h:
3173         * rendering/RenderRegion.cpp:
3174         (WebCore::RenderRegion::repaintFlowThreadContent):
3175         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3176         * rendering/RenderRegion.h:
3177         * rendering/RenderView.cpp:
3178         (WebCore::RenderView::repaintViewRectangle):
3179         (WebCore::RenderView::flushAccumulatedRepaintRegion):
3180         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
3181         * rendering/RenderView.h:
3182         * svg/graphics/SVGImageChromeClient.h:
3183
3184 2014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
3185
3186         Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
3187         https://bugs.webkit.org/show_bug.cgi?id=129255
3188
3189         Reviewed by Csaba Osztrogonác.
3190
3191         ENABLE_WORKERS macro was removed in r159679, but r161589 added back some occurrences.
3192         Support is now also removed from xcconfig files.
3193
3194         No new tests needed.
3195
3196         * Configurations/FeatureDefines.xcconfig:
3197         * platform/ThreadGlobalData.cpp:
3198         * platform/ThreadGlobalData.h:
3199         * platform/Timer.h:
3200         (WebCore::TimerBase::isActive):
3201         * platform/ios/wak/WebCoreThread.mm:
3202         (RunWebThread):
3203         (StartWebThread):
3204
3205 2014-02-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3206
3207         [CMake] Get rid of "FIXME: The Blackberry port ..." from WebCore/CmakeLists.txt
3208         https://bugs.webkit.org/show_bug.cgi?id=129152
3209
3210         Reviewed by Gyuyoung Kim.
3211
3212         * CMakeLists.txt:
3213
3214 2014-02-24  David Kilzer  <ddkilzer@apple.com>
3215
3216         Remove redundant setting in FeatureDefines.xcconfig
3217
3218         * Configurations/FeatureDefines.xcconfig:
3219
3220 2014-02-24  Mihai Tica  <mitica@adobe.com>
3221
3222         [CSS Blending] An element having -webkit-mix-blend-mode should only blend with the contents of the parent stacking context
3223         https://bugs.webkit.org/show_bug.cgi?id=129154
3224
3225         Reviewed by Dean Jackson.
3226
3227         The blending operation of an element having -webkit-mix-blend-mode should be restricted to the parent stacking context.
3228         This change isolates blending, preventing it from blending with other underlying elements besides the parent stacking context.
3229
3230         Tests: css3/compositing/blend-mode-isolated-group-1.html
3231                css3/compositing/blend-mode-isolated-group-2.html
3232                css3/compositing/blend-mode-isolated-group-3.html
3233
3234         * rendering/RenderLayer.cpp:
3235         (WebCore::RenderLayer::RenderLayer): Initialize added members to false.
3236         (WebCore::RenderLayer::updateBlendMode): Check if a blend mode was set or unset. If so, set the m_updateParentStackingContextShouldIsolateBlendingDirty to true.
3237         (WebCore::RenderLayer::updateParentStackingContextShouldIsolateBlending): Traverse to the parent stacking context and update the
3238         m_isolatesBlending member accordingly.
3239         * rendering/RenderLayer.h:
3240         - Add isolatesBlending() as a condition for creating a transparency layer in the paintsWithTransparency method.
3241         - Add m_updateParentStackingContextShouldIsolateBlendingDirty member.
3242         - Add m_isolatesBlending member and getter.
3243         * rendering/RenderLayerCompositor.cpp:
3244         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Call updateParentStackingContextShouldIsolateBlending. 
3245
3246 2014-02-24  Krzysztof Czech  <k.czech@samsung.com>
3247
3248         [ATK] Wrong selected element at a given index in a list box.
3249         https://bugs.webkit.org/show_bug.cgi?id=129039
3250
3251         Reviewed by Chris Fleizach.
3252
3253         Test: accessibility/select-element-at-index.html
3254
3255         The selected element at a given index was wrong. One should be considered among the
3256         all children of a list box, not only selected ones.
3257
3258         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
3259         (core):
3260         (listObjectForSelection):
3261         (optionFromList):
3262         (optionFromSelection):
3263         (webkitAccessibleSelectionRefSelection):
3264
3265 2014-02-23  Dean Jackson  <dino@apple.com>
3266
3267         [WebGL] Allow ANGLE to initialize unused varyings
3268         https://bugs.webkit.org/show_bug.cgi?id=129240
3269         <rdar://problem/15203342>
3270
3271         Reviewed by Sam Weinig.
3272
3273         Covered by: conformance/glsl/misc/shaders-with-varyings.html
3274
3275         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3276         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
3277         Add SH_INIT_VARYINGS_WITHOUT_STATIC_USE to compiler flags.
3278
3279 2014-02-23  Sam Weinig  <sam@webkit.org>
3280
3281         Update FeatureDefines.xcconfig
3282
3283         Rubber-stamped by Anders Carlsson.
3284
3285         * Configurations/FeatureDefines.xcconfig:
3286
3287 2014-02-23  Dean Jackson  <dino@apple.com>
3288
3289         Sort the project file with sort-Xcode-project-file.
3290
3291         Rubber-stamped by Sam Weinig.
3292
3293         * WebCore.xcodeproj/project.pbxproj:
3294
3295 2014-02-23  Sam Weinig  <sam@webkit.org>
3296
3297         Fix incorrectly commented out code.
3298
3299         * platform/TelephoneNumberDetector.h:
3300
3301 2014-02-23  Sam Weinig  <sam@webkit.org>
3302
3303         Extract platform specific parts of telephone number detection 
3304         https://bugs.webkit.org/show_bug.cgi?id=129238
3305
3306         Reviewed by Dean Jackson.
3307
3308         * WebCore.xcodeproj/project.pbxproj:
3309         Add new files.
3310
3311         * html/parser/HTMLTreeBuilder.cpp:
3312         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
3313         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
3314         * platform/TelephoneNumberDetector.h: Added.
3315         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: Added.
3316         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
3317         (WebCore::TelephoneNumberDetector::isSupported):
3318         (WebCore::TelephoneNumberDetector::find):
3319         Move code to TelephoneNumberDetector.
3320
3321 2014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3322
3323         Change a url parameter type with URL in NavigatorContentUtils
3324         https://bugs.webkit.org/show_bug.cgi?id=129202
3325
3326         Reviewed by Sam Weinig.
3327
3328         It would be good if we use *URL* for url parameters instead of using String.
3329
3330         Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
3331
3332         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3333         (WebCore::verifyCustomHandlerURL):
3334         (WebCore::NavigatorContentUtils::registerProtocolHandler):
3335         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
3336         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
3337         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
3338
3339 2014-02-23  Dean Jackson  <dino@apple.com>
3340
3341         Update ANGLE to 836bd2176e5607b14846cf1fbc5932dbc91318f4
3342         https://bugs.webkit.org/show_bug.cgi?id=129232
3343
3344         Reviewed by Brent Fulgham.
3345
3346         New files added, derived sources compiled directly, and generated
3347         steps removed for both EFL and GTK, with much-needed help from
3348         Sergio Correia.
3349
3350         * CMakeLists.txt:
3351         * GNUMakefile.am:
3352
3353 2014-02-23  Sam Weinig  <sam@webkit.org>
3354
3355         Move RenderMathMLMenclose.h/cpp to the right place in the Xcode project and sort.
3356
3357         Rubber-stamped by Anders Carlsson.
3358
3359         * WebCore.xcodeproj/project.pbxproj:
3360
3361 2014-02-23  Sam Weinig  <sam@webkit.org>
3362
3363         Move telephone number detection behind its own ENABLE macro
3364         https://bugs.webkit.org/show_bug.cgi?id=129236
3365
3366         Reviewed by Dean Jackson.
3367
3368         * Configurations/FeatureDefines.xcconfig:
3369         Add ENABLE_TELEPHONE_NUMBER_DETECTION.
3370
3371         * dom/Document.cpp:
3372         (WebCore::Document::Document):
3373         * dom/Document.h:
3374         * html/parser/HTMLConstructionSite.h:
3375         * html/parser/HTMLTreeBuilder.cpp:
3376         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
3377         * html/parser/HTMLTreeBuilder.h:
3378         Use ENABLE(TELEPHONE_NUMBER_DETECTION).
3379
3380         * platform/mac/SoftLinking.h:
3381         Remove PLATOFORM(IOS) from SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL, it is not iOS specific.
3382
3383 2014-02-23  Zalan Bujtas  <zalan@apple.com>
3384
3385         Subpixel rendering: Fix bleed avoidance subpixel calculation.
3386         https://bugs.webkit.org/show_bug.cgi?id=129225
3387
3388         Reviewed by Simon Fraser.
3389         
3390         static_cast<LayoutUnit>(int value) only produces the desired result when subpixel is off.
3391
3392         Currently not testable.
3393
3394         * rendering/RenderBoxModelObject.cpp:
3395         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
3396         (WebCore::shrinkRectByOneDevicePixel):
3397         (WebCore::RenderBoxModelObject::borderInnerRectAdjustedForBleedAvoidance):
3398         (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
3399         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3400         * rendering/RenderBoxModelObject.h:
3401
3402 2014-02-23  Zalan Bujtas  <zalan@apple.com>
3403
3404         Subpixel rendering: Add devicepixel based computation to BorderEdge class.
3405         https://bugs.webkit.org/show_bug.cgi?id=129224
3406
3407         Reviewed by Simon Fraser.
3408
3409         To produce correct width (and type) results, BorderEdge class needs to take device pixel ratio into account.
3410
3411         Currently not testable.
3412
3413         * rendering/RenderBoxModelObject.cpp:
3414         (WebCore::BorderEdge::BorderEdge):
3415         (WebCore::BorderEdge::obscuresBackgroundEdge):
3416         (WebCore::BorderEdge::getDoubleBorderStripeWidths): this does not always produce the same
3417         result as before, but the sum of inner and outer is not different.
3418         (WebCore::BorderEdge::borderWidthInDevicePixel):
3419         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
3420
3421 2014-02-22  Dan Bernstein  <mitz@apple.com>
3422
3423         REGRESSION (r164507): Crash beneath JSGlobalObjectInspectorController::reportAPIException at facebook.com, twitter.com, youtube.com
3424         https://bugs.webkit.org/show_bug.cgi?id=129227
3425
3426         Reviewed by Eric Carlson.
3427
3428         Reverted r164507.
3429
3430         * bindings/js/JSDOMBinding.cpp:
3431         (WebCore::reportException):
3432         * inspector/InspectorResourceAgent.cpp:
3433         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3434         * inspector/PageDebuggerAgent.cpp:
3435         (WebCore::PageDebuggerAgent::breakpointActionLog):
3436         * inspector/TimelineRecordFactory.cpp:
3437         (WebCore::TimelineRecordFactory::createGenericRecord):
3438         * page/Console.cpp:
3439         (WebCore::internalAddMessage):
3440         (WebCore::Console::profile):
3441         (WebCore::Console::profileEnd):
3442         (WebCore::Console::timeEnd):
3443         * page/ContentSecurityPolicy.cpp:
3444         (WebCore::gatherSecurityPolicyViolationEventData):
3445         (WebCore::ContentSecurityPolicy::reportViolation):
3446         * page/DOMWindow.cpp:
3447         (WebCore::DOMWindow::postMessage):
3448
3449 2014-02-22  Joseph Pecoraro  <pecoraro@apple.com>
3450
3451         Remove some unreachable code (-Wunreachable-code)
3452         https://bugs.webkit.org/show_bug.cgi?id=129220
3453
3454         Reviewed by Eric Carlson.
3455
3456         * html/parser/HTMLTreeBuilder.cpp:
3457         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
3458         (WebCore::HTMLTreeBuilder::processEndTag):
3459         The only tricky case. Here there was a break inside the
3460         #if, but not the #else, and a break after the #endif.
3461         Remove the break inside the #if, and always use the
3462         break after the #endif.
3463
3464         * Modules/indexeddb/IDBTransaction.cpp:
3465         (WebCore::IDBTransaction::modeToString):
3466         * bindings/js/JSTrackCustom.cpp:
3467         (WebCore::toJS):
3468         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3469         (WebCore::functionForUniform):
3470         * css/SelectorChecker.cpp:
3471         (WebCore::SelectorChecker::checkOne):
3472         * html/HTMLMediaElement.cpp:
3473      &