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