90aec8600881cadffd411b3086b934a1eabb20c0
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
2
3         REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
4         https://bugs.webkit.org/show_bug.cgi?id=119780
5
6         Reviewed by Benjamin Poulain.
7
8         The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
9         elements found by getAllElementsById are descendents of rootNode when there are multiple
10         elements of the same id. This resulted in querySelector and querySelectorAll of an element
11         returning nodes outside of the element.
12
13         Fixed the bug by checking this condition when we have multiple elements of the same id.
14
15         Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
16
17         * dom/SelectorQuery.cpp:
18         (WebCore::SelectorDataList::executeFastPathForIdSelector):
19
20 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
21
22         Fix orphan needsLayout state in RenderTextControlSingleLine
23         https://bugs.webkit.org/show_bug.cgi?id=119726
24
25         Reviewed by Kent Tamura.
26
27         Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
28
29         We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
30         in cases of input[type=search] and input[type=number], dirty.
31
32         * rendering/RenderTextControlSingleLine.cpp:
33         (WebCore::setNeedsLayoutOnAncestors):
34         (WebCore::RenderTextControlSingleLine::layout):
35
36 2013-08-13  Sam Weinig  <sam@webkit.org>
37
38         [Re-land] Cleanup MediaQueryListListener
39         https://bugs.webkit.org/show_bug.cgi?id=119664
40
41         Reviewed by Andreas Kling.
42
43         Make MediaQueryListListener a proper WebIDL callback.
44
45         * CMakeLists.txt:
46         * DerivedSources.cpp:
47         * DerivedSources.make:
48         * DerivedSources.pri:
49         * GNUmakefile.list.am:
50         * Target.pri:
51         * WebCore.vcxproj/WebCore.vcxproj:
52         * WebCore.vcxproj/WebCore.vcxproj.filters:
53         * WebCore.xcodeproj/project.pbxproj:
54         Update project files.
55
56         * bindings/scripts/CodeGeneratorJS.pm:
57         (GenerateCallbackHeader):
58         (GenerateCallbackImplementation):
59         (JSValueToNative):
60         * bindings/scripts/IDLAttributes.txt:
61         Add support for CallbackNeedsOperatorEqual, which adds an operator==.
62
63         * css/MediaAllInOne.cpp:
64         Remove MediaQueryListListener.cpp.
65
66         * css/MediaQueryListListener.cpp:
67         Removed.
68
69         * css/MediaQueryListListener.h:
70         (WebCore::MediaQueryListListener::~MediaQueryListListener):
71         (WebCore::MediaQueryListListener::MediaQueryListListener):
72         * css/MediaQueryListListener.idl:
73         Convert to a proper WebIDL callback.
74
75         * css/MediaQueryMatcher.cpp:
76         (WebCore::MediaQueryMatcher::Listener::evaluate):
77         (WebCore::MediaQueryMatcher::styleResolverChanged):
78         * css/MediaQueryMatcher.h:
79         Remove all traces of the ScriptState.
80
81 2013-08-13  Dean Jackson  <dino@apple.com>
82
83         <https://webkit.org/b/119776> Don't use ScriptProfiler to find canvases for instrumentation
84
85         Reviewed by Joseph Pecoraro.
86
87         InspectorCanvasAgent::findFramesWithUninstrumentedCanvases uses a ScriptProfiler to walk the tree
88         looking for canvas elements. This is currently not implemented in JSC, but we can do this directly
89         with DOM methods. We're only looking for Canvas elements that have a context, so there isn't a need
90         for this abstract walking object.
91
92         * html/HTMLCanvasElement.h: Add new helpers to cast to <canvas>.
93         (WebCore::isHTMLCanvasElement):
94         (WebCore::toHTMLCanvasElement):
95         * inspector/InspectorCanvasAgent.cpp:
96         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): Simply walk
97         the frame tree and use getElementsByTagName to find canvas elements.
98         * bindings/js/bindings/js/ScriptProfiler.h: Removed unused method.
99
100 2013-08-13  Brent Fulgham  <bfulgham@apple.com>
101
102         [Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
103         https://bugs.webkit.org/show_bug.cgi?id=119772
104
105         Reviewed by Simon Fraser.
106
107         * platform/graphics/ca/GraphicsLayerCA.cpp:
108         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
109         the correct (supported) tiled layer type for Windows.
110         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
111         (PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
112         we introduce this mistake again in the future.
113
114 2013-08-13  Anders Carlsson  <andersca@apple.com>
115
116         <https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
117
118         Reviewed by Andreas Kling.
119
120         This is preparation for making it a hard error to use DEFINE_STATIC_LOCAL with smart pointer types.
121
122         * dom/UserTypingGestureIndicator.cpp:
123         (WebCore::focusedNode):
124         * page/mac/EventHandlerMac.mm:
125         (WebCore::currentNSEventSlot):
126         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
127         (WebCore::defaultNetworkStorageSession):
128         (WebCore::cookieStorageOverride):
129
130 2013-08-13  Anders Carlsson  <andersca@apple.com>
131
132         Stop using DEFINE_STATIC_LOCAL with RefPtr
133         https://bugs.webkit.org/show_bug.cgi?id=119769
134
135         Reviewed by Andreas Kling.
136
137         No need to waste heap memory allocating RefPtr, just store the raw pointers directly.
138
139         * dom/ContextFeatures.cpp:
140         (WebCore::ContextFeatures::defaultSwitch):
141         * dom/DocumentMarker.cpp:
142         (WebCore::DocumentMarkerTextMatch::instanceFor):
143         * editing/EditingStyle.cpp:
144         (WebCore::StyleChange::extractTextStyles):
145         * html/FTPDirectoryDocument.cpp:
146         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
147         * html/HTMLPlugInImageElement.cpp:
148         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
149         * html/track/TextTrack.cpp:
150         (WebCore::TextTrack::captionMenuOffItem):
151         (WebCore::TextTrack::captionMenuAutomaticItem):
152         * loader/icon/IconDatabase.cpp:
153         (WebCore::loadDefaultIconRecord):
154         * platform/graphics/Image.cpp:
155         (WebCore::Image::nullImage):
156         * platform/graphics/PlatformTextTrack.h:
157         (WebCore::PlatformTextTrack::captionMenuOffItem):
158         (WebCore::PlatformTextTrack::captionMenuAutomaticItem):
159         * rendering/style/RenderStyle.cpp:
160         (WebCore::RenderStyle::initialShapeInside):
161         * testing/MockCDM.cpp:
162         (WebCore::initDataPrefix):
163         (WebCore::keyPrefix):
164         (WebCore::keyRequest):
165
166 2013-08-13  Anders Carlsson  <andersca@apple.com>
167
168         Stop using DEFINE_STATIC_LOCAL with RetainPtr
169         https://bugs.webkit.org/show_bug.cgi?id=119765
170
171         Reviewed by Jessie Berlin.
172
173         No need to waste heap memory allocating RetainPtrs, just store the raw pointers directly.
174
175         * platform/graphics/mac/ColorMac.mm:
176         (WebCore::nsColor):
177         * platform/graphics/mac/GraphicsContextMac.mm:
178         (WebCore::makePatternColor):
179         (WebCore::GraphicsContext::drawLineForDocumentMarker):
180         * platform/graphics/mac/SimpleFontDataMac.mm:
181         (WebCore::webFallbackFontFamily):
182
183 2013-08-13  Commit Queue  <commit-queue@webkit.org>
184
185         Unreviewed, rolling out r153925.
186         http://trac.webkit.org/changeset/153925
187         https://bugs.webkit.org/show_bug.cgi?id=119768
188
189         broke fast/media/media-query-list-07.html (Requested by kling
190         on #webkit).
191
192         * CMakeLists.txt:
193         * DerivedSources.cpp:
194         * DerivedSources.make:
195         * DerivedSources.pri:
196         * GNUmakefile.list.am:
197         * Target.pri:
198         * WebCore.vcxproj/WebCore.vcxproj:
199         * WebCore.vcxproj/WebCore.vcxproj.filters:
200         * WebCore.xcodeproj/project.pbxproj:
201         * bindings/scripts/CodeGeneratorJS.pm:
202         (GenerateCallbackHeader):
203         (GenerateCallbackImplementation):
204         (JSValueToNative):
205         * bindings/scripts/IDLAttributes.txt:
206         * bindings/scripts/test/JS/JSTestCallback.cpp:
207         (WebCore::JSTestCallback::JSTestCallback):
208         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
209         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
210         * css/MediaAllInOne.cpp:
211         * css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
212         (WebCore::MediaQueryListListener::queryChanged):
213         * css/MediaQueryListListener.h:
214         (WebCore::MediaQueryListListener::create):
215         (WebCore::MediaQueryListListener::operator==):
216         (WebCore::MediaQueryListListener::MediaQueryListListener):
217         * css/MediaQueryListListener.idl:
218         * css/MediaQueryMatcher.cpp:
219         (WebCore::MediaQueryMatcher::Listener::evaluate):
220         (WebCore::MediaQueryMatcher::styleResolverChanged):
221         * css/MediaQueryMatcher.h:
222
223 2013-08-13  Simon Fraser  <simon.fraser@apple.com>
224
225         Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
226         https://bugs.webkit.org/show_bug.cgi?id=119551
227
228         Reviewed by Dean Jackson.
229
230         Only re-parent the flattening layer if we had to update our
231         layer configuration (reparenting is necessary then to get
232         the correct sibling ordering), or if it was parented in some
233         other layer.
234         
235         This avoid unnecessary flushing of state to CA.
236
237         * rendering/RenderLayerBacking.cpp:
238         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
239
240 2013-08-13  Robert Hogan  <robert@webkit.org>
241
242         Section's collapsed borders painted in wrong place in rtl tables
243         https://bugs.webkit.org/show_bug.cgi?id=119691
244
245         Reviewed by Darin Adler.
246
247         Table row-groups can be RTL too, so look to the section rather than the
248         table when deciding the direction of a row. The section will inherit the
249         table's direction if it doesn't override it.
250
251         Test: fast/table/paint-collapsed-borders-rtl-section.html
252
253         * rendering/RenderTableCell.cpp:
254         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
255         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
256
257 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
258
259         NodeList.item() does not behave according to specification
260         https://bugs.webkit.org/show_bug.cgi?id=119722
261
262         Reviewed by Darin Adler.
263
264         Make NodeList.item() indexed getter behave according to specification:
265         http://dom.spec.whatwg.org/#nodelist
266
267         Namely, we no longer throw if the index is negative (meaning the
268         [IsIndex] extended attribute is dropped) and the argument is now
269         mandatory.
270
271         This behavior is consistent with both IE10 and Firefox and since
272         recently Blink.
273
274         Test: fast/dom/nodelist-item-parameter.html
275
276         * dom/NodeList.idl:
277
278 2013-08-13  Anders Carlsson  <andersca@apple.com>
279
280         Fix build.
281
282         * WebCore.exp.in:
283
284 2013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
285
286         REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
287         https://bugs.webkit.org/show_bug.cgi?id=115304
288
289         Reviewed by David Hyatt.
290
291         Accelerated layers can cause blocks at subpixel offsets to shift because
292         accumulated subpixel offsets are lost between each layers.
293
294         To solve this layer bounds are now calculated in LayoutUnits, and their
295         subpixel offset saved so it can be used to ensure correct pixel-snapping
296         during painting.
297
298         Test: fast/sub-pixel/sub-pixel-composited-layers.html
299
300         * WebCore.exp.in:
301         * inspector/InspectorLayerTreeAgent.cpp:
302         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
303         * platform/graphics/LayoutPoint.h:
304         (WebCore::LayoutPoint::fraction):
305         * rendering/RenderLayer.cpp:
306         (WebCore::RenderLayer::setupClipPath):
307         (WebCore::RenderLayer::setupFilters):
308         (WebCore::RenderLayer::paintLayerContents):
309         (WebCore::RenderLayer::calculateLayerBounds):
310         * rendering/RenderLayer.h:
311         * rendering/RenderLayerBacking.cpp:
312         (WebCore::RenderLayerBacking::updateCompositedBounds):
313         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
314         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
315         (WebCore::RenderLayerBacking::resetContentsRect):
316         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
317         (WebCore::RenderLayerBacking::contentsBox):
318         (WebCore::RenderLayerBacking::backgroundBox):
319         (WebCore::RenderLayerBacking::paintIntoLayer):
320         (WebCore::RenderLayerBacking::paintContents):
321         (WebCore::RenderLayerBacking::compositedBounds):
322         (WebCore::RenderLayerBacking::setCompositedBounds):
323         * rendering/RenderLayerBacking.h:
324         * rendering/RenderLayerCompositor.cpp:
325         (WebCore::RenderLayerCompositor::logLayerInfo):
326         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
327         * rendering/RenderLayerCompositor.h:
328         * rendering/RenderTreeAsText.cpp:
329         (WebCore::operator<<):
330         * rendering/RenderTreeAsText.h:
331
332 2013-08-13  peavo@outlook.com  <peavo@outlook.com>
333
334         [Curl] Possible infinite loop while downloading.
335         https://bugs.webkit.org/show_bug.cgi?id=119744
336
337         Reviewed by Darin Adler.
338
339         If adding/removing curl handles fails, the download thread
340         can end up in an endless loop trying to update the curl handle list.
341
342         * platform/network/curl/CurlDownload.cpp:
343         (WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
344
345 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
346
347         HTMLSelectElement.item() does not behave according to specification
348         https://bugs.webkit.org/show_bug.cgi?id=119738
349
350         Reviewed by Darin Adler.
351
352         Make HTMLSelectElement.item() behave according to specification:
353         http://www.w3.org/TR/html51/forms.html#dom-select-item
354         http://dom.spec.whatwg.org/#dom-htmlcollection-item
355
356         Namely, we no longer throw if the offset argument is negative. Also,
357         the argument is now mandatory.
358
359         IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is
360         called with a negative value (as per the specification).
361
362         The argument is mandatory in Firefox and Blink, but optional in IE10
363         (it returns null when called without argument). This looks like a bug
364         in IE because other item() getters' argument is usually mandatory in IE
365         (e.g. NodeList.item()).
366
367         Test: fast/dom/HTMLSelectElement/select-element-item-argument.html
368
369         * html/HTMLSelectElement.idl:
370
371 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
372
373         On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest
374         https://bugs.webkit.org/show_bug.cgi?id=119714
375
376         Reviewed by Alexey Proskuryakov.
377
378         On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest
379         object as per the latest specification:
380         http://xhr.spec.whatwg.org/#request-error
381
382         This specification change was made in Sept 2010:
383         http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h
384
385         It addresses the following comment:
386         http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html
387
388         IE10 and since recently Blink behave according to specification but WebKit was firing the
389         events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of
390         'network error' or 'abort error'. WebKit was however behaving according to specification
391         in case of 'timeout error', which was inconsistent.
392
393         Test: http/tests/xmlhttprequest/upload-request-error-event-order.html
394
395         * xml/XMLHttpRequest.cpp:
396         (WebCore::XMLHttpRequest::networkError):
397         (WebCore::XMLHttpRequest::abortError):
398
399 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
400
401         Simplify RadioNodeList's anonymous indexed getter
402         https://bugs.webkit.org/show_bug.cgi?id=119725
403
404         Reviewed by Darin Adler.
405
406         Simplify RadioNodeList's anonymous indexed getter by dropping [IsIndex]
407         IDL extended attribute from its parameter and making it mandatory.
408
409         This change has strictly no impact on the generated bindings code
410         but it simplifies the IDL.
411
412         No new test, no behavior change.
413
414         * html/RadioNodeList.idl:
415
416 2013-08-13  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
417
418         [GTK] close the volume slider when the media control panel is hidden
419         https://bugs.webkit.org/show_bug.cgi?id=119062
420
421         Reviewed by Gustavo Noronha Silva.
422
423         It's not obvious how to close the volume slider on webkitGtk.
424         The volume slider should close if the control panel is hidden.
425
426         * html/shadow/MediaControlsGtk.cpp:
427         (WebCore::MediaControlsGtk::makeTransparent):
428         * html/shadow/MediaControlsGtk.h:
429
430 2013-08-13  Commit Queue  <commit-queue@webkit.org>
431
432         Unreviewed, rolling out r152563.
433         http://trac.webkit.org/changeset/152563
434         https://bugs.webkit.org/show_bug.cgi?id=119740
435
436         causes random crashes (Requested by carewolf on #webkit).
437
438         * platform/graphics/qt/FontCacheQt.cpp:
439         (WebCore::FontCache::getLastResortFallbackFont):
440
441 2013-08-13  Andrei Bucur  <abucur@adobe.com>
442
443         Unreviewed.
444
445         Fix the build after http://trac.webkit.org/changeset/153990.
446
447         * rendering/RenderBlock.cpp:
448         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
449
450 2013-08-13  Andrei Bucur  <abucur@adobe.com>
451
452         [CSS Regions] Compute correct region ranges for boxes
453         https://bugs.webkit.org/show_bug.cgi?id=116296
454
455         Reviewed by David Hyatt.
456
457         The patch extends the region ranges implementation with the following behavior:
458         - the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
459         is propagated to the regions and it should later change on a case by case basis.
460         - if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
461         position boxes that overflow naturally, like floats.
462         - all the boxes have a range now, not only the blocks.
463         - regionAtBlockOffset can clamp to a box.
464         - an unsplittable box has a region range of a single region, the one where the box top falls into.
465
466         When the layout of a child box starts it tries to give an estimate based on the maximal height of the box. After the layout,
467         if the estimation was wrong, the box is relaid out. For example, if a block with a float is laid out in a region but the float
468         overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
469         region (this step can be optimized by making a layout pass only for the children that don't have the region range enclosed in the
470         containing block range).
471
472         Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
473                fast/regions/float-pushed-width-change-2.html
474                fast/regions/scrollable-paragraph-unsplittable.html
475
476         * rendering/RenderBlock.cpp:
477         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
478         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
479         (WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
480         not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
481         (WebCore::RenderBlock::layoutBlock):
482         (WebCore::RenderBlock::layoutBlockChild):
483         (WebCore::RenderBlock::layoutPositionedObjects):
484         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
485         (WebCore::RenderBlock::positionNewFloats):
486         (WebCore::RenderBlock::hasNextPage):
487         (WebCore::RenderBlock::applyBeforeBreak):
488         (WebCore::RenderBlock::applyAfterBreak):
489         (WebCore::RenderBlock::setPageBreak):
490         (WebCore::RenderBlock::updateMinimumPageHeight):
491         (WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
492         (WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
493         (WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
494         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
495         * rendering/RenderBlock.h:
496         (WebCore::RenderBlock::logicalWidthForChild):
497         (WebCore::RenderBlock::logicalHeightForChild):
498         (WebCore::RenderBlock::logicalTopForChild):
499         * rendering/RenderBlockLineLayout.cpp:
500         (WebCore::RenderBlock::layoutInlineChildren):
501         * rendering/RenderBox.cpp:
502         (WebCore::RenderBox::clampToStartAndEndRegions):
503         (WebCore::RenderBox::borderBoxRectInRegion):
504         * rendering/RenderBox.h:
505         * rendering/RenderDeprecatedFlexibleBox.cpp:
506         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
507         * rendering/RenderFlexibleBox.cpp:
508         (WebCore::RenderFlexibleBox::layoutBlock):
509         * rendering/RenderFlowThread.cpp:
510         (WebCore::RenderFlowThread::validateRegions):
511         (WebCore::RenderFlowThread::regionAtBlockOffset):
512         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
513         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
514         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
515         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
516         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
517         (WebCore::RenderFlowThread::mapFromFlowToRegion):
518         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
519         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
520         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
521         (WebCore::RenderFlowThread::setRegionRangeForBox):
522         (WebCore::RenderFlowThread::applyBreakAfterContent):
523         (WebCore::RenderFlowThread::addForcedRegionBreak):
524         * rendering/RenderFlowThread.h:
525         * rendering/RenderGrid.cpp:
526         (WebCore::RenderGrid::layoutBlock):
527         * rendering/RenderMultiColumnFlowThread.cpp:
528         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
529         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
530         * rendering/RenderMultiColumnFlowThread.h:
531
532 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
533
534         One more speculative Windows build fix after r153978.
535
536         * page/win/DragControllerWin.cpp:
537
538 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
539
540         Update scheme list according to latest specification
541         https://bugs.webkit.org/show_bug.cgi?id=119510
542
543         Reviewed by Christophe Dumez.
544
545         New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
546         As additional work, scheme order is listed to be sync with spec.
547
548         Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
549
550         Test: fast/dom/register-protocol-handler.html
551               fast/dom/unregister-protocol-handler.html
552
553         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
554         (WebCore::initProtocolHandlerWhitelist):
555
556 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
557
558         Yet another Windows build fix attempt after r153978.
559
560         * page/win/DragControllerWin.cpp:
561         (WebCore::DragController::declareAndWriteDragImage):
562
563 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
564
565         Another Windows build fix attempt after r153978.
566
567         * page/win/DragControllerWin.cpp:
568
569 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
570
571         Windows build fix attempt after r153978.
572
573         * page/win/DragControllerWin.cpp:
574
575 2013-08-12  Zan Dobersek  <zdobersek@igalia.com>
576
577         ASSERTION FAILED: type() == Percent in WebCore::Length::percent
578         https://bugs.webkit.org/show_bug.cgi?id=116715
579
580         Reviewed by Darin Adler.
581
582         Allow the Calculated type in the Length::percent method that returns the Length's
583         float value. This reflects the changes in r110148 that adjusted the Length::isPercent
584         method to return true for Length objects of either Percent or Calculated type.
585
586         Test: fast/css/calculated-length-as-percent-crash.html
587
588         * platform/Length.h:
589         (WebCore::Length::percent): Assert that Length::isPercent is true when Length::percent
590         is called, ensuring the Length's type is either Percent or Calculated.
591
592 2013-06-16  Darin Adler  <darin@apple.com>
593
594         Move Clipboard::declareAndWriteDragImage to DragController
595         https://bugs.webkit.org/show_bug.cgi?id=117683
596
597         Reviewed by Brent Fulgham.
598
599         * dom/Clipboard.h: Removed declareAndWriteDragImage.
600
601         * page/DragController.cpp:
602         (WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
603         is now refactored into this function.
604         (WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
605         instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
606         because declareAndWriteDragImage needs to be a member function, for Mac at least.
607
608         * page/DragController.h: Added declareAndWriteDragImage.
609
610         * page/efl/DragControllerEfl.cpp:
611         (WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
612         It would be better to delete this file rather than having these placeholders.
613         I don't think EFL actually has drag support, and it makes work to have to keep
614         source files up to date that are really unused.
615
616         * page/gtk/DragControllerGtk.cpp:
617         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
618         * page/mac/DragControllerMac.mm:
619         (WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
620         does the work.
621         * page/qt/DragControllerQt.cpp:
622         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
623         * page/win/DragControllerWin.cpp:
624         (WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
625         do the work.
626
627         * platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
628         For now, it's not clear what const will mean for pasteboards, and it's currently not
629         possible to write to a const pasteboard, which we need to do in the new
630         DragController::declareAndWriteDragImage functions.
631
632         * platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
633         at this time.
634
635         * platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
636         * platform/gtk/ClipboardGtk.cpp: Ditto.
637         * platform/ios/ClipboardIOS.h: Ditto.
638         * platform/ios/ClipboardIOS.mm: Ditto.
639         * platform/mac/ClipboardMac.mm: Ditto.
640         * platform/qt/ClipboardQt.cpp: Ditto.
641         * platform/win/ClipboardWin.cpp: Ditto.
642
643         * platform/win/PasteboardWin.cpp:
644         (WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
645         (WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
646         This factors out a significant piece of DragController::declareAndWriteDragImage,
647         and will probably be handy for other platforms later.
648
649 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
650
651         Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
652         https://bugs.webkit.org/show_bug.cgi?id=119716
653
654         Reviewed by Darin Adler.
655
656         Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
657
658         No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
659
660         * html/HTMLAnchorElement.cpp:
661         (WebCore::HTMLAnchorElement::sendPings):
662
663 2013-08-12  Seokju Kwon  <seokju@webkit.org>
664
665         Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
666         https://bugs.webkit.org/show_bug.cgi?id=119710
667
668         Reviewed by Darin Adler.
669
670         No behavior change, no new tests needed.
671
672         * rendering/RenderObject.cpp: Remove unused parameter warning.
673         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
674
675 2013-08-12  Alexey Proskuryakov  <ap@apple.com>
676
677         http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
678         https://bugs.webkit.org/show_bug.cgi?id=85522
679
680         Reviewed by Andy Estes.
681
682         Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
683         on this bug. No behavior change expected.
684
685         * loader/FrameLoader.cpp:
686         (WebCore::FrameLoader::submitForm):
687         (WebCore::FrameLoader::findFrameForNavigation):
688         * loader/NavigationScheduler.cpp:
689         (WebCore::ScheduledFormSubmission::fire):
690
691 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
692
693         Fix variable name |end| -> |size| in EventTarget::fireEventListeners
694         https://bugs.webkit.org/show_bug.cgi?id=119715
695
696         Reviewed by Benjamin Poulain.
697
698         Merge https://chromium.googlesource.com/chromium/blink/+/f58b017539c48059bb2b88d18ee0ee3d14decb01
699         and also fix variable names in FiringEventIterator.
700
701         * dom/EventTarget.cpp:
702         (WebCore::EventTarget::removeEventListener):
703         (WebCore::EventTarget::fireEventListeners):
704         (WebCore::EventTarget::removeAllEventListeners):
705         * dom/EventTarget.h:
706         (WebCore::FiringEventIterator::FiringEventIterator):
707
708 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
709
710         Encapsulate access to documentNamedItemMap and windowNamedItemMap
711         https://bugs.webkit.org/show_bug.cgi?id=119701
712
713         Reviewed by Darin Adler.
714
715         Encapsulate m_documentNamedItem and m_windowNamedItem by adding various methods on HTMLDocument.
716         This will help us doing more refactorings in the future.
717
718         * bindings/js/JSDOMWindowCustom.cpp:
719         (WebCore::namedItemGetter):
720         (WebCore::JSDOMWindow::getOwnPropertySlot):
721         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
722         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
723         * bindings/js/JSHTMLDocumentCustom.cpp:
724         (WebCore::JSHTMLDocument::canGetItemsForName):
725         (WebCore::JSHTMLDocument::nameGetter):
726         * dom/Element.cpp:
727         (WebCore::Element::updateNameForDocument):
728         (WebCore::Element::updateIdForDocument):
729         * html/HTMLDocument.cpp:
730         (WebCore::HTMLDocument::addDocumentNamedItem): Added.
731         (WebCore::HTMLDocument::removeDocumentNamedItem): Added.
732         (WebCore::HTMLDocument::addWindowNamedItem): Added.
733         (WebCore::HTMLDocument::removeWindowNamedItem): Added.
734         * html/HTMLDocument.h:
735         (WebCore::HTMLDocument::documentNamedItem): Added.
736         (WebCore::HTMLDocument::hasDocumentNamedItem): Added.
737         (WebCore::HTMLDocument::documentNamedItemContainsMultipleElements): Added.
738         (WebCore::HTMLDocument::windowNamedItem): Added.
739         (WebCore::HTMLDocument::hasWindowNamedItem): Added.
740         (WebCore::HTMLDocument::windowNamedItemContainsMultipleElements): Added.
741         * html/HTMLImageElement.cpp:
742         (WebCore::HTMLImageElement::parseAttribute):
743         * html/HTMLObjectElement.cpp:
744         (WebCore::HTMLObjectElement::updateDocNamedItem):
745
746 2013-08-12  Patrick Gansterer  <paroga@webkit.org>
747
748         [CMake] Use the correct list of files when compiling ANGLESupport on Windows
749         https://bugs.webkit.org/show_bug.cgi?id=119439
750
751         Reviewed by Gyuyoung Kim.
752
753         * CMakeLists.txt: Use ossource_win.cpp instead of ossource_posix.cpp on Windows platforms.
754
755 2013-08-12  Arnaud Renevier  <a.renevier@samsung.com>
756
757         [cairo] memory corruption with putImageData and accelerated canvas.
758         https://bugs.webkit.org/show_bug.cgi?id=118621
759
760         Reviewed by Martin Robinson.
761
762         When we have an accelerated imageBuffer, and we putByteArray with a
763         non zero destPoint, we create temporary surface of sourceSize. Then,
764         we write to image data with an offset. This results in an out of bound
765         write.
766
767         In order to avoid that, we use a 0 offset when writing data.
768
769         In addition, we also create image with the minimal needed size in
770         getImageData, and also use a 0 offset. This decrease data transfer
771         between cpu and gpu
772
773         Instead of the map/unmap mechanism, perform an explicit surface copy
774         when needed. This change also removes an unneeded glReadPixels at the
775         start of putByteArray
776
777         Add two parameters to copyRectFromOneSurfaceToAnother: destination
778         offset, and cairo drawing operator.
779
780         No new tests. Accelerated canvas is not enabled for testing yet.
781
782         * platform/graphics/cairo/CairoUtilities.cpp:
783         (WebCore::copyRectFromOneSurfaceToAnother):
784         * platform/graphics/cairo/CairoUtilities.h:
785         * platform/graphics/cairo/ImageBufferCairo.cpp:
786         (WebCore::copySurfaceToImageAndAdjustRect):
787         (WebCore::getImageData):
788         (WebCore::ImageBuffer::putByteArray):
789
790 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
791
792         Use const AtomicStringImpl* in DocumentOrderedMap
793         https://bugs.webkit.org/show_bug.cgi?id=119700
794
795         Reviewed by Benjamin Poulain.
796
797         Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
798         subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
799         DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
800         to create temporary AtomicStrings.
801
802         * dom/DocumentOrderedMap.cpp:
803         (WebCore::keyMatchesId):
804         (WebCore::keyMatchesName):
805         (WebCore::keyMatchesMapName):
806         (WebCore::keyMatchesLowercasedMapName):
807         (WebCore::keyMatchesLabelForAttribute):
808         (WebCore::keyMatchesWindowNamedItem):
809         (WebCore::keyMatchesDocumentNamedItem):
810         (WebCore::DocumentOrderedMap::add):
811         (WebCore::DocumentOrderedMap::remove):
812         (WebCore::DocumentOrderedMap::get):
813         (WebCore::DocumentOrderedMap::getElementById):
814         (WebCore::DocumentOrderedMap::getElementByName):
815         (WebCore::DocumentOrderedMap::getElementByMapName):
816         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
817         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
818         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
819         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
820         (WebCore::DocumentOrderedMap::getAllElementsById):
821         * dom/DocumentOrderedMap.h:
822         (WebCore::DocumentOrderedMap::containsSingle):
823         (WebCore::DocumentOrderedMap::contains):
824         (WebCore::DocumentOrderedMap::containsMultiple):
825         * html/HTMLNameCollection.cpp:
826         (WebCore::WindowNameCollection::nodeMatches):
827         (WebCore::DocumentNameCollection::nodeMatches):
828         * html/HTMLNameCollection.h:
829         (WebCore::WindowNameCollection::nodeMatches):
830         (WebCore::DocumentNameCollection::nodeMatches):
831
832 2013-08-12  Beth Dakin  <bdakin@apple.com>
833
834         The LayoutMilestones didLayout callback should only fire for the main frame
835         https://bugs.webkit.org/show_bug.cgi?id=119457
836
837         Reviewed by Sam Weinig.
838
839         This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever 
840         called for the main frame. Technically this will change existing API for 
841         didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to 
842         be able to register for those callbacks for any frame they wanted, however, now 
843         they will only ever get the callback when it applies to the main frame. We think 
844         that this is acceptable since we don’t know of any clients that ever used those 
845         APIs for a non-main frame. This change also makes nothing but sense for the 
846         didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it 
847         should only fire for the main frame.
848
849         Only call didLayout for the main frame.
850         * dom/Document.cpp:
851         (WebCore::Document::setVisualUpdatesAllowed):
852
853         Assert that this is the main frame.
854         * loader/FrameLoader.cpp:
855         (WebCore::FrameLoader::didLayout):
856
857         Only call didLayout for the main frame.
858         * page/FrameView.cpp:
859         (WebCore::FrameView::performPostLayoutTasks):
860
861 2013-08-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
862
863         Define DOM_KEY_LOCATION_* constants on KeyboardEvent
864         https://bugs.webkit.org/show_bug.cgi?id=119341
865
866         Reviewed by Ryosuke Niwa.
867
868         Add support for the DOM_KEY_LOCATION_* constants on KeyboardEvent as per
869         the specification:
870         http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
871
872         Those constants are already supported by IE10, Firefox 22 and since
873         recently Blink.
874
875         Note that the following constants are not supported / exposed yet:
876         DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK.
877
878         Test: fast/events/keyboardevent-location-constants.html
879
880         * dom/KeyboardEvent.cpp:
881         (WebCore::keyLocationCode):
882         (WebCore::KeyboardEvent::KeyboardEvent):
883         * dom/KeyboardEvent.h:
884         * dom/KeyboardEvent.idl:
885
886 2013-08-12  Tim Horton  <timothy_horton@apple.com>
887
888         dataLog dumpers for WebCore's basic geometry types
889         https://bugs.webkit.org/show_bug.cgi?id=119636
890
891         Reviewed by Filip Pizlo.
892
893         * platform/graphics/FloatPoint.cpp:
894         (WebCore::FloatPoint::dump):
895         * platform/graphics/FloatPoint.h:
896         * platform/graphics/FloatRect.cpp:
897         (WebCore::FloatRect::dump):
898         * platform/graphics/FloatRect.h:
899         * platform/graphics/FloatSize.cpp:
900         (WebCore::FloatSize::dump):
901         * platform/graphics/FloatSize.h:
902         * platform/graphics/IntPoint.h:
903         (WebCore::IntPoint::dump):
904         * platform/graphics/IntRect.cpp:
905         (WebCore::IntRect::dump):
906         * platform/graphics/IntRect.h:
907         * platform/graphics/IntSize.h:
908         (WebCore::IntSize::dump):
909
910 2013-08-12  Dean Jackson  <dino@apple.com>
911
912         Shadows don't support viewport units
913         https://bugs.webkit.org/show_bug.cgi?id=119649
914
915         Reviewed by Darin Adler.
916
917         We don't yet support viewport units in shadows, so
918         fail parsing if we see one. The bug to fix this
919         completely is: https://webkit.org/b/119650
920
921         Test: fast/css/shadow-viewport-units.html
922
923         * css/CSSParser.cpp:
924         (WebCore::CSSParser::parseShadow): Fail if we get one of
925         vh, vw, vmin, vmax.
926
927 2013-08-12  peavo@outlook.com  <peavo@outlook.com>
928
929         [Curl] Cookie is not set when url string is unicode.
930         https://bugs.webkit.org/show_bug.cgi?id=119545
931
932         Reviewed by Brent Fulgham.
933
934         When the method setCookiesFromDOM is called with an unicode url parameter, the cookie is not correctly set.
935         We need to convert the cookie string to 8 bit, before passing it to the Curl api function.
936
937         * platform/network/curl/CookieJarCurl.cpp:
938         (WebCore::setCookiesFromDOM): Convert cookie string to 8 bit, if needed.
939
940 2013-08-12  Eric Carlson  <eric.carlson@apple.com>
941
942         Revert r153912 because it broke some track tests.
943
944         Rubber-stamped by Antti Koivisto.
945
946         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
947         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
948         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):
949
950 2013-08-12  Antti Koivisto  <antti@apple.com>
951
952         Add ElementTraversal::next/previousSibling
953         https://bugs.webkit.org/show_bug.cgi?id=119681
954
955         Reviewed by Andreas Kling.
956
957         Add nextSibling/previousSibling/lastWithin to ElementTraversal namespace.
958         
959         - Use them to replace internal use of Element::next/previousElementSibling DOM API for traversal.
960         - Replace some Node::nextSibling() usage with ElementTraversal::nextSibling() for tighter code.
961         - Replace ElementTraversal::nextSkippingChildren where it is used to traverse over immediate children only.
962
963         * css/SelectorChecker.cpp:
964         (WebCore::isFirstChildElement):
965         (WebCore::isLastChildElement):
966         (WebCore::isFirstOfType):
967         (WebCore::isLastOfType):
968         (WebCore::countElementsBefore):
969         (WebCore::countElementsOfTypeBefore):
970         (WebCore::countElementsAfter):
971         (WebCore::countElementsOfTypeAfter):
972         * dom/Element.cpp:
973         (WebCore::Element::lastElementChild):
974         (WebCore::Element::previousElementSibling):
975         (WebCore::Element::nextElementSibling):
976         * dom/Element.h:
977         * dom/ElementTraversal.h:
978         (WebCore::ElementTraversal::lastElementWithinTemplate):
979         (WebCore::ElementTraversal::lastWithin):
980         (WebCore::ElementTraversal::traverseNextSiblingElementTemplate):
981         (WebCore::ElementTraversal::nextSibling):
982         (WebCore::ElementTraversal::traversePreviousSiblingElementTemplate):
983         (WebCore::ElementTraversal::previousSibling):
984         * editing/ApplyStyleCommand.cpp:
985         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
986         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
987         * editing/CompositeEditCommand.cpp:
988         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
989         * editing/IndentOutdentCommand.cpp:
990         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
991         * editing/InsertListCommand.cpp:
992         (WebCore::InsertListCommand::mergeWithNeighboringLists):
993         * editing/markup.cpp:
994         (WebCore::createContextualFragment):
995         * html/HTMLCollection.cpp:
996         (WebCore::firstMatchingChildElement):
997         (WebCore::nextMatchingSiblingElement):
998         (WebCore::HTMLCollection::traverseNextElement):
999         (WebCore::HTMLCollection::traverseForwardToOffset):
1000         * html/HTMLFieldSetElement.cpp:
1001         (WebCore::HTMLFieldSetElement::childrenChanged):
1002         (WebCore::HTMLFieldSetElement::legend):
1003         * html/HTMLMediaElement.cpp:
1004         (WebCore::HTMLMediaElement::finishParsingChildren):
1005         * html/HTMLObjectElement.cpp:
1006         (WebCore::HTMLObjectElement::containsJavaApplet):
1007         * rendering/FilterEffectRenderer.cpp:
1008         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1009         * style/StyleResolveTree.cpp:
1010         (WebCore::Style::resolveTree):
1011         * svg/SVGStyledElement.cpp:
1012         (WebCore::SVGStyledElement::title):
1013
1014 2013-08-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1015
1016         [Qt] Add Support for canvas blend modes
1017         https://bugs.webkit.org/show_bug.cgi?id=100072
1018
1019         Reviewed by Jocelyn Turcotte.
1020
1021         Implement basic support for the blend-modes supported by QPainter.
1022
1023         Covered by existing tests.
1024
1025         * platform/graphics/qt/GraphicsContextQt.cpp:
1026         (WebCore::toQtCompositionMode):
1027         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1028         * platform/graphics/qt/ImageBufferQt.cpp:
1029         (WebCore::ImageBuffer::draw):
1030         * platform/graphics/qt/ImageQt.cpp:
1031         (WebCore::BitmapImage::draw):
1032         * platform/graphics/qt/StillImageQt.cpp:
1033         (WebCore::StillImage::draw):
1034
1035 2013-08-12  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1036
1037         Buildfix for !ENABLE(SVG). Fix warning by adding guard after r153901:
1038         void WebCore::addString(WebCore::FeatureSet&, const char*)'
1039         defined but not used [-Werror=unused-function]
1040
1041         Reviewed by Csaba Osztrogonác.
1042
1043         * dom/DOMImplementation.cpp:
1044
1045 2013-08-12  Antti Koivisto  <antti@apple.com>
1046
1047         Move ElementTraversal to ElementTraversal.h
1048         https://bugs.webkit.org/show_bug.cgi?id=119678
1049
1050         Rubber-stamped by Andreas Kling.
1051
1052         Move ElementTraversal namespace from NodeTraversal.h to a correctly named file.
1053
1054         * GNUmakefile.list.am:
1055         * Target.pri:
1056         * WebCore.vcxproj/WebCore.vcxproj:
1057         * WebCore.xcodeproj/project.pbxproj:
1058         * accessibility/AccessibilityRenderObject.cpp:
1059         * css/StyleInvalidationAnalysis.cpp:
1060         * dom/Document.cpp:
1061         * dom/DocumentOrderedMap.cpp:
1062         * dom/Element.cpp:
1063         * dom/ElementTraversal.h: Added.
1064         (WebCore::ElementTraversal::firstElementWithinTemplate):
1065         (WebCore::ElementTraversal::firstWithin):
1066         (WebCore::ElementTraversal::traverseNextElementTemplate):
1067         (WebCore::ElementTraversal::next):
1068         (WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
1069         (WebCore::ElementTraversal::nextSkippingChildren):
1070         (WebCore::ElementTraversal::previousIncludingPseudo):
1071         (WebCore::ElementTraversal::nextIncludingPseudo):
1072         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
1073         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
1074         * dom/Node.cpp:
1075         * dom/NodeTraversal.h:
1076         * dom/SelectorQuery.cpp:
1077         * dom/TreeScope.cpp:
1078         * dom/VisitedLinkState.cpp:
1079         * editing/FrameSelection.cpp:
1080         * editing/markup.cpp:
1081         * html/HTMLCollection.cpp:
1082         * html/HTMLFieldSetElement.cpp:
1083         * html/HTMLFormElement.cpp:
1084         * html/HTMLLabelElement.cpp:
1085         * html/HTMLLegendElement.cpp:
1086         * html/HTMLMapElement.cpp:
1087         * html/HTMLObjectElement.cpp:
1088         * html/HTMLSelectElement.cpp:
1089         * html/shadow/ContentDistributor.cpp:
1090         * page/FocusController.cpp:
1091         * rendering/RenderCounter.cpp:
1092         * rendering/RenderListItem.cpp:
1093         * svg/SVGSVGElement.cpp:
1094         * svg/SVGStyledElement.cpp:
1095         * svg/SVGUseElement.cpp:
1096         * svg/animation/SMILTimeContainer.cpp:
1097         * svg/graphics/SVGImage.cpp:
1098
1099 2013-08-12  Antti Koivisto  <antti@apple.com>
1100
1101         Move some Document recalcStyle code to StyleResolveTree
1102         https://bugs.webkit.org/show_bug.cgi?id=119676
1103
1104         Reviewed by Andreas Kling.
1105
1106         Move the code that resolves the document and child styles to Style::resolveTree(Document*).
1107
1108         * dom/Document.cpp:
1109         (WebCore::Document::recalcStyle):
1110         * style/StyleResolveTree.cpp:
1111         (WebCore::Style::resolveTree):
1112         * style/StyleResolveTree.h:
1113
1114 2013-08-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1115
1116         Resource leak related to gstreamer and videos
1117         https://bugs.webkit.org/show_bug.cgi?id=109350
1118
1119         Reviewed by Eric Carlson.
1120
1121         Since active DOM object are only stopped once and can not be restarted, we can
1122         unreference the media player there, instead of waiting for garbage collection.
1123
1124         If the r152778 is rolled back, this also breaks a circular reference between
1125         GStreamer and WebKit which prevented garbage collecting from triggering.
1126
1127         * html/HTMLMediaElement.cpp:
1128         (WebCore::HTMLMediaElement::stop):
1129
1130 2013-08-12  Gabor Rapcsanyi  <rgabor@webkit.org>
1131
1132         [Qt] Unreviewed buildfix for webaudio.
1133
1134         * Target.pri: Add missing files
1135
1136 2013-08-12  Andreas Kling  <akling@apple.com>
1137
1138         Some build juice for the Windows bots after r153926 + r153927.
1139
1140         * html/shadow/MediaControlElements.cpp:
1141         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1142         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
1143         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
1144
1145 2013-08-11  Sam Weinig  <sam@webkit.org>
1146
1147         Move RenderMathMLSpace.h/cpp to the right group in the Xcode project.
1148
1149         Reviewed by Dean Jackson.
1150
1151         * WebCore.xcodeproj/project.pbxproj:
1152
1153 2013-08-11  Andreas Kling  <akling@apple.com>
1154
1155         Make Page::settings() return a reference.
1156         <http://webkit.org/b/119662>
1157
1158         Reviewed by Anders Carlsson.
1159
1160         ...and remove some pointless null checks that were exposed by doing this.
1161
1162 2013-08-11  Andreas Kling  <akling@apple.com>
1163
1164         Make some things that return never-null pointers return references instead.
1165         <http://webkit.org/b/119660>
1166
1167         Reviewed by Antti Koivisto.
1168
1169         These functions never return null anyway, so remove any ambiguity by letting
1170         them return references instead of pointers.
1171
1172         - Node::ensureRareData()
1173         - Element::ensureUniqueElementData()
1174         - Element::ensureShadow()
1175         - Element::ensureUserAgentShadowRoot()
1176         - StyledElement::ensureMutableInlineStyle()
1177         - NodeRareData::ensureNodeLists()
1178         - NodeRareData::ensureMutationObserverData()
1179         - EventTarget::ensureEventTargetData()
1180         - Document::ensureStyleResolver()
1181         - Document::selectorQueryCache()
1182         - Document::mediaQueryMatcher()
1183         - FlowThreadController::ensureRenderFlowThreadWithName()
1184         - HTMLTrackElement::ensureTrack()
1185         - SVGElement::ensureSVGRareData()
1186         - AnimationControllerPrivate::ensureCompositeAnimation()
1187
1188 2013-08-11  Sam Weinig  <sam@webkit.org>
1189
1190         Cleanup MediaQueryListListener
1191         https://bugs.webkit.org/show_bug.cgi?id=119664
1192
1193         Reviewed by Andreas Kling.
1194
1195         Make MediaQueryListListener a proper WebIDL callback.
1196
1197         * CMakeLists.txt:
1198         * DerivedSources.cpp:
1199         * DerivedSources.make:
1200         * DerivedSources.pri:
1201         * GNUmakefile.list.am:
1202         * Target.pri:
1203         * WebCore.vcxproj/WebCore.vcxproj:
1204         * WebCore.vcxproj/WebCore.vcxproj.filters:
1205         * WebCore.xcodeproj/project.pbxproj:
1206         Update project files.
1207
1208         * bindings/scripts/CodeGeneratorJS.pm:
1209         (GenerateCallbackHeader):
1210         (GenerateCallbackImplementation):
1211         (JSValueToNative):
1212         * bindings/scripts/IDLAttributes.txt:
1213         Add support for CallbackNeedsOperatorEqual, which adds an operator==.
1214
1215         * css/MediaAllInOne.cpp:
1216         Remove MediaQueryListListener.cpp.
1217
1218         * css/MediaQueryListListener.cpp:
1219         Removed.
1220
1221         * css/MediaQueryListListener.h:
1222         (WebCore::MediaQueryListListener::~MediaQueryListListener):
1223         (WebCore::MediaQueryListListener::MediaQueryListListener):
1224         * css/MediaQueryListListener.idl:
1225         Convert to a proper WebIDL callback.
1226
1227         * css/MediaQueryMatcher.cpp:
1228         (WebCore::MediaQueryMatcher::Listener::evaluate):
1229         (WebCore::MediaQueryMatcher::styleResolverChanged):
1230         * css/MediaQueryMatcher.h:
1231         Remove all traces of the ScriptState.
1232
1233 2013-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1234
1235         Unreviewed. Fix make distcheck.
1236
1237         * GNUmakefile.list.am: Remove unexistent header file.
1238
1239 2013-08-09  Gustavo Noronha Silva  <gns@gnome.org>
1240
1241         [GObject] Wrap KeyboardEvent
1242         https://bugs.webkit.org/show_bug.cgi?id=119651
1243
1244         Reviewed by Christophe Dumez.
1245
1246         This exposes KeyboardEvent to our GObject API. It is required for handling
1247         keyboard events, such as keydown, keypress, and so on.
1248
1249         * bindings/gobject/GNUmakefile.am:
1250         * bindings/gobject/WebKitDOMPrivate.cpp:
1251         (WebKit::wrap): make sure we create a WebKitDOMKeyboardEvent for a DOM event that
1252         is a KeyboardEvent.
1253         * bindings/scripts/CodeGeneratorGObject.pm:
1254         (GetBaseClass): make WebKitDOMEvent be WebKitDOMKeyboardEvent's parent, like we do
1255         for WebKitDOMMouseEvent.
1256         * dom/KeyboardEvent.idl: generate a single initialization method.
1257
1258 2013-08-09  Jer Noble  <jer.noble@apple.com>
1259
1260         Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
1261         https://bugs.webkit.org/show_bug.cgi?id=119645
1262
1263         Reviewed by Eric Carlson.
1264
1265         Work around crash caused by <rdar://problem/14688471> by releasing
1266         m_request as soon as keys have been added to it.
1267
1268         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
1269         (WebCore::CDMSessionAVFoundation::update):
1270
1271 2013-08-09  Anders Carlsson  <andersca@apple.com>
1272
1273         Artifacts seen sometimes with layer backed WebKit1 plug-in
1274         https://bugs.webkit.org/show_bug.cgi?id=119647
1275         <rdar://problem/14002715>
1276
1277         Reviewed by Beth Dakin.
1278
1279         Don't try to paint layer backed views - they will be painted by Core Animation.
1280
1281         * platform/mac/WidgetMac.mm:
1282         (WebCore::Widget::paint):
1283
1284 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
1285
1286         ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff
1287         https://bugs.webkit.org/show_bug.cgi?id=119623
1288
1289         Reviewed by Dirk Schulze.
1290
1291         Include all the stroke attributes in the style diff comparison, the visited links ones were missing.
1292
1293         Test: svg/animations/animate-stroke-crasher.html
1294
1295         * rendering/style/SVGRenderStyle.cpp:
1296         (WebCore::SVGRenderStyle::diff):
1297
1298 2013-08-09  Alexey Proskuryakov  <ap@apple.com>
1299
1300         REGRESSION (r142755): window.open creates an invisible window when width and height are 0
1301         https://bugs.webkit.org/show_bug.cgi?id=119633
1302
1303         Reviewed by Darin Adler.
1304
1305         Test: fast/dom/Window/open-zero-size-as-default.html
1306
1307         Relying on each WebKit to refuse setting size to zero was fragile - because this
1308         required each one to have the check, and because by the time the client was called,
1309         the initially zero size was not necessarily zero.
1310
1311         * loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
1312         size the window was created with, because that's the default one by definition.
1313
1314         * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
1315         check for zero size now, it's been mangled to adjust for the difference between
1316         window and viewport size.
1317
1318 2013-08-09  Eric Carlson  <eric.carlson@apple.com>
1319
1320         [Mac] some track language tags are not recognized
1321         https://bugs.webkit.org/show_bug.cgi?id=119643
1322
1323         Reviewed by Dean Jackson.
1324
1325         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1326         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
1327             a track may have changed so we may have a new language.
1328         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
1329             if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
1330             QuickTime language code.
1331
1332 2013-08-09  Dean Jackson  <dino@apple.com>
1333
1334         Captions menu needs to reset text-align
1335         https://bugs.webkit.org/show_bug.cgi?id=119637
1336
1337         Reviewed by Eric Carlson.
1338
1339         Reset the text-align property on the menu so that it
1340         doesn't get the inherited value. The full fix for all
1341         controls is http://webkit.org/b/116100.
1342
1343         * css/mediaControlsQuickTime.css:
1344         (video::-webkit-media-controls-closed-captions-container):
1345
1346 2013-08-09  Beth Dakin  <bdakin@apple.com>
1347
1348         AX: Not able to use arrow keys to read text in a WK2 app
1349         https://bugs.webkit.org/show_bug.cgi?id=119605
1350         -and corresponding-
1351         <rdar://problem/14281275>
1352
1353         Reviewed by Darin Adler.
1354
1355         This code from defaultKeyboardEventHandler() is the magic that makes this AX 
1356         functionality work. This patch moves that into a separate function so that we can 
1357         call it from WK2.
1358         * WebCore.exp.in:
1359         * page/EventHandler.cpp:
1360         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
1361         (WebCore::EventHandler::defaultKeyboardEventHandler):
1362         * page/EventHandler.h:
1363
1364 2013-08-09  Antti Koivisto  <antti@apple.com>
1365
1366         Move static StyleResolver functions to Style namespace
1367         https://bugs.webkit.org/show_bug.cgi?id=119629
1368
1369         Reviewed by Sam Weinig and Andreas Kling.
1370
1371         - Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
1372         - Move StyleResolver::styleForDocument to Style::resolveForDocument
1373
1374         * WebCore.xcodeproj/project.pbxproj:
1375         * css/DeprecatedStyleBuilder.cpp:
1376         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
1377         (WebCore::ApplyPropertyFontFamily::applyValue):
1378         (WebCore::ApplyPropertyFontSize::applyInitialValue):
1379         (WebCore::ApplyPropertyFontSize::applyValue):
1380         * css/StyleResolver.cpp:
1381         (WebCore::StyleResolver::adjustRenderStyle):
1382         (WebCore::checkForOrientationChange):
1383         (WebCore::StyleResolver::applyProperty):
1384         (WebCore::StyleResolver::checkForGenericFamilyChange):
1385         (WebCore::StyleResolver::initializeFontStyle):
1386         (WebCore::StyleResolver::setFontSize):
1387         * css/StyleResolver.h:
1388         * dom/Document.cpp:
1389         (WebCore::Document::recalcStyle):
1390         * editing/EditingStyle.cpp:
1391         (WebCore::legacyFontSizeFromCSSValue):
1392         * html/HTMLLinkElement.cpp:
1393         (WebCore::HTMLLinkElement::process):
1394         * rendering/style/RenderStyle.cpp:
1395         (WebCore::RenderStyle::getFontAndGlyphOrientation):
1396         
1397             Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
1398             This depends on RenderStyle only so it is a natural member function.
1399
1400         * rendering/style/RenderStyle.h:
1401         * rendering/svg/RenderSVGInlineText.cpp:
1402         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1403         * style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1404         (WebCore::Style::computedFontSizeFromSpecifiedSize):
1405         (WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
1406         (WebCore::Style::fontSizeForKeyword):
1407         (WebCore::Style::legacyFontSizeForPixelSize):
1408         * style/StyleFontSizeFunctions.h: Added.
1409         * style/StyleResolveForDocument.cpp: Added.
1410         (WebCore::Style::resolveForDocument):
1411         * style/StyleResolveForDocument.h: Added.
1412
1413 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1414
1415         Add support for KeyboardEvent.location attribute
1416         https://bugs.webkit.org/show_bug.cgi?id=119326
1417
1418         Reviewed by Benjamin Poulain.
1419
1420         Add support for KeyboardEvent.location attribute as per the latest specification:
1421         http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent
1422
1423         IE10, Firefox 22 and recently Blink all support KeyboardEvent.location already.
1424
1425         The deprecated 'keyLocation' attribute was not removed to maintain backward
1426         compatibility.
1427
1428         No new tests, covered by existing tests.
1429
1430         * bindings/objc/PublicDOMInterfaces.h:
1431         * bindings/scripts/CodeGeneratorJS.pm:
1432         (GenerateConstructorDefinition):
1433         * dom/KeyboardEvent.cpp:
1434         (WebCore::KeyboardEventInit::KeyboardEventInit):
1435         (WebCore::KeyboardEvent::KeyboardEvent):
1436         (WebCore::KeyboardEvent::initKeyboardEvent):
1437         * dom/KeyboardEvent.h:
1438         (WebCore::KeyboardEvent::location):
1439         * dom/KeyboardEvent.idl:
1440
1441 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1442
1443         Make atob() throw an InvalidCharacterError on excess padding characters
1444         https://bugs.webkit.org/show_bug.cgi?id=118898
1445
1446         Reviewed by Darin Adler.
1447
1448         According to the latest specification, window.atob() should throw an
1449         InvalidCharacterError on excess padding characters:
1450         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob
1451
1452         This behavior is consistent with both Firefox, IE10 and recently Blink.
1453
1454         No new tests, already covered by:
1455         fast/dom/Window/atob-btoa.html
1456
1457         * page/DOMWindow.cpp:
1458         (WebCore::DOMWindow::atob):
1459
1460 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1461
1462         Make DOMImplementation::hasFeature() behave according to specification
1463         https://bugs.webkit.org/show_bug.cgi?id=119329
1464
1465         Reviewed by Ryosuke Niwa.
1466
1467         Make DOMImplementation::hasFeature() behave according to the latest specification:
1468         http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
1469
1470         Specifically, the function should now return true unconditionally for any non-SVG feature.
1471         This behavior is consistent with Firefox and since recently Blink.
1472
1473         hasFeature() originally would report whether the user agent claimed to support a
1474         given DOM feature, but experience proved it was not nearly as reliable or granular
1475         as simply checking whether the desired interfaces, attributes, or methods existed.
1476         As such, it should no longer be used, but continues to exist (and simply returns
1477         true) so that old pages don't stop working.
1478
1479         No new tests, covered by existing tests.
1480
1481         * dom/DOMImplementation.cpp:
1482         (WebCore::isSupportedSVG10Feature):
1483         (WebCore::isSupportedSVG11Feature):
1484         (WebCore::DOMImplementation::hasFeature):
1485
1486 2013-08-09  Alejandro G. Castro  <alex@igalia.com>
1487
1488         [GTK] [EFL] Enable tiled shadow blur for the inset shadows.
1489         https://bugs.webkit.org/show_bug.cgi?id=119078
1490
1491         Reviewed by Martin Robinson.
1492
1493         Already covered in the tests.
1494
1495         * platform/graphics/GraphicsContext.cpp:
1496         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1497         (WebCore::fillCurrentCairoPath): Added to allow fill the path
1498         without the shadow.
1499         (WebCore::shadowAndFillCurrentCairoPath):
1500         (WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
1501         implementation.
1502
1503 2013-08-09  Jakob Petsovits  <jpetsovits@blackberry.com>
1504
1505         [BlackBerry] Don't release the canvas Drawable, flush it directly instead.
1506         https://bugs.webkit.org/show_bug.cgi?id=119589
1507         https://jira.bbqnx.net/browse/BRWSR-12531
1508         JIRA 444857
1509
1510         Reviewed by George Staikos.
1511
1512         The previous code here used releaseBufferDrawable() to
1513         flush painted ImageBuffer contents, but then proceeded
1514         to use that released Drawable for further painting
1515         without ever locking a new one.
1516
1517         In an implementation that actually releases the Drawable
1518         rather than keeping it around and just flushing it,
1519         this will wreak havoc as bad as black screens or crashes.
1520
1521         As a solution that doesn't require the ImageBuffer object
1522         to swap out its m_canvas member for a new Drawable, we can
1523         access the PlatformGraphicsContext::flush() method directly
1524         to achieve the same effect as was previously intended by
1525         calling releaseBufferDrawable(). All it needs is letting
1526         the canvas layer know about the Drawable so it can call
1527         that flush() method by itself.
1528
1529         No new tests, verified by not crashing with an aforementioned
1530         implementation of releaseBufferDrawable().
1531
1532         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
1533         (WebCore::CanvasLayerCompositingThreadClient::CanvasLayerCompositingThreadClient):
1534         (WebCore::CanvasLayerCompositingThreadClient::commitPendingTextureUploads):
1535         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
1536         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
1537         (WebCore::CanvasLayerWebKitThread::create):
1538         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
1539         (WebCore::ImageBuffer::ImageBuffer):
1540         (WebCore::ImageBuffer::~ImageBuffer):
1541
1542 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1543
1544         [Qt][WK2] Composited and transformed links asserts in tap highlight
1545         https://bugs.webkit.org/show_bug.cgi?id=94345
1546
1547         Reviewed by Jocelyn Turcotte.
1548
1549         Use a mapping that does not assert when hitting transforms. We still skip
1550         transforms that produces non-rectangular areas.
1551
1552         * page/GestureTapHighlighter.cpp:
1553
1554 2013-08-09  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1555
1556         Buildfix. Fix warning after r153887:
1557         control reaches end of non-void function [-Werror=return-type]
1558
1559         Reviewed by Csaba Osztrogonác.
1560
1561         * svg/SVGAnimateElement.cpp:
1562         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
1563
1564 2013-08-09  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
1565
1566         Text decorations should be listed as non-inheritable
1567         https://bugs.webkit.org/show_bug.cgi?id=119608
1568
1569         Reviewed by Andreas Kling.
1570
1571         Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line"
1572         spec (CSS 3) states these properties are not inherited (w/ exceptions,
1573         which are currently handled by -in-effect property), however those were
1574         listed as inherited for no reason - thus preserving behavior as shown by
1575         layout test results.
1576
1577         Backported from Blink: https://codereview.chromium.org/20751008
1578
1579         Updated getComputedStyle tests for both 'text-decoration' and
1580         'text-decoration-line' properties to check that both are not implicitly
1581         inherited.
1582
1583         * css/CSSProperty.cpp:
1584         (WebCore::CSSProperty::isInheritedProperty):
1585
1586 2013-08-09  Andreas Kling  <akling@apple.com>
1587
1588         I wish we had a Windows EWS. :(
1589
1590         * css/ElementRuleCollector.cpp:
1591         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList): No range-based for today.
1592
1593 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
1594
1595         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
1596         https://bugs.webkit.org/show_bug.cgi?id=113224
1597
1598         Reviewed by Darin Adler.
1599
1600         Do not perform from-by animations for non-additive attributes.
1601
1602         Test: svg/animations/non-additive-type-from-by-animation.html
1603
1604         * svg/SVGAnimateElement.cpp:
1605         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1606         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
1607         (WebCore::SVGAnimateElement::isAdditive):
1608         * svg/SVGAnimateElement.h:
1609
1610 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
1611
1612         ASSERT(m_type == toSVGTransform.type())
1613         https://bugs.webkit.org/show_bug.cgi?id=113217
1614
1615         Reviewed by Darin Adler.
1616
1617         For to animations clear the transform list while animating and reset to it after the animation is done.
1618         This matches Firefox and Opera 12 behavior.
1619
1620         Tests: svg/animations/animateTransform-to-scale-expected.svg
1621                svg/animations/animateTransform-to-scale.svg
1622
1623         * svg/SVGAnimatedTransformList.cpp:
1624         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
1625
1626 2013-08-09  Arunprasad Rajkumar  <arurajku@cisco.com>
1627
1628         [Qt] QtWebKit should allow sending domain specific keycode to HTML applications
1629         https://bugs.webkit.org/show_bug.cgi?id=118445
1630
1631         Reviewed by Allan Sandfeld Jensen.
1632
1633         No new test required, it is covered by QtWebKit API test.
1634
1635         This fix allows sending QKeyEvent::nativeVirtualKey as the DOM KeyboardEvent keyCode value instead
1636         of Windows virtual key code. It can be enabled/disabled using "_q_useNativeVirtualKeyAsDOMKey"
1637         dynamic property present in QWebPage.
1638
1639         * platform/PlatformKeyboardEvent.h:
1640         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1641         * platform/qt/PlatformKeyboardEventQt.cpp:
1642         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1643         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1644
1645 2013-08-09  Renata Hodovan  <reni@webkit.org>
1646
1647         Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
1648         https://bugs.webkit.org/show_bug.cgi?id=119570
1649
1650         Reviewed by Ryosuke Niwa.
1651
1652         The m_mutableStyleSet of EditingStyle can be NULL in ApplyStyleCommand::applyInlineStyleToNodeRange but
1653         this scenario was not checked earlier.
1654
1655         Test: editing/execCommand/null-style-crash.html
1656
1657         * css/StylePropertySet.cpp:
1658         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
1659         * css/StylePropertySet.h:
1660         * css/ViewportStyleResolver.cpp:
1661         (WebCore::ViewportStyleResolver::addViewportRule):
1662         * editing/ApplyStyleCommand.cpp:
1663         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1664         * editing/EditingStyle.cpp:
1665         (WebCore::styleFromMatchedRulesForElement):
1666         (WebCore::EditingStyle::mergeStyleFromRules):
1667         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1668
1669 2013-08-09  Andreas Kling  <akling@apple.com>
1670
1671         ElementRuleCollector: Use range-based for syntax in rule collection loop.
1672         <http://webkit.org/b/119617>
1673         <rdar://problem/14695311>
1674
1675         Reviewed by Antti Koivisto.
1676
1677         * css/ElementRuleCollector.cpp:
1678         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
1679
1680 2013-08-09  Andreas Kling  <akling@apple.com>
1681
1682         StyleRule*::properties() should return const references.
1683         <http://webkit.org/b/119596>
1684
1685         Reviewed by Antti Koivisto.
1686
1687         Make StyleRule::properties() & friends return const-references instead of
1688         pointers. This exposed some pointless null checking, since rules should
1689         always have properties.
1690
1691         All rule objects that contain properties now require a StylePropertySet at
1692         the time of construction instead having you call setProperties() later.
1693
1694         The only rules that could ever have null properties were the default-inserted
1695         animation keyframe rules for 0% and 100% that we'd conjure up if the author
1696         didn't provide them. Now they just have an empty property set instead.
1697
1698         * css/CSSFontFaceRule.cpp:
1699         (WebCore::CSSFontFaceRule::cssText):
1700         * css/CSSFontSelector.cpp:
1701         (WebCore::CSSFontSelector::addFontFaceRule):
1702         * css/CSSPageRule.cpp:
1703         (WebCore::CSSPageRule::cssText):
1704         * css/CSSParser.cpp:
1705         (WebCore::CSSParser::createFilterRule):
1706         (WebCore::CSSParser::createStyleRule):
1707         (WebCore::CSSParser::createFontFaceRule):
1708         (WebCore::CSSParser::rewriteSpecifiers):
1709         * css/CSSStyleRule.cpp:
1710         (WebCore::CSSStyleRule::cssText):
1711         * css/ElementRuleCollector.cpp:
1712         (WebCore::leftToRightDeclaration):
1713         (WebCore::rightToLeftDeclaration):
1714         (WebCore::ElementRuleCollector::addElementStyleProperties):
1715         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
1716         * css/PageRuleCollector.cpp:
1717         (WebCore::PageRuleCollector::matchPageRulesForList):
1718         * css/StylePropertySet.cpp:
1719         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
1720         * css/StylePropertySet.h:
1721         * css/StyleResolver.cpp:
1722         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1723         (WebCore::StyleResolver::styleForKeyframe):
1724         (WebCore::StyleResolver::keyframeStylesForAnimation):
1725         * css/StyleResolver.h:
1726         * css/StyleRule.cpp:
1727         (WebCore::StyleRule::StyleRule):
1728         (WebCore::StyleRule::create):
1729         (WebCore::StyleRulePage::StyleRulePage):
1730         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
1731         (WebCore::StyleRuleViewport::StyleRuleViewport):
1732         (WebCore::StyleRuleViewport::mutableProperties):
1733         (WebCore::StyleRuleFilter::StyleRuleFilter):
1734         * css/StyleRule.h:
1735         (WebCore::StyleRule::create):
1736         (WebCore::StyleRule::properties):
1737         (WebCore::StyleRuleFontFace::create):
1738         (WebCore::StyleRuleFontFace::properties):
1739         (WebCore::StyleRulePage::create):
1740         (WebCore::StyleRulePage::properties):
1741         (WebCore::StyleRuleViewport::create):
1742         (WebCore::StyleRuleViewport::properties):
1743         (WebCore::StyleRuleFilter::create):
1744         (WebCore::StyleRuleFilter::properties):
1745         * css/StyleSheetContents.cpp:
1746         (WebCore::StyleSheetContents::addSubresourceStyleURLs):
1747         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1748         * css/WebKitCSSFilterRule.cpp:
1749         (WebCore::WebKitCSSFilterRule::cssText):
1750         * css/WebKitCSSKeyframeRule.cpp:
1751         (WebCore::StyleKeyframe::StyleKeyframe):
1752         (WebCore::StyleKeyframe::mutableProperties):
1753         * css/WebKitCSSKeyframeRule.h:
1754         (WebCore::StyleKeyframe::create):
1755         (WebCore::StyleKeyframe::properties):
1756         * css/WebKitCSSViewportRule.cpp:
1757         (WebCore::WebKitCSSViewportRule::cssText):
1758         * editing/ApplyStyleCommand.cpp:
1759         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1760         * editing/EditingStyle.cpp:
1761         (WebCore::EditingStyle::mergeStyleFromRules):
1762         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1763         * inspector/InspectorStyleSheet.cpp:
1764         (WebCore::InspectorStyleSheet::revalidateStyle):
1765         * page/PageSerializer.cpp:
1766         (WebCore::PageSerializer::retrieveResourcesForRule):
1767         * svg/SVGFontFaceElement.cpp:
1768         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1769         (WebCore::SVGFontFaceElement::fontFamily):
1770         (WebCore::SVGFontFaceElement::rebuildFontFace):
1771
1772 2013-08-09  Julien Brianceau  <jbrianceau@nds.com>
1773
1774         [Qt] Fix build (broken by changeset r153826).
1775         https://bugs.webkit.org/show_bug.cgi?id=119616
1776
1777         Reviewed by Andreas Kling.
1778
1779         * xml/parser/XMLDocumentParserQt.cpp:
1780         (WebCore::XMLDocumentParser::XMLDocumentParser):
1781
1782 2013-08-08  Tim Horton  <timothy_horton@apple.com>
1783
1784         navigator.plugins has plugins in it when plugins are disabled
1785         https://bugs.webkit.org/show_bug.cgi?id=119607
1786         <rdar://problem/14678030>
1787
1788         Reviewed by Anders Carlsson.
1789
1790         Test: plugins/navigator-plugins-disabled.html
1791
1792         * page/Settings.cpp:
1793         (WebCore::Settings::setPluginsEnabled):
1794         Refresh the plugin database when plugins are enabled or disabled.
1795         This is necessary to ensure that navigator.plugins will have the
1796         correct set of plugins after dynamically changing whether plugins
1797         are enabled, which makes the test for this patch possible (but it
1798         makes sense in the browser as well).
1799
1800 2013-08-08  Timothy Hatcher  <timothy@apple.com>
1801
1802         Allow SVG images to be drawn into canvas without tainting.
1803         https://bugs.webkit.org/show_bug.cgi?id=119492
1804
1805         Reviewed by Darin Adler.
1806
1807         Tests: svg/as-image/svg-canvas-not-tainted.html
1808                svg/as-image/svg-canvas-link-not-colored.html
1809                svg/as-image/svg-canvas-xhtml-tainted.html
1810
1811         * html/HTMLAnchorElement.cpp:
1812         (WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
1813         (WebCore::shouldProhibitLinks): Added.
1814         * html/HTMLAnchorElement.h:
1815         * html/HTMLImageElement.cpp:
1816         (WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
1817         * rendering/svg/RenderSVGRoot.cpp:
1818         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
1819         * svg/SVGAElement.cpp:
1820         (WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
1821         * svg/graphics/SVGImage.cpp:
1822         (WebCore::SVGImage::hasSingleSecurityOrigin): Added.
1823         (WebCore::isInSVGImage): Added.
1824         * svg/graphics/SVGImage.h:
1825
1826 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
1827
1828         Fix ASSERT(m_contentsSolidColor.isValid()) assertion on iOS at nytimes.com
1829         https://bugs.webkit.org/show_bug.cgi?id=119603
1830
1831         Reviewed by Dean Jackson.
1832
1833         On iOS it's possible for a GraphicsLayer to transition between having
1834         a solid background color, and containing media. This happens on nytimes.com
1835         when playing video.
1836         
1837         In this case, GraphicsLayerCA::updateContentsColorLayer() would assert
1838         because m_contentsLayer had been already set up to contain media, but
1839         it would be trying to update the color.
1840         
1841         Fix by bailing from all the updateContents* functions if there is no
1842         contents layer, or that layer exists for a different purpose.
1843
1844         * platform/graphics/ca/GraphicsLayerCA.cpp:
1845         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
1846         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
1847         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
1848
1849 2013-08-08  Commit Queue  <commit-queue@webkit.org>
1850
1851         Unreviewed, rolling out r153847.
1852         http://trac.webkit.org/changeset/153847
1853         https://bugs.webkit.org/show_bug.cgi?id=119609
1854
1855         caused new SVG animation test failures (Requested by smfr on
1856         #webkit).
1857
1858         * svg/SVGAnimateElement.cpp:
1859         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1860
1861 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
1862
1863         Kill updateStyleForAllDocuments()
1864         https://bugs.webkit.org/show_bug.cgi?id=118093
1865
1866         Reviewed by Geoff Garen.
1867
1868         We should never have to eagerly update style, especially for all documents
1869         that the process knows about. The WebKit model is to update style when
1870         required for layout etc, not to update it eagerly.
1871         
1872         This is historical code whose origins are lost in the mists of KHTML.
1873         r42384 makes it possible to do away with this eager updating, and
1874         r55568 removed some calls. Discussion in bug 32580 suggests that
1875         form control code still need this, but tests still pass without it.
1876
1877         * bindings/js/JSCallbackData.cpp:
1878         (WebCore::JSCallbackData::invokeCallback):
1879         * bindings/js/JSCustomXPathNSResolver.cpp:
1880         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1881         * dom/Document.cpp:
1882         (WebCore::Document::scheduleStyleRecalc):
1883         (WebCore::Document::unscheduleStyleRecalc):
1884         * dom/Document.h:
1885         * dom/Element.cpp:
1886         (WebCore::Element::setActive):
1887
1888 2013-08-08  Jer Noble  <jer.noble@apple.com>
1889
1890         [EME] MediaKey APIs should be prefixed.
1891         https://bugs.webkit.org/show_bug.cgi?id=119606
1892
1893         Reviewed by Anders Carlsson.
1894
1895         No new tests; updated exsisting tests with new names.
1896
1897         Prefix all new classes with "WebKit" and new methods on existing unprefixed
1898         classes with "webkit"
1899
1900         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: MediaKeyMessageEvent -> WebKitMediaKeyMessageEvent
1901         * Modules/encryptedmedia/MediaKeySession.idl: MediaKeySession -> WebKitMediaKeySession
1902         * Modules/encryptedmedia/MediaKeys.idl: MediaKeys -> WebKitMediaKeys
1903         * html/HTMLMediaElement.idl: keys -> webkitKeys, setMediaKeys -> webkitSetMediaKeys
1904         * html/MediaKeyError.idl: MediaKeyError -> WebKitMediaKeyError
1905
1906 2013-08-08  Jer Noble  <jer.noble@apple.com>
1907
1908         [EME] setMediaKeys function as defined in the EME specification does not work
1909         https://bugs.webkit.org/show_bug.cgi?id=119597
1910
1911         Reviewed by Anders Carlsson.
1912
1913         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html
1914
1915         Rename the mediaKeys attribute 'keys' and make readonly, and add an explicit
1916         setMediaKeys() method in HTMLMediaElement's IDL.
1917
1918         * html/HTMLMediaElement.h:
1919         (WebCore::HTMLMediaElement::keys):
1920         * html/HTMLMediaElement.idl:
1921
1922 2013-08-06  Sam Weinig  <sam@webkit.org>
1923
1924         Hashing SecurityOrigin's can lead to trouble if you mutate them :(
1925         https://bugs.webkit.org/show_bug.cgi?id=119533
1926         <rdar://problem/12978338>
1927
1928         Reviewed by Andreas Kling.
1929
1930         We are getting into trouble in the following circumstance:
1931         - You have a HashMap<RefPtr<SecurityOrigin>, Value> map.
1932         - You add security origin A (http, www.webkit.org, 80) to the map.
1933         - You mutate security origin A by domain relaxation, so that it has the domain webkit.org.
1934         - You add security origin B (http, www.webkit.org, 80) to the map.
1935         - You mutate security origin B by domain relaxation, so that it has the domain webkit.org.
1936             You now have two identical keys in the map.
1937         - Add few more items to the map causing a rehash.
1938         - When you try to add A and B back into the map, you will have a collision, because they now equal each other.
1939
1940         We should probably stop using SecurityOrigins as keys in HashMaps (and move to using a non-mutable SecurityOriginTuple,
1941         or something), but for now, we can just only use the scheme / host / port part for equality, which is what all the users
1942         really want.
1943
1944         * page/SecurityOriginHash.h:
1945         (WebCore::SecurityOriginHash::equal):
1946         Switch to using isSameSchemeHostPort() for SecurityOriginHash::equal().
1947
1948 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
1949
1950         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
1951         https://bugs.webkit.org/show_bug.cgi?id=113224
1952
1953         Reviewed by Dirk Schulze.
1954
1955         Do not perform from-by animations for non-additive attributes.
1956
1957         Test: svg/animations/non-additive-type-from-by-animation.html
1958
1959         * svg/SVGAnimateElement.cpp:
1960         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1961
1962 2013-08-08  Brent Fulgham  <bfulgham@apple.com>
1963
1964         [Windows] Improper Caption Button Displayed to Users
1965         https://bugs.webkit.org/show_bug.cgi?id=119593 
1966
1967         Reviewed by Eric Carlson.
1968
1969         Remove the custom drawing code for the Windows port, and
1970         have it render using the CSS/SVG markup like we do on OS X.
1971
1972         * rendering/RenderThemeWin.cpp: Remove drawing code.
1973         * rendering/RenderThemeWin.h: Remove declaration.
1974
1975 2013-08-08  Alex Christensen  <achristensen@apple.com>
1976
1977         Work towards WebGL on AppleWin port.
1978         https://bugs.webkit.org/show_bug.cgi?id=119562
1979
1980         Reviewed by Brent Fulgham.
1981
1982         * WebCore.vcxproj/WebCore.vcxproj:
1983         Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
1984         * WebCore.vcxproj/WebCore.vcxproj.filters:
1985         Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
1986         * platform/graphics/GraphicsContext3D.h:
1987         Added m_webGLLayer for AppleWin port.
1988         * platform/graphics/GraphicsContext3DPrivate.cpp:
1989         Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
1990         * platform/graphics/win/GraphicsContext3DWin.cpp:
1991         Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
1992         (WebCore::GraphicsContext3D::GraphicsContext3D):
1993         Added GraphicsContext3DPrivate and PlatformCALayer initialization.
1994         (WebCore::GraphicsContext3D::makeContextCurrent):
1995         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1996         Added implementation based on Cairo ports' to be refactored soon.
1997         (WebCore::GraphicsContext3D::platformLayer):
1998         Return PlatformCALayer's PlatformLayer instead of 0.
1999
2000 2013-08-08  Jer Noble  <jer.noble@apple.com>
2001
2002         [EME] Implement MediaKeys.isTypeSupported()
2003         https://bugs.webkit.org/show_bug.cgi?id=119586
2004
2005         Reviewed by Eric Carlson.
2006
2007         Test: media/encrypted-media/encrypted-media-is-type-supported.html
2008
2009         The EME spec has removed the extra keySystem parameter from
2010         HTMLMediaElement.canPlayType() in favor of a new isTypeSupported()
2011         method on MediaKeys.
2012
2013         To implement this method, the CDMFactory needs to know whether the
2014         registered CDM supports the specified mime type.  CDMs must register
2015         this new factory method, which requires changes to CDMPrivateAVFoundation
2016         and MockCDM.
2017
2018         Add the new MediaKeys.isTypeSupported() method:
2019         * Modules/encryptedmedia/MediaKeys.cpp:
2020         (WebCore::MediaKeys::isTypeSupported):
2021         * Modules/encryptedmedia/MediaKeys.h:
2022         * Modules/encryptedmedia/MediaKeys.idl:
2023
2024         Add the new factory CDMSupportsKeySystemAndMimeType method:
2025         * Modules/encryptedmedia/CDM.cpp:
2026         (WebCore::CDMFactory::CDMFactory): Now takes a third parameter.
2027         (WebCore::installedCDMFactories): When adding the AVFoundation CDM, pass its new method.
2028         (WebCore::CDM::registerCDMFactory): Now takes a third parameter.
2029         (WebCore::CDM::keySystemSupportsMimeType): Added.
2030         * Modules/encryptedmedia/CDM.h:
2031         * WebCore.exp.in:
2032
2033         Register this new method with the factory for all concrete CDMs:
2034         * Modules/encryptedmedia/CDMPrivateAVFoundation.h:
2035         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
2036         (WebCore::CDMPrivateAVFoundation::supportsKeySystem):
2037         (WebCore::CDMPrivateAVFoundation::supportsKeySystemAndMimeType):
2038         * testing/Internals.cpp:
2039         (WebCore::Internals::initializeMockCDM):
2040         * testing/MockCDM.cpp:
2041         (WebCore::MockCDM::supportsKeySystem):
2042         (WebCore::MockCDM::supportsKeySystemAndMimeType):
2043         * testing/MockCDM.h:
2044
2045 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
2046
2047         Crash in WTF::RefPtr<WebCore::SpaceSplitStringData>::operator UnspecifiedBoolType
2048         https://bugs.webkit.org/show_bug.cgi?id=118839
2049
2050         Reviewed by Darin Adler.
2051
2052         Take into account that elementData() can be null in classAttributeChanged.
2053
2054         Test: svg/animations/classAttributeSettingCrash.html
2055
2056         * dom/Element.cpp:
2057         (WebCore::Element::classAttributeChanged):
2058
2059 2013-08-08  Robert Hogan  <robert@webkit.org>
2060
2061         REGRESSION(r147019): Page has extra space
2062         https://bugs.webkit.org/show_bug.cgi?id=119424
2063
2064         Reviewed by David Hyatt.
2065
2066         Clear the overflow rect before recomputing it in table sections.
2067
2068         No new tests: the reduction uses jquery and I was unable to simulate the reduction without it.
2069
2070         * rendering/RenderTableSection.cpp:
2071         (WebCore::RenderTableSection::layoutRows):
2072         (WebCore::RenderTableSection::computeOverflowFromCells):
2073
2074 2013-08-08  Andreas Kling  <akling@apple.com>
2075
2076         Inserting multiple rules into an empty style sheet should avoid style recalc if possible.
2077         <http://webkit.org/b/119568>
2078
2079         Reviewed by Antti Koivisto.
2080
2081         As a follow-up to <http://webkit.org/b/119475>, where I added a hack for inserting
2082         a single rule into an empty style sheet, this broadens the optimization to support
2083         any number of rules.
2084
2085         This optimizes the scenario where a style sheet is added to the DOM and then populated
2086         rule-by-rule via CSSOM insertRule()/addRule() calls. Previously we'd do a full style
2087         recalc for this case, but now we'll treat it the same as a full sheet added at once.
2088
2089         * css/CSSStyleSheet.h:
2090         * css/CSSStyleSheet.cpp:
2091         (WebCore::CSSStyleSheet::willMutateRules):
2092
2093             Made willMutateRules() return whether the style sheet contents were cloned by the
2094             copy-on-write mechanism.
2095
2096         * dom/Document.h:
2097         (WebCore::CSSStyleSheet::didMutateRules):
2098         (WebCore::CSSStyleSheet::insertRule):
2099
2100             Replaced the InsertionIntoEmptySheet mutation type by a general RuleInsertion.
2101             The mutation callback checks if we're inserting into a rule that's not (yet) part
2102             of the document's active sheet set. In that case, we defer doing the style sheet
2103             until all the insertions are done (or something forces us to style+layout.)
2104
2105             Note that this optimization only happens if the style sheet had a single client.
2106             Shared style sheets that just got cloned before mutation may have pointers into
2107             them from the Document's StyleResolver, so we're forced to do an immediate sheet
2108             update in that case.
2109
2110         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
2111         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
2112
2113             Moved these out-of-line.
2114
2115         (WebCore::CSSStyleSheet::didMutateRuleFromCSSStyleDeclaration):
2116         * css/PropertySetCSSStyleDeclaration.cpp:
2117         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
2118
2119             Made a separate mutation callback for CSSStyleDeclaration since its needs are
2120             so simple compared to the mutation callback from CSSStyleSheet. Seems better
2121             than adding yet another mode to the enum.
2122
2123         * dom/Document.cpp:
2124         (WebCore::Document::Document):
2125         (WebCore::Document::recalcStyle):
2126         (WebCore::Document::styleResolverChanged):
2127         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
2128         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
2129
2130             Added mechanism to defer doing a RecalcStyleIfNeeded.
2131
2132         (WebCore::Document::updateStyleIfNeeded):
2133
2134             Synchronize the optimized style sheet update if there's one scheduled.
2135             This ensures that stuff like layout-dependent property access won't operate
2136             on stale style.
2137
2138         * dom/DocumentStyleSheetCollection.h:
2139         (WebCore::DocumentStyleSheetCollection::pendingUpdateType):
2140         (WebCore::DocumentStyleSheetCollection::setPendingUpdateType):
2141         (WebCore::DocumentStyleSheetCollection::flushPendingUpdates):
2142         * dom/DocumentStyleSheetCollection.cpp:
2143         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
2144         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2145
2146             Have DSSC track the kind of style sheet update it needs to do (instead of just
2147             a boolean "needs update.") This is used by Document::recalcStyle() to make sure
2148             the right kind of update happens if there's one scheduled.
2149
2150         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains):
2151
2152             Added helper to check if a CSSStyleSheet is part of the active set.
2153
2154 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2155
2156         [WK1] NPStream::headers not initialized
2157         https://bugs.webkit.org/show_bug.cgi?id=119574
2158
2159         Reviewed by Alexey Proskuryakov.
2160
2161         Initialize the header field. According to user feedback that should solve some
2162         cases of random crashes when loading plugins on Mac and Windows.
2163
2164         * plugins/PluginStream.cpp:
2165         (WebCore::PluginStream::PluginStream):
2166
2167 2013-08-08  Andreas Kling  <akling@apple.com>
2168
2169         Element: Modernize attribute storage accessor functions.
2170         <http://webkit.org/b/119578>
2171
2172         Reviewed by Antti Koivisto.
2173
2174         Rename these functions to more WebKit-style names.
2175
2176         - const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
2177         - const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
2178         - unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
2179
2180         Note that attributeAt() now returns a reference instead of a pointer. That's right.
2181
2182         * css/SelectorChecker.cpp:
2183         (WebCore::attributeValueMatches):
2184         (WebCore::anyAttributeMatches):
2185         * css/SelectorChecker.h:
2186         (WebCore::SelectorChecker::checkExactAttribute):
2187         * dom/Attr.cpp:
2188         (WebCore::Attr::elementAttribute):
2189         * dom/DatasetDOMStringMap.cpp:
2190         (WebCore::DatasetDOMStringMap::getNames):
2191         (WebCore::DatasetDOMStringMap::item):
2192         (WebCore::DatasetDOMStringMap::contains):
2193         * dom/Element.cpp:
2194         (WebCore::Element::detachAttribute):
2195         (WebCore::Element::removeAttribute):
2196         (WebCore::Element::getAttribute):
2197         (WebCore::Element::setAttribute):
2198         (WebCore::Element::setSynchronizedLazyAttribute):
2199         (WebCore::Element::setAttributeInternal):
2200         (WebCore::Element::setAttributeNode):
2201         (WebCore::Element::removeAttributeNode):
2202         (WebCore::Element::removeAttributeInternal):
2203         (WebCore::Element::getAttributeNode):
2204         (WebCore::Element::getAttributeNodeNS):
2205         (WebCore::Element::hasAttribute):
2206         (WebCore::Element::hasAttributeNS):
2207         (WebCore::Element::computeInheritedLanguage):
2208         (WebCore::Element::normalizeAttributes):
2209         (WebCore::Element::getURLAttribute):
2210         (WebCore::Element::getNonEmptyURLAttribute):
2211         (WebCore::Element::detachAllAttrNodesFromElement):
2212         (WebCore::Element::cloneAttributesFromElement):
2213         (WebCore::ElementData::isEquivalent):
2214         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
2215         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
2216         (WebCore::UniqueElementData::findAttributeByName):
2217         (WebCore::UniqueElementData::attributeAt):
2218         * dom/Element.h:
2219         (WebCore::Element::findAttributeIndexByName):
2220         (WebCore::Element::fastHasAttribute):
2221         (WebCore::Element::fastGetAttribute):
2222         (WebCore::Element::attributeAt):
2223         (WebCore::Element::findAttributeByName):
2224         (WebCore::ElementData::findAttributeByName):
2225         (WebCore::ElementData::findAttributeIndexByName):
2226         (WebCore::ElementData::attributeAt):
2227         * dom/NamedNodeMap.cpp:
2228         (WebCore::NamedNodeMap::removeNamedItem):
2229         (WebCore::NamedNodeMap::removeNamedItemNS):
2230         (WebCore::NamedNodeMap::item):
2231         * dom/Node.cpp:
2232         (WebCore::Node::dumpStatistics):
2233         (WebCore::Node::isDefaultNamespace):
2234         (WebCore::Node::lookupNamespaceURI):
2235         (WebCore::Node::lookupNamespacePrefix):
2236         (WebCore::Node::compareDocumentPosition):
2237         * dom/StyledElement.cpp:
2238         (WebCore::StyledElement::makePresentationAttributeCacheKey):
2239         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2240         * editing/MarkupAccumulator.cpp:
2241         (WebCore::MarkupAccumulator::appendElement):
2242         * editing/markup.cpp:
2243         (WebCore::completeURLs):
2244         (WebCore::StyledMarkupAccumulator::appendElement):
2245         * html/HTMLEmbedElement.cpp:
2246         (WebCore::HTMLEmbedElement::parametersForPlugin):
2247         * html/HTMLInputElement.cpp:
2248         (WebCore::HTMLInputElement::updateType):
2249         * html/HTMLObjectElement.cpp:
2250         (WebCore::HTMLObjectElement::parametersForPlugin):
2251         * html/HTMLSelectElement.cpp:
2252         (WebCore::HTMLSelectElement::parseAttribute):
2253         * html/parser/HTMLConstructionSite.cpp:
2254         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2255         * inspector/DOMPatchSupport.cpp:
2256         (WebCore::DOMPatchSupport::innerPatchNode):
2257         (WebCore::DOMPatchSupport::createDigest):
2258         * inspector/InspectorDOMAgent.cpp:
2259         (WebCore::InspectorDOMAgent::setAttributesAsText):
2260         (WebCore::InspectorDOMAgent::performSearch):
2261         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2262         * page/PageSerializer.cpp:
2263         (WebCore::isCharsetSpecifyingNode):
2264         * svg/SVGStyledElement.cpp:
2265         (WebCore::SVGStyledElement::getPresentationAttribute):
2266         * xml/XPathFunctions.cpp:
2267         (WebCore::XPath::FunLang::evaluate):
2268         * xml/XPathNodeSet.cpp:
2269         (WebCore::XPath::NodeSet::traversalSort):
2270         * xml/XPathStep.cpp:
2271         (WebCore::XPath::Step::nodesInAxis):
2272         * xml/parser/XMLDocumentParserLibxml2.cpp:
2273         (WebCore::XMLDocumentParser::XMLDocumentParser):
2274         * xml/parser/XMLDocumentParserQt.cpp:
2275         (WebCore::XMLDocumentParser::XMLDocumentParser):
2276
2277 2013-08-08  Mark Lam  <mark.lam@apple.com>
2278
2279         Restoring use of StackIterator instead of Interpreter::getStacktrace().
2280         https://bugs.webkit.org/show_bug.cgi?id=119575.
2281
2282         Reviewed by Oliver Hunt.
2283
2284         No new tests.
2285
2286         * bindings/js/ScriptCallStackFactory.cpp:
2287         (WebCore::createScriptCallStack):
2288
2289 2013-08-08  Zalan Bujtas  <zalan@apple.com>
2290
2291         REGRESSION (r121551) Incorrect handling of invalid media query list.
2292         https://bugs.webkit.org/show_bug.cgi?id=119164
2293
2294         Reviewed by Antti Koivisto.
2295
2296         Differentiate between syntactically invalid media queries and media queries with empty expressions.
2297
2298         Introduce a dedicated function for valid, but empty expression queries, so that passing NULL MediaQuerySet
2299         object to CSSParser::createMediaRule() can indicate invalid media query.
2300
2301         Test: fast/media/invalid-media-query-list.html
2302
2303         * css/CSSGrammar.y.in:
2304         * css/CSSParser.cpp:
2305         (WebCore::CSSParser::createMediaRule):
2306         (WebCore::CSSParser::createEmptyMediaRule):
2307         * css/CSSParser.h:
2308
2309 2013-08-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2310
2311         Introduce toSVGMPathElement(), and use it
2312         https://bugs.webkit.org/show_bug.cgi?id=119566
2313
2314         Reviewed by Andreas Kling.
2315
2316         As a step to change static_cast with toSVGXXX, static_cast<SVGMPathElement*> can
2317         be changed with toSVGMPathElement().
2318
2319         * svg/SVGAnimateMotionElement.cpp:
2320         (WebCore::SVGAnimateMotionElement::updateAnimationPath):
2321         * svg/SVGMPathElement.h:
2322         (WebCore::toSVGMPathElement):
2323         * svg/SVGPathElement.cpp:
2324         (WebCore::SVGPathElement::invalidateMPathDependencies):
2325
2326 2013-08-08  Antti Koivisto  <antti@apple.com>
2327
2328         Move more style recalc code to StyleResolveTree.cpp
2329         https://bugs.webkit.org/show_bug.cgi?id=119553
2330
2331         Reviewed by Andreas Kling.
2332
2333         * css/StyleResolver.cpp:
2334         * css/StyleResolver.h:
2335         
2336             Remove now unused StyleResolver::styleForText.
2337
2338         * dom/ElementShadow.cpp:
2339         * dom/ElementShadow.h:
2340         
2341             Remove ElementShadow::recalcStyle.
2342
2343         * dom/ShadowRoot.cpp:
2344         (WebCore::ShadowRoot::setResetStyleInheritance):
2345         
2346             Use Style::resolveTree instead of ElementShadow::recalcStyle.
2347
2348         * dom/ShadowRoot.h:
2349         
2350             Remove ShadowRoot::recalcStyle.
2351
2352         * dom/Text.cpp:
2353         * dom/Text.h:
2354         
2355             Remove Text::recalcTextStyle.
2356
2357         * style/StyleResolveTree.cpp:
2358         (WebCore::Style::updateTextStyle):
2359         
2360             Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.
2361
2362         (WebCore::Style::resolveShadowTree):
2363         
2364             Moved from ShadowRoot::recalcStyle. 
2365             Simplified to cover only cases that can occur with the current shadow DOM support.
2366
2367         (WebCore::Style::resolveTree):
2368
2369 2013-08-08  Andreas Kling  <akling@apple.com>
2370
2371         REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
2372         <http://webkit.org/b/119520>
2373         <rdar://problem/14658929>
2374
2375         Reviewed by Simon Fraser.
2376
2377         When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
2378         from one node to another.
2379         We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
2380         necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
2381         in the old node.
2382
2383         Test: fast/repaint/caret-jump-between-nodes.html
2384
2385         * editing/FrameSelection.cpp:
2386         (WebCore::FrameSelection::recomputeCaretRect):
2387
2388             Fall through all the way down to caret repaints if the selection's new anchor node is not
2389             the same as m_previousCaretNode.
2390
2391 2013-08-07  Andrei Bucur  <abucur@adobe.com>
2392
2393         [CSS Regions] Propagate overflow from the flow thread to the first and last region
2394         https://bugs.webkit.org/show_bug.cgi?id=118526
2395
2396         Reviewed by David Hyatt.
2397
2398         The patch implements layout overflow propagation for the first and last regions. The approach
2399         taken is triggering a simple layout on the regions after the named flows are laid out
2400         that extracts the layout overflow from the flow thread and adds it to the regions.
2401
2402         The process is based on adding two new layout phases: the overflow phase and the final phase.
2403         The overflow phase is set after the flow threads are laid out and it marks the regions as
2404         needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
2405         it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
2406         thread is relaid out and set in the final phase, forcing the regions to recollect the layout
2407         overflow. In theory this would be an N-step layout because scrollbars can force content to change
2408         regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
2409         limiting this to the first pass by inserting this new final layout phase.
2410
2411         A short description of the processing model for a document:
2412         - layout the document (all the flow threads should be in the constrained layout phase after this step)
2413         - reverse iterate through the flow threads and mark the regions for simplified layout (we need to
2414         reverse iterate so the overflow can correctly propagate with nested regions)
2415         - if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
2416         it as needing a new pass
2417         - make a secondary pass through the flow threads that changed after scrollbars have been added and
2418         recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
2419         be invalidated in the final phase)
2420         - after the overflow was propagated update all the flow threads in the normal layout phase
2421
2422         There are some issues with the patch:
2423         - the simplified layout doesn't compute correct overflow values for inline blocks
2424         - the layout overflow from the flow thread doesn't take the region size into account
2425
2426         The first issue is not related to regions and will be fixed in a future patch. The second issue
2427         will be fixed when box overflow will be region bound.
2428
2429         Tests: fast/regions/overflow-scrollable-1.html
2430                fast/regions/overflow-scrollable-2.html
2431                fast/regions/overflow-scrollable-3.html
2432                fast/regions/overflow-scrollable-fit-complex.html
2433                fast/regions/overflow-scrollable-fit.html
2434                fast/regions/overflow-scrollable-nested.html
2435
2436         * rendering/FlowThreadController.cpp: Flow threads layout driver functions.
2437         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
2438         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
2439         (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
2440         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
2441         (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
2442         * rendering/FlowThreadController.h:
2443         * rendering/RenderBlock.cpp:
2444         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2445         * rendering/RenderFlowThread.cpp:
2446         (WebCore::RenderFlowThread::RenderFlowThread):
2447         (WebCore::RenderFlowThread::invalidateRegions):
2448         (WebCore::RenderFlowThread::validateRegions):
2449         (WebCore::RenderFlowThread::layout):
2450         (WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
2451         (WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
2452         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
2453         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
2454         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
2455         (WebCore::RenderFlowThread::addForcedRegionBreak):
2456         * rendering/RenderFlowThread.h:
2457         * rendering/RenderMultiColumnSet.cpp:
2458         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
2459         * rendering/RenderRegion.cpp:
2460         (WebCore::RenderRegion::pageLogicalHeight):
2461         (WebCore::RenderRegion::maxPageLogicalHeight):
2462         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
2463         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
2464         (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
2465         (WebCore::RenderRegion::layoutBlock):
2466         (WebCore::RenderRegion::computeOverflowFromFlowThread):
2467         (WebCore::RenderRegion::updateLogicalHeight):
2468         * rendering/RenderRegion.h:
2469         * rendering/RenderView.cpp:
2470         (WebCore::RenderView::layoutContentToComputeOverflowInRegions):
2471         (WebCore::RenderView::layout):
2472         * rendering/RenderView.h:
2473
2474 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
2475
2476         Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
2477         https://bugs.webkit.org/show_bug.cgi?id=119564
2478
2479         Reviewed by Beth Dakin.
2480
2481         When scrolling WebViews on Macs with Retina displays, AppKit uses
2482         device pixels for the scroll offset, so [scrollView() documentVisibleRect]
2483         can return a CGRect with non-integral origin. This rect is used by layout,
2484         via layoutSize(), to decide whether the view size changed, which prompts
2485         a full repaint. However, FrameView gets a value which has been rounded
2486         by enclosingIntRect(), which increases the height or width by 1px if the 
2487         y or x offset is on a half-pixel, causing spurious full repaints.
2488         
2489         Fix by plumbing through platformVisibleContentSize(), which just
2490         gets the size of the -documentVisibleRect.
2491         
2492         * page/FrameView.cpp:
2493         (WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
2494         separately, since that is two calls down into platformVisibleContentSize.
2495         * platform/ScrollView.cpp:
2496         (WebCore::ScrollView::unscaledVisibleContentSize):
2497         (WebCore::ScrollView::platformVisibleContentSize):
2498         * platform/ScrollView.h:
2499         * platform/mac/ScrollViewMac.mm:
2500         (WebCore::ScrollView::platformVisibleContentSize):
2501
2502 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
2503
2504         Be more aggressive about sending fake mouse events less frequently
2505         https://bugs.webkit.org/show_bug.cgi?id=119563
2506         <rdar://problem/14669029>
2507
2508         Reviewed by Tim Horton.
2509
2510         r109151 added code that throttles back the fake mouse events that we
2511         send during scrolling, but in such a way that a page could take up to
2512         100ms to handle a single mousemove, and we'd still send fake mousemove
2513         events every 100ms. This could cause serious scrolling stutter.
2514         
2515         Fix by changing when we drop back to sending events every 250ms, rather than every
2516         100ms: if the slowest mousemove takes 10ms or more (less than one frame), drop back
2517         to a 250ms fake move interval.
2518
2519         * page/EventHandler.cpp:
2520         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2521
2522 2013-08-07  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2523
2524         [rendering] Implement PaintInfo interfaces
2525         https://bugs.webkit.org/show_bug.cgi?id=119388
2526
2527         Reviewed by Benjamin Poulain.
2528
2529         In discussion in IRC, it was decided to remove this comment since implementing such change
2530         would have a vast impact on rendering classes.
2531
2532         * rendering/PaintInfo.h:
2533
2534 2013-08-07  Dean Jackson  <dino@apple.com>
2535
2536         Don't remove contents layer from its parent unless necessary
2537         https://bugs.webkit.org/show_bug.cgi?id=119560
2538
2539         Reviewed by Simon Fraser.
2540
2541         RenderLayerBacking::updateInternalHierarchy() is called in some
2542         instances where there doesn't need to be a complete reparenting of the
2543         the m_graphicsLayer. For example, on OS X when the user changes the
2544         scrollbar styles to/from always visible. We don't need to always
2545         remove the graphics layer from its parent - any reparenting does that
2546         automatically.
2547
2548         Unfortunately we can't trigger this situation in an automated test.
2549
2550         * rendering/RenderLayerBacking.cpp:
2551         (WebCore::RenderLayerBacking::updateInternalHierarchy): Don't call removeFromParent().
2552
2553 2013-08-07  Tim Horton  <timothy_horton@apple.com>
2554
2555         Fall out of simple image layer optimization if the image has EXIF rotation
2556         https://bugs.webkit.org/show_bug.cgi?id=119535
2557         <rdar://problem/14071174>
2558
2559         Reviewed by Simon Fraser.
2560
2561         Test: fast/images/exif-orientation-composited.html
2562
2563         * platform/graphics/BitmapImage.cpp:
2564         (WebCore::BitmapImage::frameOrientationAtIndex):
2565         Ensure that the frame is cached if we're requesting the orientation,
2566         so we can acquire orientation information at any given time.
2567
2568         * platform/mac/DragImageMac.mm:
2569         (WebCore::createDragImageFromImage):
2570         * platform/graphics/BitmapImage.h:
2571         Rename currentFrameOrientation to frameOrientationForCurrentFrame to match
2572         the similarly-behaving nativeImageForCurrentFrame.
2573
2574         * platform/graphics/Image.h:
2575         (WebCore::Image::orientationForCurrentFrame): Added. Virtual, overriden by BitmapImage.
2576
2577         * rendering/RenderLayerBacking.cpp:
2578         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2579         If the given image has a non-default image orientation, don't use direct compositing.
2580
2581 2013-08-07  Antti Koivisto  <antti@apple.com>
2582
2583         fast/frames/seamless/seamless-custom-font-pruning-crash.html asserts
2584         https://bugs.webkit.org/show_bug.cgi?id=119557
2585
2586         Rubber-stamped by Eric Carlson.
2587         
2588         Pass Style::Detach style change to seamless document as Style::Force. Style::resolveTree does not expect to be called with Detach.
2589
2590         * html/HTMLIFrameElement.cpp:
2591         (WebCore::HTMLIFrameElement::didRecalcStyle):
2592
2593 2013-08-07  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2594
2595         Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
2596         https://bugs.webkit.org/show_bug.cgi?id=115354
2597
2598         Reviewed by Philippe Normand.
2599
2600         The default value for the HTTP "Accept-Encoding:" header field in the request allows
2601         compressed data to be received on requests.
2602         While this works fine for most cases, it can break the webkit source that needs to rely on the
2603         the proper data size when receiving the response (even though the received data is already
2604         uncompressed the size reported in ResourceResponse::expectedContentLength() is the same
2605         represented by the HTTP header field "Content-Length" which is the size of the compressed data).
2606
2607         This patch disables the HTTP "Accept-Encoding:" header field when using the request
2608         as we don't want the received response to be encoded in any way, as we need to rely on the proper
2609         size of the returned data on ResourceHandle::didReceiveResponse().
2610
2611         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2612         (webKitWebSrcStart):
2613         * platform/network/soup/ResourceRequest.h:
2614         (ResourceRequestBase):
2615         (WebCore::ResourceRequest::acceptEncoding):
2616         (WebCore::ResourceRequest::setAcceptEncoding):
2617         (WebCore::ResourceRequest::ResourceRequestBase):
2618         * platform/network/soup/ResourceRequestSoup.cpp:
2619         (WebCore::ResourceRequest::updateSoupMessage):
2620         (WebCore::ResourceRequest::toSoupMessage):
2621
2622 2013-08-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2623
2624         [Qt] REGRESSION(r) Two pixel result fail after r153522
2625         https://bugs.webkit.org/show_bug.cgi?id=119392
2626
2627         Reviewed by Jocelyn Turcotte.
2628
2629         Consider scaling transform on the painter to determine final destination size.
2630
2631         Covered by existing tests.
2632
2633         * platform/graphics/qt/ImageQt.cpp:
2634         (WebCore::prescaleImageIfRequired):
2635         (WebCore::BitmapImage::draw):
2636
2637 2013-08-07  Antti Koivisto  <antti@apple.com>
2638
2639         2.5% regression on page cycler moz
2640         https://bugs.webkit.org/show_bug.cgi?id=102822
2641
2642         Reviewed by Andreas Kling.
2643
2644         DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
2645         documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces 
2646         with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
2647         unnecessary work.
2648
2649         * dom/DocumentStyleSheetCollection.cpp:
2650         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
2651         
2652             Check that we actually have cached injected stylesheets before triggering style recalc.
2653             
2654         * page/PageGroup.cpp:
2655         (WebCore::PageGroup::addUserStyleSheetToWorld):
2656         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
2657         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
2658         (WebCore::PageGroup::removeAllUserContent):
2659         
2660             Fix a misspelling.
2661
2662         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
2663         
2664             Always invalidate style when user sheets change since we don't do that in
2665             DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
2666
2667         * page/PageGroup.h:
2668
2669 2013-08-07  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2670
2671         Do no check seek offset against internal size on gstreamer source element
2672         https://bugs.webkit.org/show_bug.cgi?id=116533
2673
2674         Reviewed by Philippe Normand.
2675
2676         The internal size on gstreamer source element may be wrong in case the received size in
2677         didReceiveResponse is not accurate. Lets just try to seek and let it fail if necessary.
2678
2679         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2680         (webKitWebSrcSeekDataCb):
2681
2682 2013-08-07  Antti Koivisto  <antti@apple.com>
2683
2684         Create WebCore/style and move StyleResolveTree there
2685         https://bugs.webkit.org/show_bug.cgi?id=119543
2686
2687         Reviewed by Andreas Kling.
2688
2689         WebCore/css is bloated. We should move the internal style representation and the style resolver
2690         related code to a directory of their own. CSS language related code including parser and 
2691         CSSOM stays under css.
2692
2693         Things named StyleFoo should generally move under WebCore/style. They should also be moved to
2694         the Style namespace at the same time.
2695
2696         * CMakeLists.txt:
2697         * GNUmakefile.am:
2698         * GNUmakefile.list.am:
2699         * WebCore.pri:
2700         * Target.pri:
2701         * WebCore.vcxproj/WebCore.vcxproj:
2702         * WebCore.vcxproj/WebCoreCommon.props:
2703         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2704         * WebCore.xcodeproj/project.pbxproj:
2705         * css/StyleResolveTree.cpp: Removed.
2706         * css/StyleResolveTree.h: Removed.
2707         * style: Added.
2708         * style/StyleResolveTree.cpp: Copied from Source/WebCore/css/StyleResolveTree.cpp.
2709         * style/StyleResolveTree.h: Copied from Source/WebCore/css/StyleResolveTree.h.
2710
2711 2013-08-07  Antti Koivisto  <antti@apple.com>
2712
2713         Move style recalculation out from Element
2714         https://bugs.webkit.org/show_bug.cgi?id=119497
2715
2716         Reviewed by Andreas Kling.
2717
2718         Element currently does too much. Element::recalcStyle() and the related functions can be turned into
2719         standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
2720         for example making style recalculation non-recursive.
2721
2722         * WebCore.xcodeproj/project.pbxproj:
2723         * css/StyleResolveTree.cpp: Added.
2724         (WebCore::Style::determineChange):
2725                 
2726             - moved and renamed from Node::diff
2727             - factored to use early return style
2728             - simplifield the null input logic
2729
2730         (WebCore::Style::pseudoStyleCacheIsInvalid):
2731         
2732             - moved from Element::pseudoStyleCacheIsInvalid
2733             - narrowed to take RenderObject rather than operate on Element
2734
2735         (WebCore::Style::resolveLocal):
2736         
2737             - split from Element::recalcStyle
2738             - factored to use early return style
2739
2740         (WebCore::Style::resolveTree):
2741         
2742             - moved and renamed from Element::recalcStyle
2743
2744         * css/StyleResolveTree.h: Added.
2745         
2746             - introcuduce Style namespace for style related classes and functions
2747             - move and rename Node::StyleChange -> Style::Change
2748
2749         * css/StyleResolver.h:
2750         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
2751         (WebCore::StyleResolverParentPusher::push):
2752         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
2753         
2754             Moved this stack helper to StyleResolver.h for now since it is needed by both
2755             StyleRecalculation and Element.
2756
2757         * dom/Document.cpp:
2758         (WebCore::Document::recalcStyle):
2759         (WebCore::Document::updateStyleIfNeeded):
2760         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
2761         (WebCore::Document::attach):
2762         (WebCore::Document::styleResolverChanged):
2763         (WebCore::Document::webkitWillEnterFullScreenForElement):
2764         * dom/Document.h:
2765         * dom/Element.cpp:
2766         (WebCore::shouldIgnoreAttributeCase):
2767         (WebCore::Element::updatePseudoElement):
2768         (WebCore::Element::resetComputedStyle):
2769         (WebCore::Element::willRecalcStyle):
2770         (WebCore::Element::didRecalcStyle):
2771         * dom/Element.h:
2772         
2773             - remove Element::recalcStyle
2774             - make a few private functions needed by StyleRecalculation public
2775
2776         * dom/ElementShadow.cpp:
2777         (WebCore::ElementShadow::recalcStyle):
2778         * dom/ElementShadow.h:
2779         * dom/Node.cpp:
2780         * dom/Node.h:
2781
2782             - remove Node::StyleChange
2783             - remove Node::diff
2784
2785         * dom/PseudoElement.cpp:
2786         (WebCore::PseudoElement::didRecalcStyle):
2787         * dom/PseudoElement.h:
2788         * dom/ShadowRoot.cpp:
2789         (WebCore::ShadowRoot::recalcStyle):
2790         (WebCore::ShadowRoot::setResetStyleInheritance):
2791         * dom/ShadowRoot.h:
2792         * dom/Text.cpp:
2793         (WebCore::Text::recalcTextStyle):
2794         * dom/Text.h:
2795         * html/HTMLFormControlElement.cpp:
2796         (WebCore::HTMLFormControlElement::didRecalcStyle):
2797         * html/HTMLFormControlElement.h:
2798         * html/HTMLFrameSetElement.cpp:
2799         (WebCore::HTMLFrameSetElement::willRecalcStyle):
2800         * html/HTMLFrameSetElement.h:
2801         * html/HTMLIFrameElement.cpp:
2802         (WebCore::HTMLIFrameElement::didRecalcStyle):
2803         * html/HTMLIFrameElement.h:
2804         * html/HTMLMediaElement.cpp:
2805         (WebCore::HTMLMediaElement::didRecalcStyle):
2806         * html/HTMLMediaElement.h:
2807         * html/HTMLOptionElement.cpp:
2808         (WebCore::HTMLOptionElement::didRecalcStyle):
2809         * html/HTMLOptionElement.h:
2810         * html/HTMLPlugInImageElement.cpp:
2811         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2812         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
2813         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
2814         * html/HTMLPlugInImageElement.h:
2815         * inspector/InspectorOverlay.cpp:
2816         (WebCore::InspectorOverlay::update):
2817         * loader/DocumentWriter.cpp:
2818         (WebCore::DocumentWriter::reportDataReceived):
2819         * page/Frame.cpp:
2820         (WebCore::Frame::setPageAndTextZoomFactors):
2821         * page/Page.cpp:
2822         (WebCore::Page::setPageScaleFactor):
2823         * rendering/RenderBlock.cpp:
2824         (WebCore::RenderBlock::updateFirstLetterStyle):
2825         * svg/SVGElement.cpp:
2826         (WebCore::SVGElement::willRecalcStyle):
2827         * svg/SVGElement.h:
2828         * svg/SVGUseElement.cpp:
2829         (WebCore::SVGUseElement::willRecalcStyle):
2830         * svg/SVGUseElement.h:
2831
2832 2013-08-07  Mihnea Ovidenie  <mihnea@adobe.com>
2833
2834         [CSSRegions] Wrong auto-height region computation for nested named flows
2835         https://bugs.webkit.org/show_bug.cgi?id=119517
2836
2837         Reviewed by David Hyatt.
2838
2839         Test: fast/regions/abspos-autoheight-nested-region.html
2840
2841         In the case of an (inner) auto-height region that is absolutely positioned in a named flow that is displayed in an (outer) auto-height region,
2842         when we are doing the layout for the named flow we need to add a "forced region break" also for the case of simplified layout, otherwise
2843         the outer auto-height region will not get the chance to compute its auto-height, ending up with a huge value that was used to initialize
2844         the auto-height computed value before the start of the layout algorithm.
2845
2846         * rendering/RenderBlock.cpp:
2847         (WebCore::RenderBlock::simplifiedLayout):
2848
2849 2013-08-06  Stephanie Lewis  <slewis@apple.com>
2850
2851         Update Order Files for Safari
2852         <rdar://problem/14517392>
2853
2854         Unreviewed.
2855
2856         No change in functionality.
2857
2858         * WebCore.order:
2859
2860 2013-08-04  Sam Weinig  <sam@webkit.org>
2861
2862         Remove support for HTML5 Microdata
2863         https://bugs.webkit.org/show_bug.cgi?id=119480
2864
2865         Reviewed by Anders Carlsson.
2866
2867         * CMakeLists.txt:
2868         * Configurations/FeatureDefines.xcconfig:
2869         * DerivedSources.cpp:
2870         * DerivedSources.make:
2871         * DerivedSources.pri:
2872         * GNUmakefile.list.am:
2873         * Target.pri:
2874         * UseJSC.cmake:
2875         * WebCore.vcxproj/WebCore.vcxproj:
2876         * WebCore.vcxproj/WebCore.vcxproj.filters:
2877         * WebCore.xcodeproj/project.pbxproj:
2878         * bindings/gobject/GNUmakefile.am:
2879         * bindings/js/JSBindingsAllInOne.cpp:
2880         * bindings/js/JSHTMLCollectionCustom.cpp:
2881         (WebCore::JSHTMLCollection::nameGetter):
2882         * bindings/js/JSHTMLElementCustom.cpp:
2883         * bindings/js/JSMicroDataItemValueCustom.cpp: Removed.
2884         * bindings/scripts/CodeGeneratorJS.pm:
2885         (GenerateImplementation):
2886         * dom/Document.cpp:
2887         * dom/Document.h:
2888         * dom/Document.idl:
2889         * dom/Element.cpp:
2890         (WebCore::Element::ensureCachedHTMLCollection):
2891         * dom/LiveNodeList.cpp:
2892         (WebCore::LiveNodeListBase::rootNode):
2893         (WebCore::LiveNodeListBase::invalidateCache):
2894         (WebCore::LiveNodeList::namedItem):
2895         * dom/LiveNodeList.h:
2896         (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
2897         * dom/MicroDataItemList.cpp: Removed.
2898         * dom/MicroDataItemList.h: Removed.
2899         * dom/Node.cpp:
2900         * dom/Node.h:
2901         * dom/NodeRareData.cpp:
2902         * dom/NodeRareData.h:
2903         * dom/PropertyNodeList.cpp: Removed.
2904         * dom/PropertyNodeList.h: Removed.
2905         * dom/PropertyNodeList.idl: Removed.
2906         * html/CollectionType.h:
2907         * html/HTMLAnchorElement.cpp:
2908         * html/HTMLAnchorElement.h:
2909         * html/HTMLAreaElement.cpp:
2910         * html/HTMLAreaElement.h:
2911         * html/HTMLCollection.cpp:
2912         (WebCore::shouldOnlyIncludeDirectChildren):
2913         (WebCore::rootTypeFromCollectionType):
2914         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
2915         (WebCore::isMatchingElement):
2916         (WebCore::LiveNodeListBase::item):
2917         * html/HTMLElement.cpp:
2918         (WebCore::HTMLElement::parseAttribute):
2919         (WebCore::HTMLElement::isURLAttribute):
2920         * html/HTMLElement.h:
2921         * html/HTMLElement.idl:
2922         * html/HTMLEmbedElement.cpp:
2923         * html/HTMLEmbedElement.h:
2924         * html/HTMLIFrameElement.cpp:
2925         * html/HTMLIFrameElement.h:
2926         * html/HTMLImageElement.cpp:
2927         * html/HTMLImageElement.h:
2928         * html/HTMLLinkElement.cpp:
2929         * html/HTMLLinkElement.h:
2930         * html/HTMLMediaElement.cpp:
2931         * html/HTMLMediaElement.h:
2932         * html/HTMLMetaElement.cpp:
2933         * html/HTMLMetaElement.h:
2934         * html/HTMLObjectElement.cpp:
2935         * html/HTMLObjectElement.h:
2936         * html/HTMLPropertiesCollection.cpp: Removed.
2937         * html/HTMLPropertiesCollection.h: Removed.
2938         * html/HTMLPropertiesCollection.idl: Removed.
2939         * html/HTMLSourceElement.cpp:
2940         * html/HTMLSourceElement.h:
2941         * html/HTMLTrackElement.cpp:
2942         * html/HTMLTrackElement.h:
2943         * html/MicroDataAttributeTokenList.cpp: Removed.
2944         * html/MicroDataAttributeTokenList.h: Removed.
2945         * html/MicroDataItemValue.cpp: Removed.
2946         * html/MicroDataItemValue.h: Removed.
2947         * html/MicroDataItemValue.idl: Removed.
2948
2949 2013-08-06  Tim Horton  <timothy_horton@apple.com>
2950
2951         Remove PlatformCALayer::contentsTransform and ::setContentsTransform
2952         https://bugs.webkit.org/show_bug.cgi?id=119529
2953
2954         Reviewed by Sam Weinig.
2955
2956         No new tests, removing dead code.
2957
2958         These methods are not used and are currently unimplemented.
2959
2960         * platform/graphics/ca/PlatformCALayer.h:
2961         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2962         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2963
2964 2013-08-06  Alex Christensen  <achristensen@apple.com>
2965
2966         Moved GraphicsContext3DPrivate out of cairo directory to be used by the AppleWin port.
2967         https://bugs.webkit.org/show_bug.cgi?id=119525
2968
2969         Reviewed by Dean Jackson.
2970
2971         * GNUmakefile.list.am:
2972         * PlatformGTK.cmake:
2973         * WebCore.vcxproj/WebCore.vcxproj:
2974         * WebCore.vcxproj/WebCore.vcxproj.filters:
2975         Changed location of GraphicsContext3DPrivate.cpp and GraphicsContext3DPrivate.h.
2976         * platform/graphics/GraphicsContext3DPrivate.cpp: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp.
2977         * platform/graphics/GraphicsContext3DPrivate.h: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h.
2978         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: Removed.
2979         * platform/graphics/cairo/GraphicsContext3DPrivate.h: Removed.
2980
2981 2013-08-06  Brent Fulgham  <bfulgham@apple.com>
2982
2983         [Windows] Unreviewed build correction after r153754 and r153757.
2984
2985         * page/animation/CSSPropertyAnimation.cpp:
2986         (WebCore::blendFunc): Don't force std::remainder, since we are using our own
2987         custom implementation on Windows.
2988
2989 2013-08-06  Brent Fulgham  <bfulgham@apple.com>
2990
2991         Improper Calculation of In-band Cue Colors
2992         https://bugs.webkit.org/show_bug.cgi?id=119523
2993
2994         Reviewed by Eric Carlson.
2995
2996         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2997         (WebCore::makeRGBA32FromARGBCFArray): Remove redundant multiplication by
2998         255.  The internal conversion logic already converts to bytes.
2999
3000 2013-08-06  Rob Buis  <rwlbuis@webkit.org>
3001
3002         Speculative build fix after r153754.
3003
3004         * page/animation/CSSPropertyAnimation.cpp:
3005         (WebCore::blendFunc):
3006
3007 2013-07-23  David Farler  <dfarler@apple.com>
3008
3009         Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
3010         https://bugs.webkit.org/show_bug.cgi?id=117762
3011
3012         Reviewed by Mark Rowe.
3013
3014         No new tests necessary.
3015
3016         * Configurations/DebugRelease.xcconfig:
3017         Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
3018         * Configurations/WebCore.xcconfig:
3019         Add ASAN_OTHER_LDFLAGS.
3020         * Configurations/WebCoreTestShim.xcconfig:
3021         Add ASAN_OTHER_LDFLAGS.
3022         * Configurations/WebCoreTestSupport.xcconfig:
3023         Add ASAN_OTHER_LDFLAGS.
3024         * WebCore.xcodeproj/project.pbxproj:
3025         Don't use ASAN for build tools.
3026
3027 2013-08-05  Rob Buis  <rwlbuis@webkit.org>
3028
3029         SVG stroke-dasharray is not animatable
3030         https://bugs.webkit.org/show_bug.cgi?id=118574
3031
3032         Reviewed by Dirk Schulze.
3033
3034         Make stroke-dasharray a property that can be animated using CSS transitions.
3035
3036         * page/animation/CSSPropertyAnimation.cpp:
3037         (WebCore::blendFunc):
3038         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
3039         * rendering/style/RenderStyle.h:
3040
3041 2013-08-06  Sergio Villar Senin  <svillar@igalia.com>
3042
3043         [CSS Grid Layout] Allow defining named grid lines on the grid element
3044         https://bugs.webkit.org/show_bug.cgi?id=118255
3045
3046         Reviewed by Andreas Kling.
3047
3048         From Blink r149798 by <jchaffraix@chromium.org>
3049
3050         This change adds parsing, style resolution and getComputedStyle
3051         support for named grid lines at the grid element level
3052         (i.e. extends our <track-list> support). Per the specification, we
3053         allow multiple grid lines with the same name.
3054
3055         To fully support resolving the grid lines to a position on our
3056         grid, we need to add the parsing at the grid item's level (which
3057         means extending our <grid-line> support). This will be done in a
3058         follow-up change.
3059
3060         Test: fast/css-grid-layout/named-grid-line-get-set.html
3061
3062         * css/CSSComputedStyleDeclaration.cpp:
3063         (WebCore::addValuesForNamedGridLinesAtIndex):
3064         (WebCore::valueForGridTrackList):
3065         (WebCore::ComputedStyleExtractor::propertyValue):
3066         * css/CSSParser.cpp:
3067         (WebCore::CSSParser::parseGridTrackList):
3068         * css/StyleResolver.cpp:
3069         (WebCore::createGridTrackList):
3070         (WebCore::StyleResolver::applyProperty):
3071         * rendering/style/RenderStyle.h:
3072         * rendering/style/StyleGridData.cpp:
3073         (WebCore::StyleGridData::StyleGridData):
3074         * rendering/style/StyleGridData.h:
3075         (WebCore::StyleGridData::operator==):
3076
3077 2013-08-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3078
3079         [Qt] Fix minimal build.
3080
3081         Unreviewed build fix.
3082
3083         Fix build witt XSLT disabled
3084
3085         * xml/parser/XMLDocumentParserLibxml2.cpp:
3086         (WebCore::hasNoStyleInformation):
3087
3088 2013-08-06  Zan Dobersek  <zdobersek@igalia.com>
3089
3090         webkit-gtk fails to build with bison-3.0
3091         https://bugs.webkit.org/show_bug.cgi?id=119373
3092
3093         Reviewed by Gustavo Noronha Silva.
3094
3095         * GNUmakefile.am: Remove rules for generating ANGLE's glslang source files with Bison.
3096
3097 2013-06-26  Sergio Villar Senin  <svillar@igalia.com>
3098
3099         [CSS Grid Layout] Add support for parsing <grid-line> that includes a 'span'
3100         https://bugs.webkit.org/show_bug.cgi?id=118051
3101
3102         Reviewed by Andreas Kling.
3103
3104         From Blink r148766 by <jchaffraix@chromium.org>
3105
3106         This adds the parsing, style resolution and getComputedStyle bits
3107         to our code. The rendering code was not made aware of the new type
3108         of GridPosition yet.
3109
3110         * css/CSSComputedStyleDeclaration.cpp:
3111         (WebCore::valueForGridPosition):
3112         * css/CSSParser.cpp:
3113         (WebCore::CSSParser::parseValue):
3114         (WebCore::CSSParser::parseGridPosition):
3115         * css/CSSParser.h:
3116         * css/CSSValueKeywords.in:
3117         * css/StyleResolver.cpp:
3118         (WebCore::StyleResolver::adjustRenderStyle):
3119         (WebCore::StyleResolver::adjustGridItemPosition):
3120         (WebCore::createGridPosition):
3121         * css/StyleResolver.h:
3122         * rendering/RenderGrid.cpp:
3123         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3124         * rendering/style/GridPosition.h:
3125         (WebCore::GridPosition::isInteger):
3126         (WebCore::GridPosition::isSpan):
3127         (WebCore::GridPosition::setSpanPosition):
3128         (WebCore::GridPosition::spanPosition):
3129
3130 2013-06-25  Sergio Villar Senin  <svillar@igalia.com>
3131
3132         [CSS Grid Layout] Rename grid placement properties
3133         https://bugs.webkit.org/show_bug.cgi?id=117878
3134
3135         Reviewed by Andreas Kling.
3136
3137         Renamed the grid placement properties to match the latest version
3138         of the spec. The new names are -webkit-grid-column-{start|end} and
3139         -webkit-grid-row-{start|end}.
3140
3141         No new tests needed as we're just renaming some properties,
3142         functionality already covered by existing tests in
3143         fast/css-grid-layout.
3144
3145         * css/CSSComputedStyleDeclaration.cpp:
3146         (WebCore::ComputedStyleExtractor::propertyValue):
3147         * css/CSSParser.cpp:
3148         (WebCore::CSSParser::parseValue):
3149         * css/CSSProperty.cpp:
3150         (WebCore::CSSProperty::isInheritedProperty):
3151         * css/CSSPropertyNames.in:
3152         * css/StylePropertyShorthand.cpp:
3153         (WebCore::webkitGridColumnShorthand):
3154         (WebCore::webkitGridRowShorthand):
3155         * css/StyleResolver.cpp:
3156         (WebCore::StyleResolver::applyProperty):
3157         * rendering/RenderGrid.cpp:
3158         (WebCore::RenderGrid::maximumIndexInDirection):
3159         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3160         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3161         * rendering/RenderGrid.h:
3162         * rendering/style/RenderStyle.h:
3163         * rendering/style/StyleGridItemData.cpp:
3164         (WebCore::StyleGridItemData::StyleGridItemData):
3165         * rendering/style/StyleGridItemData.h:
3166         (WebCore::StyleGridItemData::operator==):
3167
3168 2013-08-05  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
3169
3170         [WebGL] validateRenderingState method name change
3171         https://bugs.webkit.org/show_bug.cgi?id=119485
3172
3173         According to validateRenderingState method functionality its name should be
3174         changed. This method validates only vertex attributes.
3175
3176         Reviewed by Dean Jackson.
3177
3178         No new tests. Covered by existing tests. No changes in functionality.
3179
3180         * html/canvas/WebGLRenderingContext.cpp:
3181         (WebCore::WebGLRenderingContext::validateVertexAttributes):
3182         (WebCore::WebGLRenderingContext::drawArrays):
3183         (WebCore::WebGLRenderingContext::drawElements):
3184         * html/canvas/WebGLRenderingContext.h:
3185
3186 2013-07-27  Mark Rowe  <mrowe@apple.com>
3187
3188         Logging should be configurable using human-readable channel names rather than crazy bitmasks
3189         <http://webkit.org/b/119031>
3190
3191         Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
3192         and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
3193
3194         Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
3195         "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
3196         being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
3197         for history and loading being enabled.
3198
3199         For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
3200         the old user defaults to remain set for those people that need to switch between version of WebKit before and
3201         after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
3202         the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
3203
3204         For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
3205         consistency with the other platforms and to enable more code sharing.
3206
3207         While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
3208         adding a new logging channel. Now only the header in the relevant project needs to be updated.
3209
3210         Reviewed by Sam Weinig.
3211
3212         * GNUmakefile.list.am: Remove the now-unused InitializeLogging.h
3213         * Target.pri: Ditto.
3214         * WebCore.xcodeproj/project.pbxproj: Ditto.
3215         * platform/InitializeLogging.h: Removed. Ditto.
3216         * platform/Logging.cpp: Use WEBCORE_LOG_CHANNELS to define all of the channels.
3217         (WebCore::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
3218         to find a log channel rather than repeating the names of the log channels a further two times each.
3219         (WebCore::initializeLoggingChannelsIfNecessary): Pass the channels and the log level string to the new
3220         WTF function that handles the initialization.
3221         * platform/Logging.h: Declare a WEBCORE_LOG_CHANNELS macro that can be used to apply a preprocessor macro
3222         across the set of all logging channels. Use this macro to declare the logging channels.
3223         * platform/blackberry/LoggingBlackBerry.cpp:
3224         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
3225         * platform/efl/LoggingEfl.cpp:
3226         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
3227         NotYetImplemented to it so that that channel will be enabled by default.
3228         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3229         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Accommodate the rename to logChannelByName.
3230         * platform/gtk/LoggingGtk.cpp:
3231         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
3232         NotYetImplemented to it so that that channel will be enabled by default.
3233         * platform/mac/LoggingMac.mm:
3234         (WebCore::logLevelString): Pull the value out of the WebCoreLogging user default key.
3235         * platform/qt/LoggingQt.cpp:
3236         (WebCore::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable, and then prepend
3237         NotYetImplemented to it so that the channel will be enabled by default.
3238         * platform/win/LoggingWin.cpp:
3239         (WebCore::logLevelString): Pull the value out of the WebCoreLogging environment variable.
3240
3241 2013-08-05  Ryosuke Niwa  <rniwa@webkit.org>
3242
3243         Editor::updateMarkersForWordsAffectedByEditing(bool) shouldn't compute start and end of words when there are nor markers
3244         https://bugs.webkit.org/show_bug.cgi?id=119501
3245
3246         Reviewed by Enrica Casucci.
3247
3248         Exit early in updateMarkersForWordsAffectedByEditing before calling startOfWord and endOfWord if there are no document markers.
3249
3250         * dom/DocumentMarkerController.h:
3251         (WebCore::DocumentMarkerController::hasMarkers): Added.
3252         * editing/Editor.cpp:
3253         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
3254
3255 2013-08-05  Dean Jackson  <dino@apple.com>
3256
3257         Update HTMLPreloadScanner to handle img srcset
3258         https://bugs.webkit.org/show_bug.cgi?id=119360
3259
3260         Reviewed by Sam Weinig.
3261
3262         This patch is a merge of similar patches from Yoav Weiss <yoav@yoav.ws>
3263         and Dean Jackson.
3264
3265         Test: fast/preloader/image-srcset.html
3266
3267         * html/HTMLImageElement.cpp:
3268         (WebCore::HTMLImageElement::parseAttribute): Move srcset parsing into
3269         HTMLParserIdioms, and call it when we hit src or srcset.
3270         * html/HTMLImageElement.h: Remove code that was moved to HTMLParserIdioms.
3271
3272         * html/parser/HTMLDocumentParser.cpp:
3273         (WebCore::HTMLDocumentParser::pumpTokenizer): Pass device scale into preloader.
3274         (WebCore::HTMLDocumentParser::insert):
3275
3276         * html/parser/HTMLPreloadScanner.cpp:
3277         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Takes device scale as a parameter.
3278         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Resolve between src and srcSet if necessary.
3279         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add support for srcset attribute.
3280         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): New flag to indicate if we should
3281         replace any existing value.
3282         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Takes device scale.
3283         (WebCore::TokenPreloadScanner::scanCommon): Pass device scale.
3284         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3285         * html/parser/HTMLPreloadScanner.h: New attribute to constructor for device scale. New member
3286         variable on TokenPreloadScanner that holds the srcset value.
3287
3288         * html/parser/HTMLParserIdioms.cpp:
3289         (WebCore::ImageWithScale::operator==): Used for sorting.
3290         (WebCore::compareByScaleFactor): Used for sorting.
3291         (WebCore::bestFitSourceForImageAttributes): New method that takes the code from HTMLImageElement
3292         for parsing src and srcset attributes, and finding the best match.
3293         * html/parser/HTMLParserIdioms.h:
3294
3295 2013-08-05  Oliver Hunt  <oliver@apple.com>
3296
3297         Move TypedArray implementation into JSC
3298         https://bugs.webkit.org/show_bug.cgi?id=119489
3299
3300         Reviewed by Filip Pizlo.
3301
3302         Update WebCore for new location of TypedArray implementation.
3303
3304         * ForwardingHeaders/runtime/ArrayBuffer.h: Added.
3305         * ForwardingHeaders/runtime/ArrayBufferView.h: Added.
3306         * ForwardingHeaders/runtime/Float32Array.h: Added.
3307         * ForwardingHeaders/runtime/Float64Array.h: Added.
3308         * ForwardingHeaders/runtime/Int16Array.h: Added.
3309         * ForwardingHeaders/runtime/Int32Array.h: Added.
3310         * ForwardingHeaders/runtime/Int8Array.h: Added.
3311         * ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
3312         * ForwardingHeaders/runtime/TypedArrayBase.h: Added.
3313         * ForwardingHeaders/runtime/Uint16Array.h: Added.
3314         * ForwardingHeaders/runtime/Uint32Array.h: Added.
3315         * ForwardingHeaders/runtime/Uint8Array.h: Added.
3316         * ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
3317         * Modules/webaudio/AnalyserNode.h:
3318         (WebCore::AnalyserNode::getFloatFrequencyData):
3319         (WebCore::AnalyserNode::getByteFrequencyData):
3320         (WebCore::AnalyserNode::getByteTimeDomainData):
3321         * Modules/webaudio/AsyncAudioDecoder.cpp:
3322         * Modules/webaudio/AsyncAudioDecoder.h:
3323         (WebCore::AsyncAudioDecoder::DecodingTask::audioData):
3324         * Modules/webaudio/AudioBuffer.h:
3325         * Modules/webaudio/AudioContext.cpp:
3326         * Modules/webaudio/AudioParam.h:
3327         * Modules/webaudio/AudioParamTimeline.h:
3328         * Modules/webaudio/PeriodicWave.h:
3329         * Modules/webaudio/RealtimeAnalyser.cpp:
3330         * Modules/webaudio/RealtimeAnalyser.h:
3331         * Modules/webaudio/ScriptProcessorNode.cpp:
3332         * Modules/webaudio/WaveShaperProcessor.h:
3333         * Modules/websockets/ThreadableWebSocketChannel.h:
3334         * Modules/websockets/WebSocket.cpp:
3335         * Modules/websockets/WebSocket.h:
3336         * Modules/websockets/WebSocketChannel.cpp:
3337         * Modules/websockets/WebSocketChannel.h:
3338         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3339         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3340         * WebCore.exp.in:
3341         * bindings/js/JSArrayBufferCustom.cpp:
3342         * bindings/js/JSArrayBufferViewHelper.h:
3343         * bindings/js/JSAudioContextCustom.cpp:
3344         * bindings/js/JSCryptoCustom.cpp:
3345         * bindings/js/JSDictionary.h:
3346         * bindings/js/JSFileReaderCustom.cpp:
3347         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3348         * bindings/js/JSXMLHttpRequestCustom.cpp:
3349         * bindings/js/SerializedScriptValue.cpp:
3350         (WebCore::SerializedScriptValue::transferArrayBuffers):
3351         * bindings/js/SerializedScriptValue.h:
3352         * bindings/scripts/CodeGeneratorJS.pm:
3353         (AddIncludesForType):
3354         (GenerateHeader):
3355         (NativeToJSValue):
3356         * dom/MessageEvent.h:
3357         * fileapi/FileReader.cpp:
3358         * fileapi/FileReader.h:
3359         * fileapi/FileReaderLoader.cpp:
3360         * fileapi/FileReaderLoader.h:
3361         * fileapi/FileReaderSync.cpp:
3362         * fileapi/FileReaderSync.h:
3363         * fileapi/WebKitBlobBuilder.cpp:
3364         * fileapi/WebKitBlobBuilder.h:
3365         * html/HTMLMediaElement.cpp:
3366         * html/ImageData.h:
3367         * html/canvas/ArrayBuffer.idl:
3368         * html/canvas/ArrayBufferView.idl:
3369         * html/canvas/CanvasRenderingContext2D.cpp:
3370         * html/canvas/DataView.h:
3371         * html/canvas/Float32Array.idl:
3372         * html/canvas/Float64Array.idl:
3373         * html/canvas/Int16Array.idl:
3374         * html/canvas/Int32Array.idl:
3375         * html/canvas/Int8Array.idl:
3376         * html/canvas/Uint16Array.idl:
3377         * html/canvas/Uint32Array.idl:
3378         * html/canvas/Uint8Array.idl:
3379         * html/canvas/Uint8ClampedArray.idl:
3380         * html/canvas/WebGLBuffer.h:
3381         (WebCore::WebGLBuffer::elementArrayBuffer):
3382         * html/canvas/WebGLGetInfo.cpp:
3383         * html/canvas/WebGLGetInfo.h:
3384         * html/canvas/WebGLRenderingContext.cpp:
3385         * html/canvas/WebGLRenderingContext.h:
3386         * inspector/InspectorMemoryAgent.cpp:
3387         * page/Crypto.cpp:
3388         * page/Crypto.h:
3389         * platform/graphics/GraphicsContext3D.cpp:
3390         * platform/graphics/ImageBuffer.h:
3391         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3392         * platform/graphics/cg/ImageBufferDataCG.h:
3393         * platform/graphics/filters/FEBlend.cpp:
3394         * platform/graphics/filters/FEColorMatrix.cpp:
3395         * platform/graphics/filters/FEComponentTransfer.cpp:
3396         * platform/graphics/filters/FEComposite.cpp:
3397         * platform/graphics/filters/FEConvolveMatrix.cpp:
3398         * platform/graphics/filters/FECustomFilter.cpp:
3399         * platform/graphics/filters/FEDisplacementMap.cpp:
3400         * platform/graphics/filters/FEDropShadow.cpp:
3401         * platform/graphics/filters/FEGaussianBlur.cpp:
3402         * platform/graphics/filters/FELighting.h:
3403         * platform/graphics/filters/FEMorphology.cpp:
3404         * platform/graphics/filters/FETurbulence.cpp:
3405         * platform/graphics/filters/FilterEffect.cpp:
3406         * platform/graphics/filters/FilterEffect.h:
3407         * platform/graphics/mac/GraphicsContext3DMac.mm:
3408         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3409         * testing/Internals.h:
3410         * xml/XMLHttpRequest.cpp:
3411         * xml/XMLHttpRequest.h:
3412         (WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
3413
3414 2013-08-05  Alexey Proskuryakov  <ap@apple.com>
3415
3416         <rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
3417         of text when dictating an e-mail
3418         https://bugs.webkit.org/show_bug.cgi?id=119496
3419
3420         Reviewed by Ryosuke Niwa.
3421
3422         Test: platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
3423
3424         * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
3425         FloatRect::unite() doesn't preserve empty rects, which we need here.
3426         We alrady handle the case of collapsed range in Editor::firstRectForRange(), and
3427         this is similar, but we can't currently cover both with one simple fix.
3428
3429 2013-08-05  Morten Stenshorne  <mstensho@opera.com>
3430
3431         Region based columns not painted correctly in non-default writing-modes
3432         https://bugs.webkit.org/show_bug.cgi?id=118506
3433
3434         Reviewed by David Hyatt.
3435
3436         The column translation offset was calculated incorrectly.
3437         The dirty rect intersection check was also wrong.
3438
3439         Added some documentation, to make it clear what's going on.
3440
3441         Tests: fast/multicol/newmulticol/hide-box-horizontal-bt.html
3442                fast/multicol/newmulticol/hide-box-vertical-lr.html
3443                fast/multicol/newmulticol/hide-box-vertical-rl.html
3444
3445         * rendering/RenderMultiColumnSet.cpp:
3446         (WebCore::RenderMultiColumnSet::collectLayerFragments):
3447
3448 2013-08-05  Morten Stenshorne  <mstensho@opera.com>
3449
3450         Region based columns not clipped properly
3451         https://bugs.webkit.org/show_bug.cgi?id=118499
3452
3453         Reviewed by David Hyatt.
3454
3455         Need to call RenderRegion::overflowRectForFlowThreadPortion() first,
3456         and THEN clip in the column gaps. overflowRectForFlowThreadPortion()
3457         expands the logical left and right to the flow thread's overflow
3458         rectangle, effectively defeating inline direction clipping completely.
3459
3460         Tests: fast/multicol/newmulticol/clipping-overflow-hidden.html
3461                fast/multicol/newmulticol/clipping-top-overflow.html
3462                fast/multicol/newmulticol/clipping.html
3463
3464         * rendering/RenderMultiColumnSet.cpp:
3465         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3466
3467 2013-08-05  Vivek Galatage  <vivek.vg@samsung.com>
3468
3469         XMLTreeViewer should be created only in the XML viewer mode
3470         https://bugs.webkit.org/show_bug.cgi?id=119483
3471
3472         Reviewed by Alexey Proskuryakov.
3473
3474         XMLTreeViewer is created even for the XSL transform which is avoided by the patch.
3475         The XMLTreeViewer::hasNoStyleInformation() is moved to XMLDocumentParserLibxml2.cpp
3476         as static inline method as XMLTreeViewer should not have the responsibility for it.
3477         Also removes an unnecessary conditional check while deciding for XML viewer mode.
3478
3479         Blink patch review links:
3480         https://codereview.chromium.org/19552003/
3481         https://codereview.chromium.org/22150003/
3482
3483         No new tests as the patch is about code refactoring.
3484
3485         * xml/XMLTreeViewer.cpp:
3486         * xml/XMLTreeViewer.h:
3487         * xml/parser/XMLDocumentParserLibxml2.cpp:
3488         (WebCore::hasNoStyleInformation):
3489         (WebCore::XMLDocumentParser::doEnd):
3490
3491 2013-08-03  Jer Noble  <jer.noble@apple.com>
3492
3493         Loading a video with a custom URL scheme will result in stalling playback
3494         https://bugs.webkit.org/show_bug.cgi?id=119469
3495
3496         Reviewed by Eric Carlson.
3497
3498         Break the assumption that only one AVAssetResourceRequest will be outstanding simultaneously
3499         by storing a HashMap of AVAssetResourceRequests and their resulting WebCoreAVFResourceLoader.
3500         When loading is stopped (due to completion or error), notify the MediaPlayerPrivateAVFoundation
3501         parent so that the map can be emptied.
3502
3503         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3504         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3505         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Store the request
3506             in m_resourceLoaderMap.
3507         (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Pull the request from
3508             m_resourceLoaderMap.
3509         (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Remove the requset from
3510             m_resourceLoaderMap.
3511         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
3512         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3513         (WebCore::WebCoreAVFResourceLoader::create): Return a PassRefPtr, rather than a PassOwnPtr.
3514         (WebCore::WebCoreAVFResourceLoader::stopLoading): Call didStopLoadingRequest.
3515
3516 2013-08-05  Abhijeet Kandalkar  <abhijeet.k@samsung.com>
3517
3518         Spatial Navigation should avoid unwanted calculation while deciding focus candidate.
3519         https://bugs.webkit.org/show_bug.cgi?id=117265
3520
3521         Reviewed by Antonio Gomes.
3522
3523         Spatial Navigation should consider only those nodes as candidate which are exactly in the focus-direction.
3524         e.g. If we are moving down then the nodes that are above CURRENT focused node should be considered as invalid.
3525         Added isValidCandidate() which checks whether node is exactly in the focus-direction.
3526
3527         Test: fast/spatial-navigation/snav-search-optimization.html
3528
3529         * page/FocusController.cpp:
3530         (WebCore::FocusController::findFocusCandidateInContainer):
3531         (WebCore::FocusController::advanceFocusDirectionally):
3532         * page/Page.cpp:
3533         (WebCore::Page::Page):
3534         * page/Page.h:
3535         (WebCore::Page::setLastSpatialNavigationCandidateCount):
3536         (WebCore::Page::lastSpatialNavigationCandidateCount):
3537         * page/SpatialNavigation.cpp:
3538         (WebCore::isValidCandidate):
3539         * page/SpatialNavigation.h:
3540         * testing/Internals.cpp:
3541         (WebCore::Internals::lastSpatialNavigationCandidateCount):
3542         * testing/Internals.h:
3543         * testing/Internals.idl:
3544
3545 2013-08-05  Mihai Tica  <mitica@adobe.com>
3546
3547         [CSS Background Blending] Specifying background-image and background-color
3548         with opaque image doesn't trigger blending. The fix consists of adding a
3549         check whether blend mode is set in hasOpaqueImage.
3550
3551         https://bugs.webkit.org/show_bug.cgi?id=119434
3552
3553         Reviewed by Dirk Schulze.
3554
3555         Test: css3/compositing/background-blend-mode-separate-layer-declaration.html
3556
3557         * rendering/style/FillLayer.cpp:
3558         (WebCore::FillLayer::hasOpaqueImage):
3559
3560 2013-08-04  Zalan Bujtas  <zalan@apple.com>
3561
3562         Background doesn't fully repaint when body has margins.
3563         https://bugs.webkit.org/show_bug.cgi?id=119033
3564
3565         Reviewed by Simon Fraser.
3566
3567         Ensure that background-color changes do not leave unpainted areas when
3568         body has margins.
3569
3570         Both <body> and <html> background-color get propagated up to the viewport.
3571         If <body> has background-color attribute set, while <html> doesn't, the color is
3572         applied not only on the <body> but on both the <html> and the viewport. However,
3573         it's not enough to mark the RenderView dirty because with tiles backing on,
3574         there could be areas outside of the viewport that need repaint. By marking
3575         the RenderView's graphics layer dirty instead, we ensure that all the related
3576         tiles get marked dirty too and the new background color covers all areas.
3577
3578         Manual test added. When forcing top-level composition on (even with embedded iframe to
3579         make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
3580         that the repaint rects don't reflect the functionality difference anymore.
3581
3582         * page/FrameView.cpp:
3583         (WebCore::FrameView::reset):
3584         (WebCore::FrameView::layout):
3585         * page/FrameView.h:
3586         (WebCore::FrameView::needsFullRepaint):
3587         * rendering/RenderBox.cpp:
3588         (WebCore::RenderBox::styleWillChange):
3589         * rendering/RenderObjectChildList.cpp:
3590         (WebCore::RenderObjectChildList::removeChildNode):
3591         * rendering/RenderView.cpp:
3592         (WebCore::RenderView::repaintRootContents):
3593         (WebCore::RenderView::repaintViewAndCompositedLayers):
3594         * rendering/RenderView.h:
3595
3596 2013-08-04  Andreas Kling  <akling@apple.com>
3597
3598         Document needn't expose its active element.
3599         <http://webkit.org/b/119466>
3600
3601         Reviewed by Antonio Gomes.
3602
3603         The Document::m_activeElement pointer is only used inside updateHoverActiveState(),
3604         so we can remove the activeElement()/setActiveElement() accessors.
3605
3606         * dom/Document.h:
3607         * dom/Document.cpp:
3608         (WebCore::Document::updateHoverActiveState):
3609
3610 2013-08-04  Andreas Kling  <akling@apple.com>
3611
3612         Inserting a rule into an empty style sheet shouldn't trigger style recalc unless necessary.
3613         <http://webkit.org/b/119475>
3614         <rdar://problem/14643481>
3615
3616         Reviewed by Antti Koivisto.
3617
3618         This is kind of a cheesy optimization, but it turns out that the use case is quite common.
3619         The pattern goes like this:
3620
3621             (1) Create <style> element.
3622             (2) Add it to the document's <head>.
3623             (3) .addRule() one rule through the CSSOM API.
3624
3625         Prior to this patch, (3) would always cause a full (deferred) style recalc.
3626
3627         Now that we exclude empty style sheets from the document's (effective) active set,
3628         we can piggyback on the style invalidation analysis when transitioning from an empty
3629         sheet to a single-rule sheet.
3630
3631         In other words, add a special code path for the first rule insertion into an empty,
3632         in-document style sheet to minimize the amount of invalidation that happens.
3633
3634         * css/CSSStyleSheet.cpp:
3635         (WebCore::CSSStyleSheet::didMutateRules):
3636         (WebCore::CSSStyleSheet::insertRule):
3637         * css/CSSStyleSheet.h:
3638         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
3639         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
3640
3641 2013-08-04  Claudio Saavedra  <csaavedra@igalia.com>
3642
3643         [GTK] Fix a C++11 warning.
3644
3645         Rubber-stamped by Martin Robinson.
3646
3647         * platform/gtk/FileSystemGtk.cpp:
3648         (WebCore::sharedResourcesPath): Fix a C++11 warning.
3649
3650 2013-08-04  Diego Pino Garcia  <dpino@igalia.com>
3651
3652         [GTK] Remove legacy hack in CodeGeneratorGObject.pm
3653         https://bugs.webkit.org/show_bug.cgi?id=117545
3654
3655         Reviewed by Carlos Garcia Campos.
3656
3657         There's a checking that sets gtype to uint in case it's ushort. gtype 
3658         is a value obtained from GetGValueTypeName(), which never returns 
3659         ushort.
3660
3661         * bindings/scripts/CodeGeneratorGObject.pm:
3662         (GenerateProperty): remove unnecessary glitch
3663
3664 2013-08-04  Andreas Kling  <akling@apple.com>
3665
3666         [Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
3667         <http://webkit.org/b/119474>
3668         <rdar://problem/14643349>
3669
3670         Reviewed by Dan Bernstein.
3671
3672         Disable screen font substitution by default in Settings so internal WebCore clients
3673         such as SVG-as-image will get the right default setting.
3674
3675         * page/Settings.cpp:
3676         (WebCore::Settings::Settings):
3677         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
3678         (WebCore::Settings::setScreenFontSubstitutionEnabled):
3679         * page/Settings.h:
3680         (WebCore::Settings::screenFontSubstitutionEnabled):
3681         * page/Settings.in:
3682         * page/mac/SettingsMac.mm:
3683         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
3684
3685 2013-08-03  Tim Horton  <timothy_horton@apple.com>
3686
3687         Refine the unavailable plug-in indicator
3688         https://bugs.webkit.org/show_bug.cgi?id=119400
3689         <rdar://problem/14616012>
3690
3691         Reviewed by Oliver Hunt.
3692
3693         Add a border, flip the text and background colors, and make the indicator
3694         much higher contrast, to be more visible on a variety of sites.
3695         Also, refine the arrow to be less blocky and inlaid inside a circle.
3696
3697         * rendering/RenderEmbeddedObject.cpp:
3698         (WebCore::replacementTextRoundedRectPressedColor):
3699         (WebCore::replacementTextRoundedRectColor):
3700         (WebCore::replacementTextColor):
3701         (WebCore::unavailablePluginBorderColor):
3702         (WebCore::drawReplacementArrow):
3703         (WebCore::RenderEmbeddedObject::paintReplaced):
3704         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
3705         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
3706         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
3707         * rendering/RenderEmbeddedObject.h:
3708
3709 2013-08-03  Yoav Weiss  <yoav@yoav.ws>
3710
3711         PreloadScanner preloads external CSS with non-matching media attribute
3712         https://bugs.webkit.org/show_bug.cgi?id=106198
3713
3714         Reviewed by Dean Jackson.
3715
3716         Test: http/tests/loading/preload-css-test.html
3717
3718         * html/parser/HTMLPreloadScanner.cpp:
3719         Remove m_linkMediaAttributeIsScreen
3720         Remove MediaQueryEvaluator calls
3721         Add m_mediaAttribute that gets the value of the "media" attribute
3722         Pass m_mediaAttribute to PreloadRequest
3723         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
3724         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
3725         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3726         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
3727         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
3728         * html/parser/HTMLResourcePreloader.cpp:
3729         Add MediaQueryEvaluator calls to see if "media" matches
3730         Perform preload only to resource with a matching media (if media exists)
3731         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
3732         (WebCore::mediaAttributeMatches):
3733         (WebCore::HTMLResourcePreloader::preload):
3734         * html/parser/HTMLResourcePreloader.h:
3735         Add a constructor with a mediaAttribute value
3736         Add m_mediaAttribute & its getter.
3737         (WebCore::PreloadRequest::create):
3738         (WebCore::PreloadRequest::media):
3739         (WebCore::PreloadRequest::PreloadRequest):
3740
3741 2013-08-03  Andreas Kling  <akling@apple.com>
3742
3743         RenderBoxModelObject::firstLetterRemainingText should be a RenderTextFragment*.
3744         <http://webkit.org/b/119181>
3745
3746         Reviewed by Sam Weinig.
3747
3748         De-generalize this code a bit since we know that the firstLetterRemainingText() is always
3749         going to be a RenderTextFragment.
3750
3751         * rendering/RenderBoxModelObject.h:
3752         * rendering/RenderBoxModelObject.cpp:
3753         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
3754         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText):
3755
3756             Make these two deal in RenderTextFragment*.
3757
3758         * rendering/RenderBlock.cpp:
3759         (WebCore::RenderBlock::updateFirstLetterStyle):
3760
3761             Tighten up some pointer types so we don't have to cast as much.
3762
3763 2013-08-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3764
3765         Introduce toSVGMaskElement(), and use it
3766         https://bugs.webkit.org/show_bug.cgi?id=119443
3767
3768         Reviewed by Andreas Kling.
3769
3770         As a step to change static_cast with toSVGXXX, static_cast<SVGMaskElement*> can
3771         be changed with toSVGMaskElement().
3772
3773         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155432
3774
3775         * rendering/svg/RenderSVGResourceMasker.cpp:
3776         (WebCore::RenderSVGResourceMasker::applyResource):
3777         (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
3778         * rendering/svg/RenderSVGResourceMasker.h:
3779         * svg/SVGMaskElement.h:
3780         (WebCore::toSVGMaskElement):
3781
3782 2013-08-02  Benjamin Poulain  <bpoulain@apple.com>
3783
3784         REGRESSION (r153005): Crash in SpaceSplitString::spaceSplitStringContainsValue on Facebook
3785         https://bugs.webkit.org/show_bug.cgi?id=119384
3786
3787         Reviewed by Alexey Proskuryakov.
3788
3789         When removing the "rel" attribute from HTMLAnchorElement, we parse the attribute for no value.
3790         Following r153005, we no longer checked for null String, which caused a crash in that case.
3791
3792         Creating a SpaceSplitString from a null string causes the SpaceSplitString to be null. In that case
3793         SpaceSplitString::contains() would always return false.
3794         This patch modify SpaceSplitString::spaceSplitStringContainsValue() to follow the exact same
3795         behavior.
3796
3797         Test: fast/dom/HTMLAnchorElement/remove-rel-attribute.html
3798
3799         * dom/SpaceSplitString.cpp:
3800         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
3801
3802 2013-08-02  Dean Jackson  <dino@apple.com>
3803
3804         Force elements with perspective or preserve-3d to disallow direct composited backgrounds
3805         https://bugs.webkit.org/show_bug.cgi?id=119462
3806         <rdar://problem/14607548>
3807
3808         Reviewed by Simon Fraser.
3809
3810         Bug 119461 (http://wkb.ug/119461) describes how a directly composited
3811         background color can intersect with its children. It's not clear exactly
3812         what the best way to fix that is, but for the moment we should disallow
3813         any element that has perspective or a preserve-3d transform style from
3814         getting a directly composited background.
3815
3816         Test: compositing/background-color/no-composited-background-color-when-perspective.html
3817
3818         * rendering/RenderLayerBacking.cpp:
3819         (WebCore::hasPerspectiveOrPreserves3D): New static helper.
3820         (WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
3821
3822 2013-08-02  Oliver Hunt  <oliver@apple.com>
3823
3824         Update binding test results
3825
3826         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3827         (WebCore::JSFloat64Array::getOwnPropertySlot):
3828         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
3829         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3830         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
3831         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3832         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
3833
3834 2013-08-02  Gavin Barraclough  <barraclough@apple.com>
3835
3836         Remove no-arguments constructor to PropertySlot
3837         https://bugs.webkit.org/show_bug.cgi?id=119460
3838
3839         Reviewed by Geoff Garen.
3840
3841         This constructor was unsafe if getValue is subsequently called,
3842         and the property is a getter. Simplest to just remove it.
3843
3844         * bindings/js/JSDOMWindowCustom.cpp:
3845         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
3846         (WebCore::DialogHandler::returnValue):
3847         * bindings/js/JSHistoryCustom.cpp:
3848         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
3849         * bindings/js/JSLocationCustom.cpp:
3850         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
3851         * bindings/js/JSPluginElementFunctions.cpp:
3852         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
3853         * bindings/js/JSStorageCustom.cpp:
3854         (WebCore::JSStorage::deleteProperty):
3855         (WebCore::JSStorage::putDelegate):
3856         * bindings/scripts/CodeGeneratorJS.pm:
3857         (GenerateGetOwnPropertyDescriptorBody):
3858         * bridge/runtime_array.cpp:
3859         (JSC::RuntimeArray::getOwnPropertyDescriptor):
3860         * bridge/runtime_method.cpp:
3861         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
3862         * bridge/runtime_object.cpp:
3863         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
3864
3865 2013-08-02  Andreas Kling  <akling@apple.com>
3866
3867         Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
3868         <http://webkit.org/b/119442>
3869         <rdar://problem/14631785>
3870
3871         Reviewed by Antti Koivisto.
3872
3873         Let Document decide whether or not to do a style recalc after a <link> element is removed.
3874         This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
3875
3876         Some Facebook pages have a <link rel="stylesheet" href="data:text/css;base64,"> that gets
3877         removed during the initial page load, causing style recalc.
3878
3879         * html/HTMLLinkElement.cpp:
3880         (WebCore::HTMLLinkElement::removedFrom):
3881
3882             Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
3883             cause a recalc (because it's no longer in the set of active sheets) or do nothing.
3884
3885 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
3886
3887         Remove WebCore folder from include statements
3888         https://bugs.webkit.org/show_bug.cgi?id=119438
3889
3890         Reviewed by Darin Adler.
3891
3892         This aligns the style of the changed files with the other WebCore code.
3893
3894         * platform/network/curl/CurlDownload.cpp:
3895         * platform/network/curl/CurlDownload.h:
3896
3897 2013-08-02  Ryosuke Niwa  <rniwa@webkit.org>
3898
3899         FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
3900         https://bugs.webkit.org/show_bug.cgi?id=119309
3901
3902         Reviewed by Kent Tamura.
3903
3904         Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
3905
3906         I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
3907
3908         * html/FormAssociatedElement.cpp:
3909         (WebCore::FormAssociatedElement::formAttributeChanged):
3910         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
3911
3912 2013-08-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3913
3914         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
3915         https://bugs.webkit.org/show_bug.cgi?id=119316
3916
3917         Reviewed by Ryosuke Niwa.
3918
3919         As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
3920         information even if nodes are disconnected:
3921         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
3922
3923         This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
3924
3925         No new tests, covered by existing tests.
3926
3927         * dom/Node.cpp:
3928         (WebCore::compareDetachedElementsPosition):
3929         (WebCore::Node::compareDocumentPosition):
3930
3931 2013-08-02  Simon Fraser  <simon.fraser@apple.com>
3932
3933         Revert r153632, since it caused fast/forms/change-form-element-document-crash.html
3934         to assert.
3935
3936         * html/FormAssociatedElement.cpp:
3937         (WebCore::FormAssociatedElement::formAttributeChanged):
3938         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
3939
3940 2013-08-02  Mario Sanchez Prada  <mario.prada@samsung.com>
3941
3942         Implement atk_text_get_text_*_offset for WORD
3943         https://bugs.webkit.org/show_bug.cgi?id=114871
3944
3945         Reviewed by Martin Robinson.
3946
3947         Re-implement this functions without using GailTextUtil nor Pango.
3948
3949         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3950         (textForObject): Made the parameter a const, to avoid warnings.
3951         (getSelectionOffsetsForObject): Add special cases for END boundaries.
3952         (emptyTextSelectionAtOffset): Convenience function to be used in
3953         early returns from functions returning both text and offsets.
3954         (webkitAccessibleTextGetChar): Use emptyTextSelectionAtOffset(),
3955         and remove checks that are now done outside of this function, in
3956         webkitAccessibleTextGetTextForOffset().
3957         (nextWordStartPosition): Helper function to reliably find the
3958         start of the next word as and user would do it by navigating with
3959         Ctrl and the arrows (considering spaces and punctuation).
3960         (previousWordEndPosition): Similar to nextWordStartPosition, but
3961         written to help find the end of the previous one.
3962         (wordAtPositionForAtkBoundary): Helper function to find the word
3963         at a given position considering values of AtkTextBoundary.
3964         (numberOfReplacedElementsBeforeOffset): Helper function to help
3965         figure out how many embedded objects we have exposed for an
3966         AtkText object, used to adjust offsets coming from outside.
3967         (webkitAccessibleTextGetWordForBoundary): New function,
3968         implementing atk_text_get_text_*_offset for WORD.
3969         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
3970         WORD boundaries with webkitAccessibleTextGetWordForBoundary().
3971         Also, moved the initialization of the start and end offsets to the
3972         bottom, into the gail/pango section, since those values will be
3973         from now on initialized in getSelectionOffsetsForObject().
3974         (webkitAccessibleTextGetSelection): Removed the initialization of
3975         the start and end offsets, since those values will be from now on
3976         initialized in getSelectionOffsetsForObject().
3977
3978 2013-08-02  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3979
3980         Buildfix for !ENABLE(SVG) platforms after r153581.
3981         https://bugs.webkit.org/show_bug.cgi?id=119444
3982
3983         Reviewed by Andreas Kling.
3984
3985         Adding missing guards.
3986
3987         * css/StylePropertyShorthand.cpp:
3988         (WebCore::matchingShorthandsForLonghand):
3989         * css/StylePropertyShorthand.h:
3990
3991 2013-08-02  Brady Eidson  <beidson@apple.com>
3992
3993         REGRESSION (r130783): Scrolling is broken going back to a cached page from a page that still has outstanding subresources.
3994         <rdar://problem/14601124> and https://bugs.webkit.org/show_bug.cgi?id=119416
3995
3996         Reviewed by Darin Adler.
3997
3998         Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
3999
4000         * loader/DocumentLoader.cpp:
4001         (WebCore::DocumentLoader::stopLoading): Always explicitly cancel the Document parser when stopLoading is called.
4002
4003 2013-08-02  Antoine Quint  <graouts@apple.com>
4004
4005         <input type="search"> doesn't correctly handle the "size" attribute
4006         https://bugs.webkit.org/show_bug.cgi?id=119174
4007
4008         We weren't taking into account the decorations for search fields (results and close buttons)
4009         when computing the preferred logical width for these fields based on the "size" attribute
4010         and as a result we would not guarantee that we could show the number of characters set by
4011         the "size" attribute.
4012
4013         To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
4014         method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
4015         and have NumberInputType and SearchInputType return custom decoration widths.
4016
4017         Reviewed by Darin Adler.
4018
4019         Test: fast/forms/search/search-size-with-decorations.html
4020
4021         * html/HTMLInputElement.cpp:
4022         (WebCore::HTMLInputElement::decorationWidth):
4023         * html/HTMLInputElement.h:
4024         * html/InputType.cpp:
4025         (WebCore::InputType::decorationWidth):
4026         * html/InputType.h:
4027         Expose a new method to get the width for the input's decoration through the InputType.
4028
4029         * html/NumberInputType.cpp:
4030         (WebCore::NumberInputType::decorationWidth):
4031         * html/NumberInputType.h:
4032         Override InputType::decorationWidth() to return the decoration width for a number input
4033         using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
4034
4035         * html/SearchInputType.cpp:
4036         (WebCore::SearchInputType::sizeShouldIncludeDecoration):
4037         Override InputType::sizeShouldIncludeDecoration() to return true since search fields
4038         have custom decoration adding to the size of the field.
4039
4040         (WebCore::SearchInputType::decorationWidth):
4041         Return the combined size of the results and cancel buttons, as available.
4042         * html/SearchInputType.h:
4043
4044         * rendering/RenderTextControlSingleLine.cpp:
4045         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
4046         Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
4047         and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
4048         return the extra decoration width for an input element should it have any.
4049
4050 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
4051
4052         [WIN] Fix build without precompiled header.
4053
4054         * accessibility/win/AccessibilityObjectWrapperWin.h: Added missing include.
4055         * rendering/RenderThemeWin.cpp: Ditto.
4056
4057 2013-08-02  Byungwoo Lee  <bw80.lee@samsung.com>
4058
4059         Remove redundant call of argsList->current() from loops in CSSParser.
4060         https://bugs.webkit.org/show_bug.cgi?id=119432
4061
4062         Reviewed by Christophe Dumez.
4063
4064         while loops in CSSParser call argList->current() function at the start
4065         of each iteration, but this is redundant because argsList->next() at
4066         the end of the iteration calls the argList->current() and returns the
4067         result.
4068
4069         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155402
4070
4071         * css/CSSParser.cpp:
4072         (WebCore::CSSParser::parseMixFunction):
4073         (WebCore::CSSParser::parseCustomFilterFunctionWithInlineSyntax):
4074
4075</