Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-09  Jer Noble  <jer.noble@apple.com>
2
3         Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
4         https://bugs.webkit.org/show_bug.cgi?id=119645
5
6         Reviewed by Eric Carlson.
7
8         Work around crash caused by <rdar://problem/14688471> by releasing
9         m_request as soon as keys have been added to it.
10
11         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
12         (WebCore::CDMSessionAVFoundation::update):
13
14 2013-08-09  Anders Carlsson  <andersca@apple.com>
15
16         Artifacts seen sometimes with layer backed WebKit1 plug-in
17         https://bugs.webkit.org/show_bug.cgi?id=119647
18         <rdar://problem/14002715>
19
20         Reviewed by Beth Dakin.
21
22         Don't try to paint layer backed views - they will be painted by Core Animation.
23
24         * platform/mac/WidgetMac.mm:
25         (WebCore::Widget::paint):
26
27 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
28
29         ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff
30         https://bugs.webkit.org/show_bug.cgi?id=119623
31
32         Reviewed by Dirk Schulze.
33
34         Include all the stroke attributes in the style diff comparison, the visited links ones were missing.
35
36         Test: svg/animations/animate-stroke-crasher.html
37
38         * rendering/style/SVGRenderStyle.cpp:
39         (WebCore::SVGRenderStyle::diff):
40
41 2013-08-09  Alexey Proskuryakov  <ap@apple.com>
42
43         REGRESSION (r142755): window.open creates an invisible window when width and height are 0
44         https://bugs.webkit.org/show_bug.cgi?id=119633
45
46         Reviewed by Darin Adler.
47
48         Test: fast/dom/Window/open-zero-size-as-default.html
49
50         Relying on each WebKit to refuse setting size to zero was fragile - because this
51         required each one to have the check, and because by the time the client was called,
52         the initially zero size was not necessarily zero.
53
54         * loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
55         size the window was created with, because that's the default one by definition.
56
57         * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
58         check for zero size now, it's been mangled to adjust for the difference between
59         window and viewport size.
60
61 2013-08-09  Eric Carlson  <eric.carlson@apple.com>
62
63         [Mac] some track language tags are not recognized
64         https://bugs.webkit.org/show_bug.cgi?id=119643
65
66         Reviewed by Dean Jackson.
67
68         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
69         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
70             a track may have changed so we may have a new language.
71         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
72             if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
73             QuickTime language code.
74
75 2013-08-09  Dean Jackson  <dino@apple.com>
76
77         Captions menu needs to reset text-align
78         https://bugs.webkit.org/show_bug.cgi?id=119637
79
80         Reviewed by Eric Carlson.
81
82         Reset the text-align property on the menu so that it
83         doesn't get the inherited value. The full fix for all
84         controls is http://webkit.org/b/116100.
85
86         * css/mediaControlsQuickTime.css:
87         (video::-webkit-media-controls-closed-captions-container):
88
89 2013-08-09  Beth Dakin  <bdakin@apple.com>
90
91         AX: Not able to use arrow keys to read text in a WK2 app
92         https://bugs.webkit.org/show_bug.cgi?id=119605
93         -and corresponding-
94         <rdar://problem/14281275>
95
96         Reviewed by Darin Adler.
97
98         This code from defaultKeyboardEventHandler() is the magic that makes this AX 
99         functionality work. This patch moves that into a separate function so that we can 
100         call it from WK2.
101         * WebCore.exp.in:
102         * page/EventHandler.cpp:
103         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
104         (WebCore::EventHandler::defaultKeyboardEventHandler):
105         * page/EventHandler.h:
106
107 2013-08-09  Antti Koivisto  <antti@apple.com>
108
109         Move static StyleResolver functions to Style namespace
110         https://bugs.webkit.org/show_bug.cgi?id=119629
111
112         Reviewed by Sam Weinig and Andreas Kling.
113
114         - Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
115         - Move StyleResolver::styleForDocument to Style::resolveForDocument
116
117         * WebCore.xcodeproj/project.pbxproj:
118         * css/DeprecatedStyleBuilder.cpp:
119         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
120         (WebCore::ApplyPropertyFontFamily::applyValue):
121         (WebCore::ApplyPropertyFontSize::applyInitialValue):
122         (WebCore::ApplyPropertyFontSize::applyValue):
123         * css/StyleResolver.cpp:
124         (WebCore::StyleResolver::adjustRenderStyle):
125         (WebCore::checkForOrientationChange):
126         (WebCore::StyleResolver::applyProperty):
127         (WebCore::StyleResolver::checkForGenericFamilyChange):
128         (WebCore::StyleResolver::initializeFontStyle):
129         (WebCore::StyleResolver::setFontSize):
130         * css/StyleResolver.h:
131         * dom/Document.cpp:
132         (WebCore::Document::recalcStyle):
133         * editing/EditingStyle.cpp:
134         (WebCore::legacyFontSizeFromCSSValue):
135         * html/HTMLLinkElement.cpp:
136         (WebCore::HTMLLinkElement::process):
137         * rendering/style/RenderStyle.cpp:
138         (WebCore::RenderStyle::getFontAndGlyphOrientation):
139         
140             Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
141             This depends on RenderStyle only so it is a natural member function.
142
143         * rendering/style/RenderStyle.h:
144         * rendering/svg/RenderSVGInlineText.cpp:
145         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
146         * style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
147         (WebCore::Style::computedFontSizeFromSpecifiedSize):
148         (WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
149         (WebCore::Style::fontSizeForKeyword):
150         (WebCore::Style::legacyFontSizeForPixelSize):
151         * style/StyleFontSizeFunctions.h: Added.
152         * style/StyleResolveForDocument.cpp: Added.
153         (WebCore::Style::resolveForDocument):
154         * style/StyleResolveForDocument.h: Added.
155
156 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
157
158         Add support for KeyboardEvent.location attribute
159         https://bugs.webkit.org/show_bug.cgi?id=119326
160
161         Reviewed by Benjamin Poulain.
162
163         Add support for KeyboardEvent.location attribute as per the latest specification:
164         http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent
165
166         IE10, Firefox 22 and recently Blink all support KeyboardEvent.location already.
167
168         The deprecated 'keyLocation' attribute was not removed to maintain backward
169         compatibility.
170
171         No new tests, covered by existing tests.
172
173         * bindings/objc/PublicDOMInterfaces.h:
174         * bindings/scripts/CodeGeneratorJS.pm:
175         (GenerateConstructorDefinition):
176         * dom/KeyboardEvent.cpp:
177         (WebCore::KeyboardEventInit::KeyboardEventInit):
178         (WebCore::KeyboardEvent::KeyboardEvent):
179         (WebCore::KeyboardEvent::initKeyboardEvent):
180         * dom/KeyboardEvent.h:
181         (WebCore::KeyboardEvent::location):
182         * dom/KeyboardEvent.idl:
183
184 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
185
186         Make atob() throw an InvalidCharacterError on excess padding characters
187         https://bugs.webkit.org/show_bug.cgi?id=118898
188
189         Reviewed by Darin Adler.
190
191         According to the latest specification, window.atob() should throw an
192         InvalidCharacterError on excess padding characters:
193         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob
194
195         This behavior is consistent with both Firefox, IE10 and recently Blink.
196
197         No new tests, already covered by:
198         fast/dom/Window/atob-btoa.html
199
200         * page/DOMWindow.cpp:
201         (WebCore::DOMWindow::atob):
202
203 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
204
205         Make DOMImplementation::hasFeature() behave according to specification
206         https://bugs.webkit.org/show_bug.cgi?id=119329
207
208         Reviewed by Ryosuke Niwa.
209
210         Make DOMImplementation::hasFeature() behave according to the latest specification:
211         http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
212
213         Specifically, the function should now return true unconditionally for any non-SVG feature.
214         This behavior is consistent with Firefox and since recently Blink.
215
216         hasFeature() originally would report whether the user agent claimed to support a
217         given DOM feature, but experience proved it was not nearly as reliable or granular
218         as simply checking whether the desired interfaces, attributes, or methods existed.
219         As such, it should no longer be used, but continues to exist (and simply returns
220         true) so that old pages don't stop working.
221
222         No new tests, covered by existing tests.
223
224         * dom/DOMImplementation.cpp:
225         (WebCore::isSupportedSVG10Feature):
226         (WebCore::isSupportedSVG11Feature):
227         (WebCore::DOMImplementation::hasFeature):
228
229 2013-08-09  Alejandro G. Castro  <alex@igalia.com>
230
231         [GTK] [EFL] Enable tiled shadow blur for the inset shadows.
232         https://bugs.webkit.org/show_bug.cgi?id=119078
233
234         Reviewed by Martin Robinson.
235
236         Already covered in the tests.
237
238         * platform/graphics/GraphicsContext.cpp:
239         * platform/graphics/cairo/GraphicsContextCairo.cpp:
240         (WebCore::fillCurrentCairoPath): Added to allow fill the path
241         without the shadow.
242         (WebCore::shadowAndFillCurrentCairoPath):
243         (WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
244         implementation.
245
246 2013-08-09  Jakob Petsovits  <jpetsovits@blackberry.com>
247
248         [BlackBerry] Don't release the canvas Drawable, flush it directly instead.
249         https://bugs.webkit.org/show_bug.cgi?id=119589
250         https://jira.bbqnx.net/browse/BRWSR-12531
251         JIRA 444857
252
253         Reviewed by George Staikos.
254
255         The previous code here used releaseBufferDrawable() to
256         flush painted ImageBuffer contents, but then proceeded
257         to use that released Drawable for further painting
258         without ever locking a new one.
259
260         In an implementation that actually releases the Drawable
261         rather than keeping it around and just flushing it,
262         this will wreak havoc as bad as black screens or crashes.
263
264         As a solution that doesn't require the ImageBuffer object
265         to swap out its m_canvas member for a new Drawable, we can
266         access the PlatformGraphicsContext::flush() method directly
267         to achieve the same effect as was previously intended by
268         calling releaseBufferDrawable(). All it needs is letting
269         the canvas layer know about the Drawable so it can call
270         that flush() method by itself.
271
272         No new tests, verified by not crashing with an aforementioned
273         implementation of releaseBufferDrawable().
274
275         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
276         (WebCore::CanvasLayerCompositingThreadClient::CanvasLayerCompositingThreadClient):
277         (WebCore::CanvasLayerCompositingThreadClient::commitPendingTextureUploads):
278         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
279         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
280         (WebCore::CanvasLayerWebKitThread::create):
281         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
282         (WebCore::ImageBuffer::ImageBuffer):
283         (WebCore::ImageBuffer::~ImageBuffer):
284
285 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
286
287         [Qt][WK2] Composited and transformed links asserts in tap highlight
288         https://bugs.webkit.org/show_bug.cgi?id=94345
289
290         Reviewed by Jocelyn Turcotte.
291
292         Use a mapping that does not assert when hitting transforms. We still skip
293         transforms that produces non-rectangular areas.
294
295         * page/GestureTapHighlighter.cpp:
296
297 2013-08-09  Gabor Abraham  <abrhm@inf.u-szeged.hu>
298
299         Buildfix. Fix warning after r153887:
300         control reaches end of non-void function [-Werror=return-type]
301
302         Reviewed by Csaba Osztrogonác.
303
304         * svg/SVGAnimateElement.cpp:
305         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
306
307 2013-08-09  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
308
309         Text decorations should be listed as non-inheritable
310         https://bugs.webkit.org/show_bug.cgi?id=119608
311
312         Reviewed by Andreas Kling.
313
314         Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line"
315         spec (CSS 3) states these properties are not inherited (w/ exceptions,
316         which are currently handled by -in-effect property), however those were
317         listed as inherited for no reason - thus preserving behavior as shown by
318         layout test results.
319
320         Backported from Blink: https://codereview.chromium.org/20751008
321
322         Updated getComputedStyle tests for both 'text-decoration' and
323         'text-decoration-line' properties to check that both are not implicitly
324         inherited.
325
326         * css/CSSProperty.cpp:
327         (WebCore::CSSProperty::isInheritedProperty):
328
329 2013-08-09  Andreas Kling  <akling@apple.com>
330
331         I wish we had a Windows EWS. :(
332
333         * css/ElementRuleCollector.cpp:
334         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList): No range-based for today.
335
336 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
337
338         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
339         https://bugs.webkit.org/show_bug.cgi?id=113224
340
341         Reviewed by Darin Adler.
342
343         Do not perform from-by animations for non-additive attributes.
344
345         Test: svg/animations/non-additive-type-from-by-animation.html
346
347         * svg/SVGAnimateElement.cpp:
348         (WebCore::SVGAnimateElement::calculateFromAndByValues):
349         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
350         (WebCore::SVGAnimateElement::isAdditive):
351         * svg/SVGAnimateElement.h:
352
353 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
354
355         ASSERT(m_type == toSVGTransform.type())
356         https://bugs.webkit.org/show_bug.cgi?id=113217
357
358         Reviewed by Darin Adler.
359
360         For to animations clear the transform list while animating and reset to it after the animation is done.
361         This matches Firefox and Opera 12 behavior.
362
363         Tests: svg/animations/animateTransform-to-scale-expected.svg
364                svg/animations/animateTransform-to-scale.svg
365
366         * svg/SVGAnimatedTransformList.cpp:
367         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
368
369 2013-08-09  Arunprasad Rajkumar  <arurajku@cisco.com>
370
371         [Qt] QtWebKit should allow sending domain specific keycode to HTML applications
372         https://bugs.webkit.org/show_bug.cgi?id=118445
373
374         Reviewed by Allan Sandfeld Jensen.
375
376         No new test required, it is covered by QtWebKit API test.
377
378         This fix allows sending QKeyEvent::nativeVirtualKey as the DOM KeyboardEvent keyCode value instead
379         of Windows virtual key code. It can be enabled/disabled using "_q_useNativeVirtualKeyAsDOMKey"
380         dynamic property present in QWebPage.
381
382         * platform/PlatformKeyboardEvent.h:
383         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
384         * platform/qt/PlatformKeyboardEventQt.cpp:
385         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
386         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
387
388 2013-08-09  Renata Hodovan  <reni@webkit.org>
389
390         Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
391         https://bugs.webkit.org/show_bug.cgi?id=119570
392
393         Reviewed by Ryosuke Niwa.
394
395         The m_mutableStyleSet of EditingStyle can be NULL in ApplyStyleCommand::applyInlineStyleToNodeRange but
396         this scenario was not checked earlier.
397
398         Test: editing/execCommand/null-style-crash.html
399
400         * css/StylePropertySet.cpp:
401         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
402         * css/StylePropertySet.h:
403         * css/ViewportStyleResolver.cpp:
404         (WebCore::ViewportStyleResolver::addViewportRule):
405         * editing/ApplyStyleCommand.cpp:
406         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
407         * editing/EditingStyle.cpp:
408         (WebCore::styleFromMatchedRulesForElement):
409         (WebCore::EditingStyle::mergeStyleFromRules):
410         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
411
412 2013-08-09  Andreas Kling  <akling@apple.com>
413
414         ElementRuleCollector: Use range-based for syntax in rule collection loop.
415         <http://webkit.org/b/119617>
416         <rdar://problem/14695311>
417
418         Reviewed by Antti Koivisto.
419
420         * css/ElementRuleCollector.cpp:
421         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
422
423 2013-08-09  Andreas Kling  <akling@apple.com>
424
425         StyleRule*::properties() should return const references.
426         <http://webkit.org/b/119596>
427
428         Reviewed by Antti Koivisto.
429
430         Make StyleRule::properties() & friends return const-references instead of
431         pointers. This exposed some pointless null checking, since rules should
432         always have properties.
433
434         All rule objects that contain properties now require a StylePropertySet at
435         the time of construction instead having you call setProperties() later.
436
437         The only rules that could ever have null properties were the default-inserted
438         animation keyframe rules for 0% and 100% that we'd conjure up if the author
439         didn't provide them. Now they just have an empty property set instead.
440
441         * css/CSSFontFaceRule.cpp:
442         (WebCore::CSSFontFaceRule::cssText):
443         * css/CSSFontSelector.cpp:
444         (WebCore::CSSFontSelector::addFontFaceRule):
445         * css/CSSPageRule.cpp:
446         (WebCore::CSSPageRule::cssText):
447         * css/CSSParser.cpp:
448         (WebCore::CSSParser::createFilterRule):
449         (WebCore::CSSParser::createStyleRule):
450         (WebCore::CSSParser::createFontFaceRule):
451         (WebCore::CSSParser::rewriteSpecifiers):
452         * css/CSSStyleRule.cpp:
453         (WebCore::CSSStyleRule::cssText):
454         * css/ElementRuleCollector.cpp:
455         (WebCore::leftToRightDeclaration):
456         (WebCore::rightToLeftDeclaration):
457         (WebCore::ElementRuleCollector::addElementStyleProperties):
458         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
459         * css/PageRuleCollector.cpp:
460         (WebCore::PageRuleCollector::matchPageRulesForList):
461         * css/StylePropertySet.cpp:
462         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
463         * css/StylePropertySet.h:
464         * css/StyleResolver.cpp:
465         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
466         (WebCore::StyleResolver::styleForKeyframe):
467         (WebCore::StyleResolver::keyframeStylesForAnimation):
468         * css/StyleResolver.h:
469         * css/StyleRule.cpp:
470         (WebCore::StyleRule::StyleRule):
471         (WebCore::StyleRule::create):
472         (WebCore::StyleRulePage::StyleRulePage):
473         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
474         (WebCore::StyleRuleViewport::StyleRuleViewport):
475         (WebCore::StyleRuleViewport::mutableProperties):
476         (WebCore::StyleRuleFilter::StyleRuleFilter):
477         * css/StyleRule.h:
478         (WebCore::StyleRule::create):
479         (WebCore::StyleRule::properties):
480         (WebCore::StyleRuleFontFace::create):
481         (WebCore::StyleRuleFontFace::properties):
482         (WebCore::StyleRulePage::create):
483         (WebCore::StyleRulePage::properties):
484         (WebCore::StyleRuleViewport::create):
485         (WebCore::StyleRuleViewport::properties):
486         (WebCore::StyleRuleFilter::create):
487         (WebCore::StyleRuleFilter::properties):
488         * css/StyleSheetContents.cpp:
489         (WebCore::StyleSheetContents::addSubresourceStyleURLs):
490         (WebCore::childRulesHaveFailedOrCanceledSubresources):
491         * css/WebKitCSSFilterRule.cpp:
492         (WebCore::WebKitCSSFilterRule::cssText):
493         * css/WebKitCSSKeyframeRule.cpp:
494         (WebCore::StyleKeyframe::StyleKeyframe):
495         (WebCore::StyleKeyframe::mutableProperties):
496         * css/WebKitCSSKeyframeRule.h:
497         (WebCore::StyleKeyframe::create):
498         (WebCore::StyleKeyframe::properties):
499         * css/WebKitCSSViewportRule.cpp:
500         (WebCore::WebKitCSSViewportRule::cssText):
501         * editing/ApplyStyleCommand.cpp:
502         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
503         * editing/EditingStyle.cpp:
504         (WebCore::EditingStyle::mergeStyleFromRules):
505         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
506         * inspector/InspectorStyleSheet.cpp:
507         (WebCore::InspectorStyleSheet::revalidateStyle):
508         * page/PageSerializer.cpp:
509         (WebCore::PageSerializer::retrieveResourcesForRule):
510         * svg/SVGFontFaceElement.cpp:
511         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
512         (WebCore::SVGFontFaceElement::fontFamily):
513         (WebCore::SVGFontFaceElement::rebuildFontFace):
514
515 2013-08-09  Julien Brianceau  <jbrianceau@nds.com>
516
517         [Qt] Fix build (broken by changeset r153826).
518         https://bugs.webkit.org/show_bug.cgi?id=119616
519
520         Reviewed by Andreas Kling.
521
522         * xml/parser/XMLDocumentParserQt.cpp:
523         (WebCore::XMLDocumentParser::XMLDocumentParser):
524
525 2013-08-08  Tim Horton  <timothy_horton@apple.com>
526
527         navigator.plugins has plugins in it when plugins are disabled
528         https://bugs.webkit.org/show_bug.cgi?id=119607
529         <rdar://problem/14678030>
530
531         Reviewed by Anders Carlsson.
532
533         Test: plugins/navigator-plugins-disabled.html
534
535         * page/Settings.cpp:
536         (WebCore::Settings::setPluginsEnabled):
537         Refresh the plugin database when plugins are enabled or disabled.
538         This is necessary to ensure that navigator.plugins will have the
539         correct set of plugins after dynamically changing whether plugins
540         are enabled, which makes the test for this patch possible (but it
541         makes sense in the browser as well).
542
543 2013-08-08  Timothy Hatcher  <timothy@apple.com>
544
545         Allow SVG images to be drawn into canvas without tainting.
546         https://bugs.webkit.org/show_bug.cgi?id=119492
547
548         Reviewed by Darin Adler.
549
550         Tests: svg/as-image/svg-canvas-not-tainted.html
551                svg/as-image/svg-canvas-link-not-colored.html
552                svg/as-image/svg-canvas-xhtml-tainted.html
553
554         * html/HTMLAnchorElement.cpp:
555         (WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
556         (WebCore::shouldProhibitLinks): Added.
557         * html/HTMLAnchorElement.h:
558         * html/HTMLImageElement.cpp:
559         (WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
560         * rendering/svg/RenderSVGRoot.cpp:
561         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
562         * svg/SVGAElement.cpp:
563         (WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
564         * svg/graphics/SVGImage.cpp:
565         (WebCore::SVGImage::hasSingleSecurityOrigin): Added.
566         (WebCore::isInSVGImage): Added.
567         * svg/graphics/SVGImage.h:
568
569 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
570
571         Fix ASSERT(m_contentsSolidColor.isValid()) assertion on iOS at nytimes.com
572         https://bugs.webkit.org/show_bug.cgi?id=119603
573
574         Reviewed by Dean Jackson.
575
576         On iOS it's possible for a GraphicsLayer to transition between having
577         a solid background color, and containing media. This happens on nytimes.com
578         when playing video.
579         
580         In this case, GraphicsLayerCA::updateContentsColorLayer() would assert
581         because m_contentsLayer had been already set up to contain media, but
582         it would be trying to update the color.
583         
584         Fix by bailing from all the updateContents* functions if there is no
585         contents layer, or that layer exists for a different purpose.
586
587         * platform/graphics/ca/GraphicsLayerCA.cpp:
588         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
589         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
590         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
591
592 2013-08-08  Commit Queue  <commit-queue@webkit.org>
593
594         Unreviewed, rolling out r153847.
595         http://trac.webkit.org/changeset/153847
596         https://bugs.webkit.org/show_bug.cgi?id=119609
597
598         caused new SVG animation test failures (Requested by smfr on
599         #webkit).
600
601         * svg/SVGAnimateElement.cpp:
602         (WebCore::SVGAnimateElement::calculateFromAndByValues):
603
604 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
605
606         Kill updateStyleForAllDocuments()
607         https://bugs.webkit.org/show_bug.cgi?id=118093
608
609         Reviewed by Geoff Garen.
610
611         We should never have to eagerly update style, especially for all documents
612         that the process knows about. The WebKit model is to update style when
613         required for layout etc, not to update it eagerly.
614         
615         This is historical code whose origins are lost in the mists of KHTML.
616         r42384 makes it possible to do away with this eager updating, and
617         r55568 removed some calls. Discussion in bug 32580 suggests that
618         form control code still need this, but tests still pass without it.
619
620         * bindings/js/JSCallbackData.cpp:
621         (WebCore::JSCallbackData::invokeCallback):
622         * bindings/js/JSCustomXPathNSResolver.cpp:
623         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
624         * dom/Document.cpp:
625         (WebCore::Document::scheduleStyleRecalc):
626         (WebCore::Document::unscheduleStyleRecalc):
627         * dom/Document.h:
628         * dom/Element.cpp:
629         (WebCore::Element::setActive):
630
631 2013-08-08  Jer Noble  <jer.noble@apple.com>
632
633         [EME] MediaKey APIs should be prefixed.
634         https://bugs.webkit.org/show_bug.cgi?id=119606
635
636         Reviewed by Anders Carlsson.
637
638         No new tests; updated exsisting tests with new names.
639
640         Prefix all new classes with "WebKit" and new methods on existing unprefixed
641         classes with "webkit"
642
643         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: MediaKeyMessageEvent -> WebKitMediaKeyMessageEvent
644         * Modules/encryptedmedia/MediaKeySession.idl: MediaKeySession -> WebKitMediaKeySession
645         * Modules/encryptedmedia/MediaKeys.idl: MediaKeys -> WebKitMediaKeys
646         * html/HTMLMediaElement.idl: keys -> webkitKeys, setMediaKeys -> webkitSetMediaKeys
647         * html/MediaKeyError.idl: MediaKeyError -> WebKitMediaKeyError
648
649 2013-08-08  Jer Noble  <jer.noble@apple.com>
650
651         [EME] setMediaKeys function as defined in the EME specification does not work
652         https://bugs.webkit.org/show_bug.cgi?id=119597
653
654         Reviewed by Anders Carlsson.
655
656         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html
657
658         Rename the mediaKeys attribute 'keys' and make readonly, and add an explicit
659         setMediaKeys() method in HTMLMediaElement's IDL.
660
661         * html/HTMLMediaElement.h:
662         (WebCore::HTMLMediaElement::keys):
663         * html/HTMLMediaElement.idl:
664
665 2013-08-06  Sam Weinig  <sam@webkit.org>
666
667         Hashing SecurityOrigin's can lead to trouble if you mutate them :(
668         https://bugs.webkit.org/show_bug.cgi?id=119533
669         <rdar://problem/12978338>
670
671         Reviewed by Andreas Kling.
672
673         We are getting into trouble in the following circumstance:
674         - You have a HashMap<RefPtr<SecurityOrigin>, Value> map.
675         - You add security origin A (http, www.webkit.org, 80) to the map.
676         - You mutate security origin A by domain relaxation, so that it has the domain webkit.org.
677         - You add security origin B (http, www.webkit.org, 80) to the map.
678         - You mutate security origin B by domain relaxation, so that it has the domain webkit.org.
679             You now have two identical keys in the map.
680         - Add few more items to the map causing a rehash.
681         - When you try to add A and B back into the map, you will have a collision, because they now equal each other.
682
683         We should probably stop using SecurityOrigins as keys in HashMaps (and move to using a non-mutable SecurityOriginTuple,
684         or something), but for now, we can just only use the scheme / host / port part for equality, which is what all the users
685         really want.
686
687         * page/SecurityOriginHash.h:
688         (WebCore::SecurityOriginHash::equal):
689         Switch to using isSameSchemeHostPort() for SecurityOriginHash::equal().
690
691 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
692
693         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
694         https://bugs.webkit.org/show_bug.cgi?id=113224
695
696         Reviewed by Dirk Schulze.
697
698         Do not perform from-by animations for non-additive attributes.
699
700         Test: svg/animations/non-additive-type-from-by-animation.html
701
702         * svg/SVGAnimateElement.cpp:
703         (WebCore::SVGAnimateElement::calculateFromAndByValues):
704
705 2013-08-08  Brent Fulgham  <bfulgham@apple.com>
706
707         [Windows] Improper Caption Button Displayed to Users
708         https://bugs.webkit.org/show_bug.cgi?id=119593 
709
710         Reviewed by Eric Carlson.
711
712         Remove the custom drawing code for the Windows port, and
713         have it render using the CSS/SVG markup like we do on OS X.
714
715         * rendering/RenderThemeWin.cpp: Remove drawing code.
716         * rendering/RenderThemeWin.h: Remove declaration.
717
718 2013-08-08  Alex Christensen  <achristensen@apple.com>
719
720         Work towards WebGL on AppleWin port.
721         https://bugs.webkit.org/show_bug.cgi?id=119562
722
723         Reviewed by Brent Fulgham.
724
725         * WebCore.vcxproj/WebCore.vcxproj:
726         Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
727         * WebCore.vcxproj/WebCore.vcxproj.filters:
728         Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
729         * platform/graphics/GraphicsContext3D.h:
730         Added m_webGLLayer for AppleWin port.
731         * platform/graphics/GraphicsContext3DPrivate.cpp:
732         Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
733         * platform/graphics/win/GraphicsContext3DWin.cpp:
734         Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
735         (WebCore::GraphicsContext3D::GraphicsContext3D):
736         Added GraphicsContext3DPrivate and PlatformCALayer initialization.
737         (WebCore::GraphicsContext3D::makeContextCurrent):
738         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
739         Added implementation based on Cairo ports' to be refactored soon.
740         (WebCore::GraphicsContext3D::platformLayer):
741         Return PlatformCALayer's PlatformLayer instead of 0.
742
743 2013-08-08  Jer Noble  <jer.noble@apple.com>
744
745         [EME] Implement MediaKeys.isTypeSupported()
746         https://bugs.webkit.org/show_bug.cgi?id=119586
747
748         Reviewed by Eric Carlson.
749
750         Test: media/encrypted-media/encrypted-media-is-type-supported.html
751
752         The EME spec has removed the extra keySystem parameter from
753         HTMLMediaElement.canPlayType() in favor of a new isTypeSupported()
754         method on MediaKeys.
755
756         To implement this method, the CDMFactory needs to know whether the
757         registered CDM supports the specified mime type.  CDMs must register
758         this new factory method, which requires changes to CDMPrivateAVFoundation
759         and MockCDM.
760
761         Add the new MediaKeys.isTypeSupported() method:
762         * Modules/encryptedmedia/MediaKeys.cpp:
763         (WebCore::MediaKeys::isTypeSupported):
764         * Modules/encryptedmedia/MediaKeys.h:
765         * Modules/encryptedmedia/MediaKeys.idl:
766
767         Add the new factory CDMSupportsKeySystemAndMimeType method:
768         * Modules/encryptedmedia/CDM.cpp:
769         (WebCore::CDMFactory::CDMFactory): Now takes a third parameter.
770         (WebCore::installedCDMFactories): When adding the AVFoundation CDM, pass its new method.
771         (WebCore::CDM::registerCDMFactory): Now takes a third parameter.
772         (WebCore::CDM::keySystemSupportsMimeType): Added.
773         * Modules/encryptedmedia/CDM.h:
774         * WebCore.exp.in:
775
776         Register this new method with the factory for all concrete CDMs:
777         * Modules/encryptedmedia/CDMPrivateAVFoundation.h:
778         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
779         (WebCore::CDMPrivateAVFoundation::supportsKeySystem):
780         (WebCore::CDMPrivateAVFoundation::supportsKeySystemAndMimeType):
781         * testing/Internals.cpp:
782         (WebCore::Internals::initializeMockCDM):
783         * testing/MockCDM.cpp:
784         (WebCore::MockCDM::supportsKeySystem):
785         (WebCore::MockCDM::supportsKeySystemAndMimeType):
786         * testing/MockCDM.h:
787
788 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
789
790         Crash in WTF::RefPtr<WebCore::SpaceSplitStringData>::operator UnspecifiedBoolType
791         https://bugs.webkit.org/show_bug.cgi?id=118839
792
793         Reviewed by Darin Adler.
794
795         Take into account that elementData() can be null in classAttributeChanged.
796
797         Test: svg/animations/classAttributeSettingCrash.html
798
799         * dom/Element.cpp:
800         (WebCore::Element::classAttributeChanged):
801
802 2013-08-08  Robert Hogan  <robert@webkit.org>
803
804         REGRESSION(r147019): Page has extra space
805         https://bugs.webkit.org/show_bug.cgi?id=119424
806
807         Reviewed by David Hyatt.
808
809         Clear the overflow rect before recomputing it in table sections.
810
811         No new tests: the reduction uses jquery and I was unable to simulate the reduction without it.
812
813         * rendering/RenderTableSection.cpp:
814         (WebCore::RenderTableSection::layoutRows):
815         (WebCore::RenderTableSection::computeOverflowFromCells):
816
817 2013-08-08  Andreas Kling  <akling@apple.com>
818
819         Inserting multiple rules into an empty style sheet should avoid style recalc if possible.
820         <http://webkit.org/b/119568>
821
822         Reviewed by Antti Koivisto.
823
824         As a follow-up to <http://webkit.org/b/119475>, where I added a hack for inserting
825         a single rule into an empty style sheet, this broadens the optimization to support
826         any number of rules.
827
828         This optimizes the scenario where a style sheet is added to the DOM and then populated
829         rule-by-rule via CSSOM insertRule()/addRule() calls. Previously we'd do a full style
830         recalc for this case, but now we'll treat it the same as a full sheet added at once.
831
832         * css/CSSStyleSheet.h:
833         * css/CSSStyleSheet.cpp:
834         (WebCore::CSSStyleSheet::willMutateRules):
835
836             Made willMutateRules() return whether the style sheet contents were cloned by the
837             copy-on-write mechanism.
838
839         * dom/Document.h:
840         (WebCore::CSSStyleSheet::didMutateRules):
841         (WebCore::CSSStyleSheet::insertRule):
842
843             Replaced the InsertionIntoEmptySheet mutation type by a general RuleInsertion.
844             The mutation callback checks if we're inserting into a rule that's not (yet) part
845             of the document's active sheet set. In that case, we defer doing the style sheet
846             until all the insertions are done (or something forces us to style+layout.)
847
848             Note that this optimization only happens if the style sheet had a single client.
849             Shared style sheets that just got cloned before mutation may have pointers into
850             them from the Document's StyleResolver, so we're forced to do an immediate sheet
851             update in that case.
852
853         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
854         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
855
856             Moved these out-of-line.
857
858         (WebCore::CSSStyleSheet::didMutateRuleFromCSSStyleDeclaration):
859         * css/PropertySetCSSStyleDeclaration.cpp:
860         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
861
862             Made a separate mutation callback for CSSStyleDeclaration since its needs are
863             so simple compared to the mutation callback from CSSStyleSheet. Seems better
864             than adding yet another mode to the enum.
865
866         * dom/Document.cpp:
867         (WebCore::Document::Document):
868         (WebCore::Document::recalcStyle):
869         (WebCore::Document::styleResolverChanged):
870         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
871         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
872
873             Added mechanism to defer doing a RecalcStyleIfNeeded.
874
875         (WebCore::Document::updateStyleIfNeeded):
876
877             Synchronize the optimized style sheet update if there's one scheduled.
878             This ensures that stuff like layout-dependent property access won't operate
879             on stale style.
880
881         * dom/DocumentStyleSheetCollection.h:
882         (WebCore::DocumentStyleSheetCollection::pendingUpdateType):
883         (WebCore::DocumentStyleSheetCollection::setPendingUpdateType):
884         (WebCore::DocumentStyleSheetCollection::flushPendingUpdates):
885         * dom/DocumentStyleSheetCollection.cpp:
886         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
887         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
888
889             Have DSSC track the kind of style sheet update it needs to do (instead of just
890             a boolean "needs update.") This is used by Document::recalcStyle() to make sure
891             the right kind of update happens if there's one scheduled.
892
893         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains):
894
895             Added helper to check if a CSSStyleSheet is part of the active set.
896
897 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
898
899         [WK1] NPStream::headers not initialized
900         https://bugs.webkit.org/show_bug.cgi?id=119574
901
902         Reviewed by Alexey Proskuryakov.
903
904         Initialize the header field. According to user feedback that should solve some
905         cases of random crashes when loading plugins on Mac and Windows.
906
907         * plugins/PluginStream.cpp:
908         (WebCore::PluginStream::PluginStream):
909
910 2013-08-08  Andreas Kling  <akling@apple.com>
911
912         Element: Modernize attribute storage accessor functions.
913         <http://webkit.org/b/119578>
914
915         Reviewed by Antti Koivisto.
916
917         Rename these functions to more WebKit-style names.
918
919         - const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
920         - const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
921         - unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
922
923         Note that attributeAt() now returns a reference instead of a pointer. That's right.
924
925         * css/SelectorChecker.cpp:
926         (WebCore::attributeValueMatches):
927         (WebCore::anyAttributeMatches):
928         * css/SelectorChecker.h:
929         (WebCore::SelectorChecker::checkExactAttribute):
930         * dom/Attr.cpp:
931         (WebCore::Attr::elementAttribute):
932         * dom/DatasetDOMStringMap.cpp:
933         (WebCore::DatasetDOMStringMap::getNames):
934         (WebCore::DatasetDOMStringMap::item):
935         (WebCore::DatasetDOMStringMap::contains):
936         * dom/Element.cpp:
937         (WebCore::Element::detachAttribute):
938         (WebCore::Element::removeAttribute):
939         (WebCore::Element::getAttribute):
940         (WebCore::Element::setAttribute):
941         (WebCore::Element::setSynchronizedLazyAttribute):
942         (WebCore::Element::setAttributeInternal):
943         (WebCore::Element::setAttributeNode):
944         (WebCore::Element::removeAttributeNode):
945         (WebCore::Element::removeAttributeInternal):
946         (WebCore::Element::getAttributeNode):
947         (WebCore::Element::getAttributeNodeNS):
948         (WebCore::Element::hasAttribute):
949         (WebCore::Element::hasAttributeNS):
950         (WebCore::Element::computeInheritedLanguage):
951         (WebCore::Element::normalizeAttributes):
952         (WebCore::Element::getURLAttribute):
953         (WebCore::Element::getNonEmptyURLAttribute):
954         (WebCore::Element::detachAllAttrNodesFromElement):
955         (WebCore::Element::cloneAttributesFromElement):
956         (WebCore::ElementData::isEquivalent):
957         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
958         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
959         (WebCore::UniqueElementData::findAttributeByName):
960         (WebCore::UniqueElementData::attributeAt):
961         * dom/Element.h:
962         (WebCore::Element::findAttributeIndexByName):
963         (WebCore::Element::fastHasAttribute):
964         (WebCore::Element::fastGetAttribute):
965         (WebCore::Element::attributeAt):
966         (WebCore::Element::findAttributeByName):
967         (WebCore::ElementData::findAttributeByName):
968         (WebCore::ElementData::findAttributeIndexByName):
969         (WebCore::ElementData::attributeAt):
970         * dom/NamedNodeMap.cpp:
971         (WebCore::NamedNodeMap::removeNamedItem):
972         (WebCore::NamedNodeMap::removeNamedItemNS):
973         (WebCore::NamedNodeMap::item):
974         * dom/Node.cpp:
975         (WebCore::Node::dumpStatistics):
976         (WebCore::Node::isDefaultNamespace):
977         (WebCore::Node::lookupNamespaceURI):
978         (WebCore::Node::lookupNamespacePrefix):
979         (WebCore::Node::compareDocumentPosition):
980         * dom/StyledElement.cpp:
981         (WebCore::StyledElement::makePresentationAttributeCacheKey):
982         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
983         * editing/MarkupAccumulator.cpp:
984         (WebCore::MarkupAccumulator::appendElement):
985         * editing/markup.cpp:
986         (WebCore::completeURLs):
987         (WebCore::StyledMarkupAccumulator::appendElement):
988         * html/HTMLEmbedElement.cpp:
989         (WebCore::HTMLEmbedElement::parametersForPlugin):
990         * html/HTMLInputElement.cpp:
991         (WebCore::HTMLInputElement::updateType):
992         * html/HTMLObjectElement.cpp:
993         (WebCore::HTMLObjectElement::parametersForPlugin):
994         * html/HTMLSelectElement.cpp:
995         (WebCore::HTMLSelectElement::parseAttribute):
996         * html/parser/HTMLConstructionSite.cpp:
997         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
998         * inspector/DOMPatchSupport.cpp:
999         (WebCore::DOMPatchSupport::innerPatchNode):
1000         (WebCore::DOMPatchSupport::createDigest):
1001         * inspector/InspectorDOMAgent.cpp:
1002         (WebCore::InspectorDOMAgent::setAttributesAsText):
1003         (WebCore::InspectorDOMAgent::performSearch):
1004         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
1005         * page/PageSerializer.cpp:
1006         (WebCore::isCharsetSpecifyingNode):
1007         * svg/SVGStyledElement.cpp:
1008         (WebCore::SVGStyledElement::getPresentationAttribute):
1009         * xml/XPathFunctions.cpp:
1010         (WebCore::XPath::FunLang::evaluate):
1011         * xml/XPathNodeSet.cpp:
1012         (WebCore::XPath::NodeSet::traversalSort):
1013         * xml/XPathStep.cpp:
1014         (WebCore::XPath::Step::nodesInAxis):
1015         * xml/parser/XMLDocumentParserLibxml2.cpp:
1016         (WebCore::XMLDocumentParser::XMLDocumentParser):
1017         * xml/parser/XMLDocumentParserQt.cpp:
1018         (WebCore::XMLDocumentParser::XMLDocumentParser):
1019
1020 2013-08-08  Mark Lam  <mark.lam@apple.com>
1021
1022         Restoring use of StackIterator instead of Interpreter::getStacktrace().
1023         https://bugs.webkit.org/show_bug.cgi?id=119575.
1024
1025         Reviewed by Oliver Hunt.
1026
1027         No new tests.
1028
1029         * bindings/js/ScriptCallStackFactory.cpp:
1030         (WebCore::createScriptCallStack):
1031
1032 2013-08-08  Zalan Bujtas  <zalan@apple.com>
1033
1034         REGRESSION (r121551) Incorrect handling of invalid media query list.
1035         https://bugs.webkit.org/show_bug.cgi?id=119164
1036
1037         Reviewed by Antti Koivisto.
1038
1039         Differentiate between syntactically invalid media queries and media queries with empty expressions.
1040
1041         Introduce a dedicated function for valid, but empty expression queries, so that passing NULL MediaQuerySet
1042         object to CSSParser::createMediaRule() can indicate invalid media query.
1043
1044         Test: fast/media/invalid-media-query-list.html
1045
1046         * css/CSSGrammar.y.in:
1047         * css/CSSParser.cpp:
1048         (WebCore::CSSParser::createMediaRule):
1049         (WebCore::CSSParser::createEmptyMediaRule):
1050         * css/CSSParser.h:
1051
1052 2013-08-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1053
1054         Introduce toSVGMPathElement(), and use it
1055         https://bugs.webkit.org/show_bug.cgi?id=119566
1056
1057         Reviewed by Andreas Kling.
1058
1059         As a step to change static_cast with toSVGXXX, static_cast<SVGMPathElement*> can
1060         be changed with toSVGMPathElement().
1061
1062         * svg/SVGAnimateMotionElement.cpp:
1063         (WebCore::SVGAnimateMotionElement::updateAnimationPath):
1064         * svg/SVGMPathElement.h:
1065         (WebCore::toSVGMPathElement):
1066         * svg/SVGPathElement.cpp:
1067         (WebCore::SVGPathElement::invalidateMPathDependencies):
1068
1069 2013-08-08  Antti Koivisto  <antti@apple.com>
1070
1071         Move more style recalc code to StyleResolveTree.cpp
1072         https://bugs.webkit.org/show_bug.cgi?id=119553
1073
1074         Reviewed by Andreas Kling.
1075
1076         * css/StyleResolver.cpp:
1077         * css/StyleResolver.h:
1078         
1079             Remove now unused StyleResolver::styleForText.
1080
1081         * dom/ElementShadow.cpp:
1082         * dom/ElementShadow.h:
1083         
1084             Remove ElementShadow::recalcStyle.
1085
1086         * dom/ShadowRoot.cpp:
1087         (WebCore::ShadowRoot::setResetStyleInheritance):
1088         
1089             Use Style::resolveTree instead of ElementShadow::recalcStyle.
1090
1091         * dom/ShadowRoot.h:
1092         
1093             Remove ShadowRoot::recalcStyle.
1094
1095         * dom/Text.cpp:
1096         * dom/Text.h:
1097         
1098             Remove Text::recalcTextStyle.
1099
1100         * style/StyleResolveTree.cpp:
1101         (WebCore::Style::updateTextStyle):
1102         
1103             Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.
1104
1105         (WebCore::Style::resolveShadowTree):
1106         
1107             Moved from ShadowRoot::recalcStyle. 
1108             Simplified to cover only cases that can occur with the current shadow DOM support.
1109
1110         (WebCore::Style::resolveTree):
1111
1112 2013-08-08  Andreas Kling  <akling@apple.com>
1113
1114         REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
1115         <http://webkit.org/b/119520>
1116         <rdar://problem/14658929>
1117
1118         Reviewed by Simon Fraser.
1119
1120         When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
1121         from one node to another.
1122         We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
1123         necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
1124         in the old node.
1125
1126         Test: fast/repaint/caret-jump-between-nodes.html
1127
1128         * editing/FrameSelection.cpp:
1129         (WebCore::FrameSelection::recomputeCaretRect):
1130
1131             Fall through all the way down to caret repaints if the selection's new anchor node is not
1132             the same as m_previousCaretNode.
1133
1134 2013-08-07  Andrei Bucur  <abucur@adobe.com>
1135
1136         [CSS Regions] Propagate overflow from the flow thread to the first and last region
1137         https://bugs.webkit.org/show_bug.cgi?id=118526
1138
1139         Reviewed by David Hyatt.
1140
1141         The patch implements layout overflow propagation for the first and last regions. The approach
1142         taken is triggering a simple layout on the regions after the named flows are laid out
1143         that extracts the layout overflow from the flow thread and adds it to the regions.
1144
1145         The process is based on adding two new layout phases: the overflow phase and the final phase.
1146         The overflow phase is set after the flow threads are laid out and it marks the regions as
1147         needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
1148         it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
1149         thread is relaid out and set in the final phase, forcing the regions to recollect the layout
1150         overflow. In theory this would be an N-step layout because scrollbars can force content to change
1151         regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
1152         limiting this to the first pass by inserting this new final layout phase.
1153
1154         A short description of the processing model for a document:
1155         - layout the document (all the flow threads should be in the constrained layout phase after this step)
1156         - reverse iterate through the flow threads and mark the regions for simplified layout (we need to
1157         reverse iterate so the overflow can correctly propagate with nested regions)
1158         - if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
1159         it as needing a new pass
1160         - make a secondary pass through the flow threads that changed after scrollbars have been added and
1161         recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
1162         be invalidated in the final phase)
1163         - after the overflow was propagated update all the flow threads in the normal layout phase
1164
1165         There are some issues with the patch:
1166         - the simplified layout doesn't compute correct overflow values for inline blocks
1167         - the layout overflow from the flow thread doesn't take the region size into account
1168
1169         The first issue is not related to regions and will be fixed in a future patch. The second issue
1170         will be fixed when box overflow will be region bound.
1171
1172         Tests: fast/regions/overflow-scrollable-1.html
1173                fast/regions/overflow-scrollable-2.html
1174                fast/regions/overflow-scrollable-3.html
1175                fast/regions/overflow-scrollable-fit-complex.html
1176                fast/regions/overflow-scrollable-fit.html
1177                fast/regions/overflow-scrollable-nested.html
1178
1179         * rendering/FlowThreadController.cpp: Flow threads layout driver functions.
1180         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
1181         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
1182         (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
1183         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
1184         (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
1185         * rendering/FlowThreadController.h:
1186         * rendering/RenderBlock.cpp:
1187         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
1188         * rendering/RenderFlowThread.cpp:
1189         (WebCore::RenderFlowThread::RenderFlowThread):
1190         (WebCore::RenderFlowThread::invalidateRegions):
1191         (WebCore::RenderFlowThread::validateRegions):
1192         (WebCore::RenderFlowThread::layout):
1193         (WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
1194         (WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
1195         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
1196         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
1197         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1198         (WebCore::RenderFlowThread::addForcedRegionBreak):
1199         * rendering/RenderFlowThread.h:
1200         * rendering/RenderMultiColumnSet.cpp:
1201         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1202         * rendering/RenderRegion.cpp:
1203         (WebCore::RenderRegion::pageLogicalHeight):
1204         (WebCore::RenderRegion::maxPageLogicalHeight):
1205         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
1206         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
1207         (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
1208         (WebCore::RenderRegion::layoutBlock):
1209         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1210         (WebCore::RenderRegion::updateLogicalHeight):
1211         * rendering/RenderRegion.h:
1212         * rendering/RenderView.cpp:
1213         (WebCore::RenderView::layoutContentToComputeOverflowInRegions):
1214         (WebCore::RenderView::layout):
1215         * rendering/RenderView.h:
1216
1217 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
1218
1219         Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
1220         https://bugs.webkit.org/show_bug.cgi?id=119564
1221
1222         Reviewed by Beth Dakin.
1223
1224         When scrolling WebViews on Macs with Retina displays, AppKit uses
1225         device pixels for the scroll offset, so [scrollView() documentVisibleRect]
1226         can return a CGRect with non-integral origin. This rect is used by layout,
1227         via layoutSize(), to decide whether the view size changed, which prompts
1228         a full repaint. However, FrameView gets a value which has been rounded
1229         by enclosingIntRect(), which increases the height or width by 1px if the 
1230         y or x offset is on a half-pixel, causing spurious full repaints.
1231         
1232         Fix by plumbing through platformVisibleContentSize(), which just
1233         gets the size of the -documentVisibleRect.
1234         
1235         * page/FrameView.cpp:
1236         (WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
1237         separately, since that is two calls down into platformVisibleContentSize.
1238         * platform/ScrollView.cpp:
1239         (WebCore::ScrollView::unscaledVisibleContentSize):
1240         (WebCore::ScrollView::platformVisibleContentSize):
1241         * platform/ScrollView.h:
1242         * platform/mac/ScrollViewMac.mm:
1243         (WebCore::ScrollView::platformVisibleContentSize):
1244
1245 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
1246
1247         Be more aggressive about sending fake mouse events less frequently
1248         https://bugs.webkit.org/show_bug.cgi?id=119563
1249         <rdar://problem/14669029>
1250
1251         Reviewed by Tim Horton.
1252
1253         r109151 added code that throttles back the fake mouse events that we
1254         send during scrolling, but in such a way that a page could take up to
1255         100ms to handle a single mousemove, and we'd still send fake mousemove
1256         events every 100ms. This could cause serious scrolling stutter.
1257         
1258         Fix by changing when we drop back to sending events every 250ms, rather than every
1259         100ms: if the slowest mousemove takes 10ms or more (less than one frame), drop back
1260         to a 250ms fake move interval.
1261
1262         * page/EventHandler.cpp:
1263         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
1264
1265 2013-08-07  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1266
1267         [rendering] Implement PaintInfo interfaces
1268         https://bugs.webkit.org/show_bug.cgi?id=119388
1269
1270         Reviewed by Benjamin Poulain.
1271
1272         In discussion in IRC, it was decided to remove this comment since implementing such change
1273         would have a vast impact on rendering classes.
1274
1275         * rendering/PaintInfo.h:
1276
1277 2013-08-07  Dean Jackson  <dino@apple.com>
1278
1279         Don't remove contents layer from its parent unless necessary
1280         https://bugs.webkit.org/show_bug.cgi?id=119560
1281
1282         Reviewed by Simon Fraser.
1283
1284         RenderLayerBacking::updateInternalHierarchy() is called in some
1285         instances where there doesn't need to be a complete reparenting of the
1286         the m_graphicsLayer. For example, on OS X when the user changes the
1287         scrollbar styles to/from always visible. We don't need to always
1288         remove the graphics layer from its parent - any reparenting does that
1289         automatically.
1290
1291         Unfortunately we can't trigger this situation in an automated test.
1292
1293         * rendering/RenderLayerBacking.cpp:
1294         (WebCore::RenderLayerBacking::updateInternalHierarchy): Don't call removeFromParent().
1295
1296 2013-08-07  Tim Horton  <timothy_horton@apple.com>
1297
1298         Fall out of simple image layer optimization if the image has EXIF rotation
1299         https://bugs.webkit.org/show_bug.cgi?id=119535
1300         <rdar://problem/14071174>
1301
1302         Reviewed by Simon Fraser.
1303
1304         Test: fast/images/exif-orientation-composited.html
1305
1306         * platform/graphics/BitmapImage.cpp:
1307         (WebCore::BitmapImage::frameOrientationAtIndex):
1308         Ensure that the frame is cached if we're requesting the orientation,
1309         so we can acquire orientation information at any given time.
1310
1311         * platform/mac/DragImageMac.mm:
1312         (WebCore::createDragImageFromImage):
1313         * platform/graphics/BitmapImage.h:
1314         Rename currentFrameOrientation to frameOrientationForCurrentFrame to match
1315         the similarly-behaving nativeImageForCurrentFrame.
1316
1317         * platform/graphics/Image.h:
1318         (WebCore::Image::orientationForCurrentFrame): Added. Virtual, overriden by BitmapImage.
1319
1320         * rendering/RenderLayerBacking.cpp:
1321         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1322         If the given image has a non-default image orientation, don't use direct compositing.
1323
1324 2013-08-07  Antti Koivisto  <antti@apple.com>
1325
1326         fast/frames/seamless/seamless-custom-font-pruning-crash.html asserts
1327         https://bugs.webkit.org/show_bug.cgi?id=119557
1328
1329         Rubber-stamped by Eric Carlson.
1330         
1331         Pass Style::Detach style change to seamless document as Style::Force. Style::resolveTree does not expect to be called with Detach.
1332
1333         * html/HTMLIFrameElement.cpp:
1334         (WebCore::HTMLIFrameElement::didRecalcStyle):
1335
1336 2013-08-07  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1337
1338         Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
1339         https://bugs.webkit.org/show_bug.cgi?id=115354
1340
1341         Reviewed by Philippe Normand.
1342
1343         The default value for the HTTP "Accept-Encoding:" header field in the request allows
1344         compressed data to be received on requests.
1345         While this works fine for most cases, it can break the webkit source that needs to rely on the
1346         the proper data size when receiving the response (even though the received data is already
1347         uncompressed the size reported in ResourceResponse::expectedContentLength() is the same
1348         represented by the HTTP header field "Content-Length" which is the size of the compressed data).
1349
1350         This patch disables the HTTP "Accept-Encoding:" header field when using the request
1351         as we don't want the received response to be encoded in any way, as we need to rely on the proper
1352         size of the returned data on ResourceHandle::didReceiveResponse().
1353
1354         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1355         (webKitWebSrcStart):
1356         * platform/network/soup/ResourceRequest.h:
1357         (ResourceRequestBase):
1358         (WebCore::ResourceRequest::acceptEncoding):
1359         (WebCore::ResourceRequest::setAcceptEncoding):
1360         (WebCore::ResourceRequest::ResourceRequestBase):
1361         * platform/network/soup/ResourceRequestSoup.cpp:
1362         (WebCore::ResourceRequest::updateSoupMessage):
1363         (WebCore::ResourceRequest::toSoupMessage):
1364
1365 2013-08-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1366
1367         [Qt] REGRESSION(r) Two pixel result fail after r153522
1368         https://bugs.webkit.org/show_bug.cgi?id=119392
1369
1370         Reviewed by Jocelyn Turcotte.
1371
1372         Consider scaling transform on the painter to determine final destination size.
1373
1374         Covered by existing tests.
1375
1376         * platform/graphics/qt/ImageQt.cpp:
1377         (WebCore::prescaleImageIfRequired):
1378         (WebCore::BitmapImage::draw):
1379
1380 2013-08-07  Antti Koivisto  <antti@apple.com>
1381
1382         2.5% regression on page cycler moz
1383         https://bugs.webkit.org/show_bug.cgi?id=102822
1384
1385         Reviewed by Andreas Kling.
1386
1387         DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
1388         documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces 
1389         with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
1390         unnecessary work.
1391
1392         * dom/DocumentStyleSheetCollection.cpp:
1393         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
1394         
1395             Check that we actually have cached injected stylesheets before triggering style recalc.
1396             
1397         * page/PageGroup.cpp:
1398         (WebCore::PageGroup::addUserStyleSheetToWorld):
1399         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
1400         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
1401         (WebCore::PageGroup::removeAllUserContent):
1402         
1403             Fix a misspelling.
1404
1405         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
1406         
1407             Always invalidate style when user sheets change since we don't do that in
1408             DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
1409
1410         * page/PageGroup.h:
1411
1412 2013-08-07  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1413
1414         Do no check seek offset against internal size on gstreamer source element
1415         https://bugs.webkit.org/show_bug.cgi?id=116533
1416
1417         Reviewed by Philippe Normand.
1418
1419         The internal size on gstreamer source element may be wrong in case the received size in
1420         didReceiveResponse is not accurate. Lets just try to seek and let it fail if necessary.
1421
1422         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1423         (webKitWebSrcSeekDataCb):
1424
1425 2013-08-07  Antti Koivisto  <antti@apple.com>
1426
1427         Create WebCore/style and move StyleResolveTree there
1428         https://bugs.webkit.org/show_bug.cgi?id=119543
1429
1430         Reviewed by Andreas Kling.
1431
1432         WebCore/css is bloated. We should move the internal style representation and the style resolver
1433         related code to a directory of their own. CSS language related code including parser and 
1434         CSSOM stays under css.
1435
1436         Things named StyleFoo should generally move under WebCore/style. They should also be moved to
1437         the Style namespace at the same time.
1438
1439         * CMakeLists.txt:
1440         * GNUmakefile.am:
1441         * GNUmakefile.list.am:
1442         * WebCore.pri:
1443         * Target.pri:
1444         * WebCore.vcxproj/WebCore.vcxproj:
1445         * WebCore.vcxproj/WebCoreCommon.props:
1446         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1447         * WebCore.xcodeproj/project.pbxproj:
1448         * css/StyleResolveTree.cpp: Removed.
1449         * css/StyleResolveTree.h: Removed.
1450         * style: Added.
1451         * style/StyleResolveTree.cpp: Copied from Source/WebCore/css/StyleResolveTree.cpp.
1452         * style/StyleResolveTree.h: Copied from Source/WebCore/css/StyleResolveTree.h.
1453
1454 2013-08-07  Antti Koivisto  <antti@apple.com>
1455
1456         Move style recalculation out from Element
1457         https://bugs.webkit.org/show_bug.cgi?id=119497
1458
1459         Reviewed by Andreas Kling.
1460
1461         Element currently does too much. Element::recalcStyle() and the related functions can be turned into
1462         standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
1463         for example making style recalculation non-recursive.
1464
1465         * WebCore.xcodeproj/project.pbxproj:
1466         * css/StyleResolveTree.cpp: Added.
1467         (WebCore::Style::determineChange):
1468                 
1469             - moved and renamed from Node::diff
1470             - factored to use early return style
1471             - simplifield the null input logic
1472
1473         (WebCore::Style::pseudoStyleCacheIsInvalid):
1474         
1475             - moved from Element::pseudoStyleCacheIsInvalid
1476             - narrowed to take RenderObject rather than operate on Element
1477
1478         (WebCore::Style::resolveLocal):
1479         
1480             - split from Element::recalcStyle
1481             - factored to use early return style
1482
1483         (WebCore::Style::resolveTree):
1484         
1485             - moved and renamed from Element::recalcStyle
1486
1487         * css/StyleResolveTree.h: Added.
1488         
1489             - introcuduce Style namespace for style related classes and functions
1490             - move and rename Node::StyleChange -> Style::Change
1491
1492         * css/StyleResolver.h:
1493         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
1494         (WebCore::StyleResolverParentPusher::push):
1495         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
1496         
1497             Moved this stack helper to StyleResolver.h for now since it is needed by both
1498             StyleRecalculation and Element.
1499
1500         * dom/Document.cpp:
1501         (WebCore::Document::recalcStyle):
1502         (WebCore::Document::updateStyleIfNeeded):
1503         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1504         (WebCore::Document::attach):
1505         (WebCore::Document::styleResolverChanged):
1506         (WebCore::Document::webkitWillEnterFullScreenForElement):
1507         * dom/Document.h:
1508         * dom/Element.cpp:
1509         (WebCore::shouldIgnoreAttributeCase):
1510         (WebCore::Element::updatePseudoElement):
1511         (WebCore::Element::resetComputedStyle):
1512         (WebCore::Element::willRecalcStyle):
1513         (WebCore::Element::didRecalcStyle):
1514         * dom/Element.h:
1515         
1516             - remove Element::recalcStyle
1517             - make a few private functions needed by StyleRecalculation public
1518
1519         * dom/ElementShadow.cpp:
1520         (WebCore::ElementShadow::recalcStyle):
1521         * dom/ElementShadow.h:
1522         * dom/Node.cpp:
1523         * dom/Node.h:
1524
1525             - remove Node::StyleChange
1526             - remove Node::diff
1527
1528         * dom/PseudoElement.cpp:
1529         (WebCore::PseudoElement::didRecalcStyle):
1530         * dom/PseudoElement.h:
1531         * dom/ShadowRoot.cpp:
1532         (WebCore::ShadowRoot::recalcStyle):
1533         (WebCore::ShadowRoot::setResetStyleInheritance):
1534         * dom/ShadowRoot.h:
1535         * dom/Text.cpp:
1536         (WebCore::Text::recalcTextStyle):
1537         * dom/Text.h:
1538         * html/HTMLFormControlElement.cpp:
1539         (WebCore::HTMLFormControlElement::didRecalcStyle):
1540         * html/HTMLFormControlElement.h:
1541         * html/HTMLFrameSetElement.cpp:
1542         (WebCore::HTMLFrameSetElement::willRecalcStyle):
1543         * html/HTMLFrameSetElement.h:
1544         * html/HTMLIFrameElement.cpp:
1545         (WebCore::HTMLIFrameElement::didRecalcStyle):
1546         * html/HTMLIFrameElement.h:
1547         * html/HTMLMediaElement.cpp:
1548         (WebCore::HTMLMediaElement::didRecalcStyle):
1549         * html/HTMLMediaElement.h:
1550         * html/HTMLOptionElement.cpp:
1551         (WebCore::HTMLOptionElement::didRecalcStyle):
1552         * html/HTMLOptionElement.h:
1553         * html/HTMLPlugInImageElement.cpp:
1554         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
1555         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
1556         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
1557         * html/HTMLPlugInImageElement.h:
1558         * inspector/InspectorOverlay.cpp:
1559         (WebCore::InspectorOverlay::update):
1560         * loader/DocumentWriter.cpp:
1561         (WebCore::DocumentWriter::reportDataReceived):
1562         * page/Frame.cpp:
1563         (WebCore::Frame::setPageAndTextZoomFactors):
1564         * page/Page.cpp:
1565         (WebCore::Page::setPageScaleFactor):
1566         * rendering/RenderBlock.cpp:
1567         (WebCore::RenderBlock::updateFirstLetterStyle):
1568         * svg/SVGElement.cpp:
1569         (WebCore::SVGElement::willRecalcStyle):
1570         * svg/SVGElement.h:
1571         * svg/SVGUseElement.cpp:
1572         (WebCore::SVGUseElement::willRecalcStyle):
1573         * svg/SVGUseElement.h:
1574
1575 2013-08-07  Mihnea Ovidenie  <mihnea@adobe.com>
1576
1577         [CSSRegions] Wrong auto-height region computation for nested named flows
1578         https://bugs.webkit.org/show_bug.cgi?id=119517
1579
1580         Reviewed by David Hyatt.
1581
1582         Test: fast/regions/abspos-autoheight-nested-region.html
1583
1584         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,
1585         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
1586         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
1587         the auto-height computed value before the start of the layout algorithm.
1588
1589         * rendering/RenderBlock.cpp:
1590         (WebCore::RenderBlock::simplifiedLayout):
1591
1592 2013-08-06  Stephanie Lewis  <slewis@apple.com>
1593
1594         Update Order Files for Safari
1595         <rdar://problem/14517392>
1596
1597         Unreviewed.
1598
1599         No change in functionality.
1600
1601         * WebCore.order:
1602
1603 2013-08-04  Sam Weinig  <sam@webkit.org>
1604
1605         Remove support for HTML5 Microdata
1606         https://bugs.webkit.org/show_bug.cgi?id=119480
1607
1608         Reviewed by Anders Carlsson.
1609
1610         * CMakeLists.txt:
1611         * Configurations/FeatureDefines.xcconfig:
1612         * DerivedSources.cpp:
1613         * DerivedSources.make:
1614         * DerivedSources.pri:
1615         * GNUmakefile.list.am:
1616         * Target.pri:
1617         * UseJSC.cmake:
1618         * WebCore.vcxproj/WebCore.vcxproj:
1619         * WebCore.vcxproj/WebCore.vcxproj.filters:
1620         * WebCore.xcodeproj/project.pbxproj:
1621         * bindings/gobject/GNUmakefile.am:
1622         * bindings/js/JSBindingsAllInOne.cpp:
1623         * bindings/js/JSHTMLCollectionCustom.cpp:
1624         (WebCore::JSHTMLCollection::nameGetter):
1625         * bindings/js/JSHTMLElementCustom.cpp:
1626         * bindings/js/JSMicroDataItemValueCustom.cpp: Removed.
1627         * bindings/scripts/CodeGeneratorJS.pm:
1628         (GenerateImplementation):
1629         * dom/Document.cpp:
1630         * dom/Document.h:
1631         * dom/Document.idl:
1632         * dom/Element.cpp:
1633         (WebCore::Element::ensureCachedHTMLCollection):
1634         * dom/LiveNodeList.cpp:
1635         (WebCore::LiveNodeListBase::rootNode):
1636         (WebCore::LiveNodeListBase::invalidateCache):
1637         (WebCore::LiveNodeList::namedItem):
1638         * dom/LiveNodeList.h:
1639         (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
1640         * dom/MicroDataItemList.cpp: Removed.
1641         * dom/MicroDataItemList.h: Removed.
1642         * dom/Node.cpp:
1643         * dom/Node.h:
1644         * dom/NodeRareData.cpp:
1645         * dom/NodeRareData.h:
1646         * dom/PropertyNodeList.cpp: Removed.
1647         * dom/PropertyNodeList.h: Removed.
1648         * dom/PropertyNodeList.idl: Removed.
1649         * html/CollectionType.h:
1650         * html/HTMLAnchorElement.cpp:
1651         * html/HTMLAnchorElement.h:
1652         * html/HTMLAreaElement.cpp:
1653         * html/HTMLAreaElement.h:
1654         * html/HTMLCollection.cpp:
1655         (WebCore::shouldOnlyIncludeDirectChildren):
1656         (WebCore::rootTypeFromCollectionType):
1657         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
1658         (WebCore::isMatchingElement):
1659         (WebCore::LiveNodeListBase::item):
1660         * html/HTMLElement.cpp:
1661         (WebCore::HTMLElement::parseAttribute):
1662         (WebCore::HTMLElement::isURLAttribute):
1663         * html/HTMLElement.h:
1664         * html/HTMLElement.idl:
1665         * html/HTMLEmbedElement.cpp:
1666         * html/HTMLEmbedElement.h:
1667         * html/HTMLIFrameElement.cpp:
1668         * html/HTMLIFrameElement.h:
1669         * html/HTMLImageElement.cpp:
1670         * html/HTMLImageElement.h:
1671         * html/HTMLLinkElement.cpp:
1672         * html/HTMLLinkElement.h:
1673         * html/HTMLMediaElement.cpp:
1674         * html/HTMLMediaElement.h:
1675         * html/HTMLMetaElement.cpp:
1676         * html/HTMLMetaElement.h:
1677         * html/HTMLObjectElement.cpp:
1678         * html/HTMLObjectElement.h:
1679         * html/HTMLPropertiesCollection.cpp: Removed.
1680         * html/HTMLPropertiesCollection.h: Removed.
1681         * html/HTMLPropertiesCollection.idl: Removed.
1682         * html/HTMLSourceElement.cpp:
1683         * html/HTMLSourceElement.h:
1684         * html/HTMLTrackElement.cpp:
1685         * html/HTMLTrackElement.h:
1686         * html/MicroDataAttributeTokenList.cpp: Removed.
1687         * html/MicroDataAttributeTokenList.h: Removed.
1688         * html/MicroDataItemValue.cpp: Removed.
1689         * html/MicroDataItemValue.h: Removed.
1690         * html/MicroDataItemValue.idl: Removed.
1691
1692 2013-08-06  Tim Horton  <timothy_horton@apple.com>
1693
1694         Remove PlatformCALayer::contentsTransform and ::setContentsTransform
1695         https://bugs.webkit.org/show_bug.cgi?id=119529
1696
1697         Reviewed by Sam Weinig.
1698
1699         No new tests, removing dead code.
1700
1701         These methods are not used and are currently unimplemented.
1702
1703         * platform/graphics/ca/PlatformCALayer.h:
1704         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1705         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1706
1707 2013-08-06  Alex Christensen  <achristensen@apple.com>
1708
1709         Moved GraphicsContext3DPrivate out of cairo directory to be used by the AppleWin port.
1710         https://bugs.webkit.org/show_bug.cgi?id=119525
1711
1712         Reviewed by Dean Jackson.
1713
1714         * GNUmakefile.list.am:
1715         * PlatformGTK.cmake:
1716         * WebCore.vcxproj/WebCore.vcxproj:
1717         * WebCore.vcxproj/WebCore.vcxproj.filters:
1718         Changed location of GraphicsContext3DPrivate.cpp and GraphicsContext3DPrivate.h.
1719         * platform/graphics/GraphicsContext3DPrivate.cpp: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp.
1720         * platform/graphics/GraphicsContext3DPrivate.h: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h.
1721         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: Removed.
1722         * platform/graphics/cairo/GraphicsContext3DPrivate.h: Removed.
1723
1724 2013-08-06  Brent Fulgham  <bfulgham@apple.com>
1725
1726         [Windows] Unreviewed build correction after r153754 and r153757.
1727
1728         * page/animation/CSSPropertyAnimation.cpp:
1729         (WebCore::blendFunc): Don't force std::remainder, since we are using our own
1730         custom implementation on Windows.
1731
1732 2013-08-06  Brent Fulgham  <bfulgham@apple.com>
1733
1734         Improper Calculation of In-band Cue Colors
1735         https://bugs.webkit.org/show_bug.cgi?id=119523
1736
1737         Reviewed by Eric Carlson.
1738
1739         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1740         (WebCore::makeRGBA32FromARGBCFArray): Remove redundant multiplication by
1741         255.  The internal conversion logic already converts to bytes.
1742
1743 2013-08-06  Rob Buis  <rwlbuis@webkit.org>
1744
1745         Speculative build fix after r153754.
1746
1747         * page/animation/CSSPropertyAnimation.cpp:
1748         (WebCore::blendFunc):
1749
1750 2013-07-23  David Farler  <dfarler@apple.com>
1751
1752         Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
1753         https://bugs.webkit.org/show_bug.cgi?id=117762
1754
1755         Reviewed by Mark Rowe.
1756
1757         No new tests necessary.
1758
1759         * Configurations/DebugRelease.xcconfig:
1760         Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
1761         * Configurations/WebCore.xcconfig:
1762         Add ASAN_OTHER_LDFLAGS.
1763         * Configurations/WebCoreTestShim.xcconfig:
1764         Add ASAN_OTHER_LDFLAGS.
1765         * Configurations/WebCoreTestSupport.xcconfig:
1766         Add ASAN_OTHER_LDFLAGS.
1767         * WebCore.xcodeproj/project.pbxproj:
1768         Don't use ASAN for build tools.
1769
1770 2013-08-05  Rob Buis  <rwlbuis@webkit.org>
1771
1772         SVG stroke-dasharray is not animatable
1773         https://bugs.webkit.org/show_bug.cgi?id=118574
1774
1775         Reviewed by Dirk Schulze.
1776
1777         Make stroke-dasharray a property that can be animated using CSS transitions.
1778
1779         * page/animation/CSSPropertyAnimation.cpp:
1780         (WebCore::blendFunc):
1781         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
1782         * rendering/style/RenderStyle.h:
1783
1784 2013-08-06  Sergio Villar Senin  <svillar@igalia.com>
1785
1786         [CSS Grid Layout] Allow defining named grid lines on the grid element
1787         https://bugs.webkit.org/show_bug.cgi?id=118255
1788
1789         Reviewed by Andreas Kling.
1790
1791         From Blink r149798 by <jchaffraix@chromium.org>
1792
1793         This change adds parsing, style resolution and getComputedStyle
1794         support for named grid lines at the grid element level
1795         (i.e. extends our <track-list> support). Per the specification, we
1796         allow multiple grid lines with the same name.
1797
1798         To fully support resolving the grid lines to a position on our
1799         grid, we need to add the parsing at the grid item's level (which
1800         means extending our <grid-line> support). This will be done in a
1801         follow-up change.
1802
1803         Test: fast/css-grid-layout/named-grid-line-get-set.html
1804
1805         * css/CSSComputedStyleDeclaration.cpp:
1806         (WebCore::addValuesForNamedGridLinesAtIndex):
1807         (WebCore::valueForGridTrackList):
1808         (WebCore::ComputedStyleExtractor::propertyValue):
1809         * css/CSSParser.cpp:
1810         (WebCore::CSSParser::parseGridTrackList):
1811         * css/StyleResolver.cpp:
1812         (WebCore::createGridTrackList):
1813         (WebCore::StyleResolver::applyProperty):
1814         * rendering/style/RenderStyle.h:
1815         * rendering/style/StyleGridData.cpp:
1816         (WebCore::StyleGridData::StyleGridData):
1817         * rendering/style/StyleGridData.h:
1818         (WebCore::StyleGridData::operator==):
1819
1820 2013-08-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1821
1822         [Qt] Fix minimal build.
1823
1824         Unreviewed build fix.
1825
1826         Fix build witt XSLT disabled
1827
1828         * xml/parser/XMLDocumentParserLibxml2.cpp:
1829         (WebCore::hasNoStyleInformation):
1830
1831 2013-08-06  Zan Dobersek  <zdobersek@igalia.com>
1832
1833         webkit-gtk fails to build with bison-3.0
1834         https://bugs.webkit.org/show_bug.cgi?id=119373
1835
1836         Reviewed by Gustavo Noronha Silva.
1837
1838         * GNUmakefile.am: Remove rules for generating ANGLE's glslang source files with Bison.
1839
1840 2013-06-26  Sergio Villar Senin  <svillar@igalia.com>
1841
1842         [CSS Grid Layout] Add support for parsing <grid-line> that includes a 'span'
1843         https://bugs.webkit.org/show_bug.cgi?id=118051
1844
1845         Reviewed by Andreas Kling.
1846
1847         From Blink r148766 by <jchaffraix@chromium.org>
1848
1849         This adds the parsing, style resolution and getComputedStyle bits
1850         to our code. The rendering code was not made aware of the new type
1851         of GridPosition yet.
1852
1853         * css/CSSComputedStyleDeclaration.cpp:
1854         (WebCore::valueForGridPosition):
1855         * css/CSSParser.cpp:
1856         (WebCore::CSSParser::parseValue):
1857         (WebCore::CSSParser::parseGridPosition):
1858         * css/CSSParser.h:
1859         * css/CSSValueKeywords.in:
1860         * css/StyleResolver.cpp:
1861         (WebCore::StyleResolver::adjustRenderStyle):
1862         (WebCore::StyleResolver::adjustGridItemPosition):
1863         (WebCore::createGridPosition):
1864         * css/StyleResolver.h:
1865         * rendering/RenderGrid.cpp:
1866         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1867         * rendering/style/GridPosition.h:
1868         (WebCore::GridPosition::isInteger):
1869         (WebCore::GridPosition::isSpan):
1870         (WebCore::GridPosition::setSpanPosition):
1871         (WebCore::GridPosition::spanPosition):
1872
1873 2013-06-25  Sergio Villar Senin  <svillar@igalia.com>
1874
1875         [CSS Grid Layout] Rename grid placement properties
1876         https://bugs.webkit.org/show_bug.cgi?id=117878
1877
1878         Reviewed by Andreas Kling.
1879
1880         Renamed the grid placement properties to match the latest version
1881         of the spec. The new names are -webkit-grid-column-{start|end} and
1882         -webkit-grid-row-{start|end}.
1883
1884         No new tests needed as we're just renaming some properties,
1885         functionality already covered by existing tests in
1886         fast/css-grid-layout.
1887
1888         * css/CSSComputedStyleDeclaration.cpp:
1889         (WebCore::ComputedStyleExtractor::propertyValue):
1890         * css/CSSParser.cpp:
1891         (WebCore::CSSParser::parseValue):
1892         * css/CSSProperty.cpp:
1893         (WebCore::CSSProperty::isInheritedProperty):
1894         * css/CSSPropertyNames.in:
1895         * css/StylePropertyShorthand.cpp:
1896         (WebCore::webkitGridColumnShorthand):
1897         (WebCore::webkitGridRowShorthand):
1898         * css/StyleResolver.cpp:
1899         (WebCore::StyleResolver::applyProperty):
1900         * rendering/RenderGrid.cpp:
1901         (WebCore::RenderGrid::maximumIndexInDirection):
1902         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1903         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1904         * rendering/RenderGrid.h:
1905         * rendering/style/RenderStyle.h:
1906         * rendering/style/StyleGridItemData.cpp:
1907         (WebCore::StyleGridItemData::StyleGridItemData):
1908         * rendering/style/StyleGridItemData.h:
1909         (WebCore::StyleGridItemData::operator==):
1910
1911 2013-08-05  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
1912
1913         [WebGL] validateRenderingState method name change
1914         https://bugs.webkit.org/show_bug.cgi?id=119485
1915
1916         According to validateRenderingState method functionality its name should be
1917         changed. This method validates only vertex attributes.
1918
1919         Reviewed by Dean Jackson.
1920
1921         No new tests. Covered by existing tests. No changes in functionality.
1922
1923         * html/canvas/WebGLRenderingContext.cpp:
1924         (WebCore::WebGLRenderingContext::validateVertexAttributes):
1925         (WebCore::WebGLRenderingContext::drawArrays):
1926         (WebCore::WebGLRenderingContext::drawElements):
1927         * html/canvas/WebGLRenderingContext.h:
1928
1929 2013-07-27  Mark Rowe  <mrowe@apple.com>
1930
1931         Logging should be configurable using human-readable channel names rather than crazy bitmasks
1932         <http://webkit.org/b/119031>
1933
1934         Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
1935         and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
1936
1937         Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
1938         "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
1939         being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
1940         for history and loading being enabled.
1941
1942         For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
1943         the old user defaults to remain set for those people that need to switch between version of WebKit before and
1944         after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
1945         the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
1946
1947         For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
1948         consistency with the other platforms and to enable more code sharing.
1949
1950         While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
1951         adding a new logging channel. Now only the header in the relevant project needs to be updated.
1952
1953         Reviewed by Sam Weinig.
1954
1955         * GNUmakefile.list.am: Remove the now-unused InitializeLogging.h
1956         * Target.pri: Ditto.
1957         * WebCore.xcodeproj/project.pbxproj: Ditto.
1958         * platform/InitializeLogging.h: Removed. Ditto.
1959         * platform/Logging.cpp: Use WEBCORE_LOG_CHANNELS to define all of the channels.
1960         (WebCore::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
1961         to find a log channel rather than repeating the names of the log channels a further two times each.
1962         (WebCore::initializeLoggingChannelsIfNecessary): Pass the channels and the log level string to the new
1963         WTF function that handles the initialization.
1964         * platform/Logging.h: Declare a WEBCORE_LOG_CHANNELS macro that can be used to apply a preprocessor macro
1965         across the set of all logging channels. Use this macro to declare the logging channels.
1966         * platform/blackberry/LoggingBlackBerry.cpp:
1967         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
1968         * platform/efl/LoggingEfl.cpp:
1969         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
1970         NotYetImplemented to it so that that channel will be enabled by default.
1971         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1972         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Accommodate the rename to logChannelByName.
1973         * platform/gtk/LoggingGtk.cpp:
1974         (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
1975         NotYetImplemented to it so that that channel will be enabled by default.
1976         * platform/mac/LoggingMac.mm:
1977         (WebCore::logLevelString): Pull the value out of the WebCoreLogging user default key.
1978         * platform/qt/LoggingQt.cpp:
1979         (WebCore::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable, and then prepend
1980         NotYetImplemented to it so that the channel will be enabled by default.
1981         * platform/win/LoggingWin.cpp:
1982         (WebCore::logLevelString): Pull the value out of the WebCoreLogging environment variable.
1983
1984 2013-08-05  Ryosuke Niwa  <rniwa@webkit.org>
1985
1986         Editor::updateMarkersForWordsAffectedByEditing(bool) shouldn't compute start and end of words when there are nor markers
1987         https://bugs.webkit.org/show_bug.cgi?id=119501
1988
1989         Reviewed by Enrica Casucci.
1990
1991         Exit early in updateMarkersForWordsAffectedByEditing before calling startOfWord and endOfWord if there are no document markers.
1992
1993         * dom/DocumentMarkerController.h:
1994         (WebCore::DocumentMarkerController::hasMarkers): Added.
1995         * editing/Editor.cpp:
1996         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1997
1998 2013-08-05  Dean Jackson  <dino@apple.com>
1999
2000         Update HTMLPreloadScanner to handle img srcset
2001         https://bugs.webkit.org/show_bug.cgi?id=119360
2002
2003         Reviewed by Sam Weinig.
2004
2005         This patch is a merge of similar patches from Yoav Weiss <yoav@yoav.ws>
2006         and Dean Jackson.
2007
2008         Test: fast/preloader/image-srcset.html
2009
2010         * html/HTMLImageElement.cpp:
2011         (WebCore::HTMLImageElement::parseAttribute): Move srcset parsing into
2012         HTMLParserIdioms, and call it when we hit src or srcset.
2013         * html/HTMLImageElement.h: Remove code that was moved to HTMLParserIdioms.
2014
2015         * html/parser/HTMLDocumentParser.cpp:
2016         (WebCore::HTMLDocumentParser::pumpTokenizer): Pass device scale into preloader.
2017         (WebCore::HTMLDocumentParser::insert):
2018
2019         * html/parser/HTMLPreloadScanner.cpp:
2020         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Takes device scale as a parameter.
2021         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Resolve between src and srcSet if necessary.
2022         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add support for srcset attribute.
2023         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): New flag to indicate if we should
2024         replace any existing value.
2025         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Takes device scale.
2026         (WebCore::TokenPreloadScanner::scanCommon): Pass device scale.
2027         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2028         * html/parser/HTMLPreloadScanner.h: New attribute to constructor for device scale. New member
2029         variable on TokenPreloadScanner that holds the srcset value.
2030
2031         * html/parser/HTMLParserIdioms.cpp:
2032         (WebCore::ImageWithScale::operator==): Used for sorting.
2033         (WebCore::compareByScaleFactor): Used for sorting.
2034         (WebCore::bestFitSourceForImageAttributes): New method that takes the code from HTMLImageElement
2035         for parsing src and srcset attributes, and finding the best match.
2036         * html/parser/HTMLParserIdioms.h:
2037
2038 2013-08-05  Oliver Hunt  <oliver@apple.com>
2039
2040         Move TypedArray implementation into JSC
2041         https://bugs.webkit.org/show_bug.cgi?id=119489
2042
2043         Reviewed by Filip Pizlo.
2044
2045         Update WebCore for new location of TypedArray implementation.
2046
2047         * ForwardingHeaders/runtime/ArrayBuffer.h: Added.
2048         * ForwardingHeaders/runtime/ArrayBufferView.h: Added.
2049         * ForwardingHeaders/runtime/Float32Array.h: Added.
2050         * ForwardingHeaders/runtime/Float64Array.h: Added.
2051         * ForwardingHeaders/runtime/Int16Array.h: Added.
2052         * ForwardingHeaders/runtime/Int32Array.h: Added.
2053         * ForwardingHeaders/runtime/Int8Array.h: Added.
2054         * ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
2055         * ForwardingHeaders/runtime/TypedArrayBase.h: Added.
2056         * ForwardingHeaders/runtime/Uint16Array.h: Added.
2057         * ForwardingHeaders/runtime/Uint32Array.h: Added.
2058         * ForwardingHeaders/runtime/Uint8Array.h: Added.
2059         * ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
2060         * Modules/webaudio/AnalyserNode.h:
2061         (WebCore::AnalyserNode::getFloatFrequencyData):
2062         (WebCore::AnalyserNode::getByteFrequencyData):
2063         (WebCore::AnalyserNode::getByteTimeDomainData):
2064         * Modules/webaudio/AsyncAudioDecoder.cpp:
2065         * Modules/webaudio/AsyncAudioDecoder.h:
2066         (WebCore::AsyncAudioDecoder::DecodingTask::audioData):
2067         * Modules/webaudio/AudioBuffer.h:
2068         * Modules/webaudio/AudioContext.cpp:
2069         * Modules/webaudio/AudioParam.h:
2070         * Modules/webaudio/AudioParamTimeline.h:
2071         * Modules/webaudio/PeriodicWave.h:
2072         * Modules/webaudio/RealtimeAnalyser.cpp:
2073         * Modules/webaudio/RealtimeAnalyser.h:
2074         * Modules/webaudio/ScriptProcessorNode.cpp:
2075         * Modules/webaudio/WaveShaperProcessor.h:
2076         * Modules/websockets/ThreadableWebSocketChannel.h:
2077         * Modules/websockets/WebSocket.cpp:
2078         * Modules/websockets/WebSocket.h:
2079         * Modules/websockets/WebSocketChannel.cpp:
2080         * Modules/websockets/WebSocketChannel.h:
2081         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2082         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2083         * WebCore.exp.in:
2084         * bindings/js/JSArrayBufferCustom.cpp:
2085         * bindings/js/JSArrayBufferViewHelper.h:
2086         * bindings/js/JSAudioContextCustom.cpp:
2087         * bindings/js/JSCryptoCustom.cpp:
2088         * bindings/js/JSDictionary.h:
2089         * bindings/js/JSFileReaderCustom.cpp:
2090         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2091         * bindings/js/JSXMLHttpRequestCustom.cpp:
2092         * bindings/js/SerializedScriptValue.cpp:
2093         (WebCore::SerializedScriptValue::transferArrayBuffers):
2094         * bindings/js/SerializedScriptValue.h:
2095         * bindings/scripts/CodeGeneratorJS.pm:
2096         (AddIncludesForType):
2097         (GenerateHeader):
2098         (NativeToJSValue):
2099         * dom/MessageEvent.h:
2100         * fileapi/FileReader.cpp:
2101         * fileapi/FileReader.h:
2102         * fileapi/FileReaderLoader.cpp:
2103         * fileapi/FileReaderLoader.h:
2104         * fileapi/FileReaderSync.cpp:
2105         * fileapi/FileReaderSync.h:
2106         * fileapi/WebKitBlobBuilder.cpp:
2107         * fileapi/WebKitBlobBuilder.h:
2108         * html/HTMLMediaElement.cpp:
2109         * html/ImageData.h:
2110         * html/canvas/ArrayBuffer.idl:
2111         * html/canvas/ArrayBufferView.idl:
2112         * html/canvas/CanvasRenderingContext2D.cpp:
2113         * html/canvas/DataView.h:
2114         * html/canvas/Float32Array.idl:
2115         * html/canvas/Float64Array.idl:
2116         * html/canvas/Int16Array.idl:
2117         * html/canvas/Int32Array.idl:
2118         * html/canvas/Int8Array.idl:
2119         * html/canvas/Uint16Array.idl:
2120         * html/canvas/Uint32Array.idl:
2121         * html/canvas/Uint8Array.idl:
2122         * html/canvas/Uint8ClampedArray.idl:
2123         * html/canvas/WebGLBuffer.h:
2124         (WebCore::WebGLBuffer::elementArrayBuffer):
2125         * html/canvas/WebGLGetInfo.cpp:
2126         * html/canvas/WebGLGetInfo.h:
2127         * html/canvas/WebGLRenderingContext.cpp:
2128         * html/canvas/WebGLRenderingContext.h:
2129         * inspector/InspectorMemoryAgent.cpp:
2130         * page/Crypto.cpp:
2131         * page/Crypto.h:
2132         * platform/graphics/GraphicsContext3D.cpp:
2133         * platform/graphics/ImageBuffer.h:
2134         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2135         * platform/graphics/cg/ImageBufferDataCG.h:
2136         * platform/graphics/filters/FEBlend.cpp:
2137         * platform/graphics/filters/FEColorMatrix.cpp:
2138         * platform/graphics/filters/FEComponentTransfer.cpp:
2139         * platform/graphics/filters/FEComposite.cpp:
2140         * platform/graphics/filters/FEConvolveMatrix.cpp:
2141         * platform/graphics/filters/FECustomFilter.cpp:
2142         * platform/graphics/filters/FEDisplacementMap.cpp:
2143         * platform/graphics/filters/FEDropShadow.cpp:
2144         * platform/graphics/filters/FEGaussianBlur.cpp:
2145         * platform/graphics/filters/FELighting.h:
2146         * platform/graphics/filters/FEMorphology.cpp:
2147         * platform/graphics/filters/FETurbulence.cpp:
2148         * platform/graphics/filters/FilterEffect.cpp:
2149         * platform/graphics/filters/FilterEffect.h:
2150         * platform/graphics/mac/GraphicsContext3DMac.mm:
2151         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2152         * testing/Internals.h:
2153         * xml/XMLHttpRequest.cpp:
2154         * xml/XMLHttpRequest.h:
2155         (WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
2156
2157 2013-08-05  Alexey Proskuryakov  <ap@apple.com>
2158
2159         <rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
2160         of text when dictating an e-mail
2161         https://bugs.webkit.org/show_bug.cgi?id=119496
2162
2163         Reviewed by Ryosuke Niwa.
2164
2165         Test: platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
2166
2167         * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
2168         FloatRect::unite() doesn't preserve empty rects, which we need here.
2169         We alrady handle the case of collapsed range in Editor::firstRectForRange(), and
2170         this is similar, but we can't currently cover both with one simple fix.
2171
2172 2013-08-05  Morten Stenshorne  <mstensho@opera.com>
2173
2174         Region based columns not painted correctly in non-default writing-modes
2175         https://bugs.webkit.org/show_bug.cgi?id=118506
2176
2177         Reviewed by David Hyatt.
2178
2179         The column translation offset was calculated incorrectly.
2180         The dirty rect intersection check was also wrong.
2181
2182         Added some documentation, to make it clear what's going on.
2183
2184         Tests: fast/multicol/newmulticol/hide-box-horizontal-bt.html
2185                fast/multicol/newmulticol/hide-box-vertical-lr.html
2186                fast/multicol/newmulticol/hide-box-vertical-rl.html
2187
2188         * rendering/RenderMultiColumnSet.cpp:
2189         (WebCore::RenderMultiColumnSet::collectLayerFragments):
2190
2191 2013-08-05  Morten Stenshorne  <mstensho@opera.com>
2192
2193         Region based columns not clipped properly
2194         https://bugs.webkit.org/show_bug.cgi?id=118499
2195
2196         Reviewed by David Hyatt.
2197
2198         Need to call RenderRegion::overflowRectForFlowThreadPortion() first,
2199         and THEN clip in the column gaps. overflowRectForFlowThreadPortion()
2200         expands the logical left and right to the flow thread's overflow
2201         rectangle, effectively defeating inline direction clipping completely.
2202
2203         Tests: fast/multicol/newmulticol/clipping-overflow-hidden.html
2204                fast/multicol/newmulticol/clipping-top-overflow.html
2205                fast/multicol/newmulticol/clipping.html
2206
2207         * rendering/RenderMultiColumnSet.cpp:
2208         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
2209
2210 2013-08-05  Vivek Galatage  <vivek.vg@samsung.com>
2211
2212         XMLTreeViewer should be created only in the XML viewer mode
2213         https://bugs.webkit.org/show_bug.cgi?id=119483
2214
2215         Reviewed by Alexey Proskuryakov.
2216
2217         XMLTreeViewer is created even for the XSL transform which is avoided by the patch.
2218         The XMLTreeViewer::hasNoStyleInformation() is moved to XMLDocumentParserLibxml2.cpp
2219         as static inline method as XMLTreeViewer should not have the responsibility for it.
2220         Also removes an unnecessary conditional check while deciding for XML viewer mode.
2221
2222         Blink patch review links:
2223         https://codereview.chromium.org/19552003/
2224         https://codereview.chromium.org/22150003/
2225
2226         No new tests as the patch is about code refactoring.
2227
2228         * xml/XMLTreeViewer.cpp:
2229         * xml/XMLTreeViewer.h:
2230         * xml/parser/XMLDocumentParserLibxml2.cpp:
2231         (WebCore::hasNoStyleInformation):
2232         (WebCore::XMLDocumentParser::doEnd):
2233
2234 2013-08-03  Jer Noble  <jer.noble@apple.com>
2235
2236         Loading a video with a custom URL scheme will result in stalling playback
2237         https://bugs.webkit.org/show_bug.cgi?id=119469
2238
2239         Reviewed by Eric Carlson.
2240
2241         Break the assumption that only one AVAssetResourceRequest will be outstanding simultaneously
2242         by storing a HashMap of AVAssetResourceRequests and their resulting WebCoreAVFResourceLoader.
2243         When loading is stopped (due to completion or error), notify the MediaPlayerPrivateAVFoundation
2244         parent so that the map can be emptied.
2245
2246         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2247         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2248         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Store the request
2249             in m_resourceLoaderMap.
2250         (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Pull the request from
2251             m_resourceLoaderMap.
2252         (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Remove the requset from
2253             m_resourceLoaderMap.
2254         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
2255         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2256         (WebCore::WebCoreAVFResourceLoader::create): Return a PassRefPtr, rather than a PassOwnPtr.
2257         (WebCore::WebCoreAVFResourceLoader::stopLoading): Call didStopLoadingRequest.
2258
2259 2013-08-05  Abhijeet Kandalkar  <abhijeet.k@samsung.com>
2260
2261         Spatial Navigation should avoid unwanted calculation while deciding focus candidate.
2262         https://bugs.webkit.org/show_bug.cgi?id=117265
2263
2264         Reviewed by Antonio Gomes.
2265
2266         Spatial Navigation should consider only those nodes as candidate which are exactly in the focus-direction.
2267         e.g. If we are moving down then the nodes that are above CURRENT focused node should be considered as invalid.
2268         Added isValidCandidate() which checks whether node is exactly in the focus-direction.
2269
2270         Test: fast/spatial-navigation/snav-search-optimization.html
2271
2272         * page/FocusController.cpp:
2273         (WebCore::FocusController::findFocusCandidateInContainer):
2274         (WebCore::FocusController::advanceFocusDirectionally):
2275         * page/Page.cpp:
2276         (WebCore::Page::Page):
2277         * page/Page.h:
2278         (WebCore::Page::setLastSpatialNavigationCandidateCount):
2279         (WebCore::Page::lastSpatialNavigationCandidateCount):
2280         * page/SpatialNavigation.cpp:
2281         (WebCore::isValidCandidate):
2282         * page/SpatialNavigation.h:
2283         * testing/Internals.cpp:
2284         (WebCore::Internals::lastSpatialNavigationCandidateCount):
2285         * testing/Internals.h:
2286         * testing/Internals.idl:
2287
2288 2013-08-05  Mihai Tica  <mitica@adobe.com>
2289
2290         [CSS Background Blending] Specifying background-image and background-color
2291         with opaque image doesn't trigger blending. The fix consists of adding a
2292         check whether blend mode is set in hasOpaqueImage.
2293
2294         https://bugs.webkit.org/show_bug.cgi?id=119434
2295
2296         Reviewed by Dirk Schulze.
2297
2298         Test: css3/compositing/background-blend-mode-separate-layer-declaration.html
2299
2300         * rendering/style/FillLayer.cpp:
2301         (WebCore::FillLayer::hasOpaqueImage):
2302
2303 2013-08-04  Zalan Bujtas  <zalan@apple.com>
2304
2305         Background doesn't fully repaint when body has margins.
2306         https://bugs.webkit.org/show_bug.cgi?id=119033
2307
2308         Reviewed by Simon Fraser.
2309
2310         Ensure that background-color changes do not leave unpainted areas when
2311         body has margins.
2312
2313         Both <body> and <html> background-color get propagated up to the viewport.
2314         If <body> has background-color attribute set, while <html> doesn't, the color is
2315         applied not only on the <body> but on both the <html> and the viewport. However,
2316         it's not enough to mark the RenderView dirty because with tiles backing on,
2317         there could be areas outside of the viewport that need repaint. By marking
2318         the RenderView's graphics layer dirty instead, we ensure that all the related
2319         tiles get marked dirty too and the new background color covers all areas.
2320
2321         Manual test added. When forcing top-level composition on (even with embedded iframe to
2322         make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
2323         that the repaint rects don't reflect the functionality difference anymore.
2324
2325         * page/FrameView.cpp:
2326         (WebCore::FrameView::reset):
2327         (WebCore::FrameView::layout):
2328         * page/FrameView.h:
2329         (WebCore::FrameView::needsFullRepaint):
2330         * rendering/RenderBox.cpp:
2331         (WebCore::RenderBox::styleWillChange):
2332         * rendering/RenderObjectChildList.cpp:
2333         (WebCore::RenderObjectChildList::removeChildNode):
2334         * rendering/RenderView.cpp:
2335         (WebCore::RenderView::repaintRootContents):
2336         (WebCore::RenderView::repaintViewAndCompositedLayers):
2337         * rendering/RenderView.h:
2338
2339 2013-08-04  Andreas Kling  <akling@apple.com>
2340
2341         Document needn't expose its active element.
2342         <http://webkit.org/b/119466>
2343
2344         Reviewed by Antonio Gomes.
2345
2346         The Document::m_activeElement pointer is only used inside updateHoverActiveState(),
2347         so we can remove the activeElement()/setActiveElement() accessors.
2348
2349         * dom/Document.h:
2350         * dom/Document.cpp:
2351         (WebCore::Document::updateHoverActiveState):
2352
2353 2013-08-04  Andreas Kling  <akling@apple.com>
2354
2355         Inserting a rule into an empty style sheet shouldn't trigger style recalc unless necessary.
2356         <http://webkit.org/b/119475>
2357         <rdar://problem/14643481>
2358
2359         Reviewed by Antti Koivisto.
2360
2361         This is kind of a cheesy optimization, but it turns out that the use case is quite common.
2362         The pattern goes like this:
2363
2364             (1) Create <style> element.
2365             (2) Add it to the document's <head>.
2366             (3) .addRule() one rule through the CSSOM API.
2367
2368         Prior to this patch, (3) would always cause a full (deferred) style recalc.
2369
2370         Now that we exclude empty style sheets from the document's (effective) active set,
2371         we can piggyback on the style invalidation analysis when transitioning from an empty
2372         sheet to a single-rule sheet.
2373
2374         In other words, add a special code path for the first rule insertion into an empty,
2375         in-document style sheet to minimize the amount of invalidation that happens.
2376
2377         * css/CSSStyleSheet.cpp:
2378         (WebCore::CSSStyleSheet::didMutateRules):
2379         (WebCore::CSSStyleSheet::insertRule):
2380         * css/CSSStyleSheet.h:
2381         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
2382         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
2383
2384 2013-08-04  Claudio Saavedra  <csaavedra@igalia.com>
2385
2386         [GTK] Fix a C++11 warning.
2387
2388         Rubber-stamped by Martin Robinson.
2389
2390         * platform/gtk/FileSystemGtk.cpp:
2391         (WebCore::sharedResourcesPath): Fix a C++11 warning.
2392
2393 2013-08-04  Diego Pino Garcia  <dpino@igalia.com>
2394
2395         [GTK] Remove legacy hack in CodeGeneratorGObject.pm
2396         https://bugs.webkit.org/show_bug.cgi?id=117545
2397
2398         Reviewed by Carlos Garcia Campos.
2399
2400         There's a checking that sets gtype to uint in case it's ushort. gtype 
2401         is a value obtained from GetGValueTypeName(), which never returns 
2402         ushort.
2403
2404         * bindings/scripts/CodeGeneratorGObject.pm:
2405         (GenerateProperty): remove unnecessary glitch
2406
2407 2013-08-04  Andreas Kling  <akling@apple.com>
2408
2409         [Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
2410         <http://webkit.org/b/119474>
2411         <rdar://problem/14643349>
2412
2413         Reviewed by Dan Bernstein.
2414
2415         Disable screen font substitution by default in Settings so internal WebCore clients
2416         such as SVG-as-image will get the right default setting.
2417
2418         * page/Settings.cpp:
2419         (WebCore::Settings::Settings):
2420         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
2421         (WebCore::Settings::setScreenFontSubstitutionEnabled):
2422         * page/Settings.h:
2423         (WebCore::Settings::screenFontSubstitutionEnabled):
2424         * page/Settings.in:
2425         * page/mac/SettingsMac.mm:
2426         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
2427
2428 2013-08-03  Tim Horton  <timothy_horton@apple.com>
2429
2430         Refine the unavailable plug-in indicator
2431         https://bugs.webkit.org/show_bug.cgi?id=119400
2432         <rdar://problem/14616012>
2433
2434         Reviewed by Oliver Hunt.
2435
2436         Add a border, flip the text and background colors, and make the indicator
2437         much higher contrast, to be more visible on a variety of sites.
2438         Also, refine the arrow to be less blocky and inlaid inside a circle.
2439
2440         * rendering/RenderEmbeddedObject.cpp:
2441         (WebCore::replacementTextRoundedRectPressedColor):
2442         (WebCore::replacementTextRoundedRectColor):
2443         (WebCore::replacementTextColor):
2444         (WebCore::unavailablePluginBorderColor):
2445         (WebCore::drawReplacementArrow):
2446         (WebCore::RenderEmbeddedObject::paintReplaced):
2447         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2448         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
2449         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2450         * rendering/RenderEmbeddedObject.h:
2451
2452 2013-08-03  Yoav Weiss  <yoav@yoav.ws>
2453
2454         PreloadScanner preloads external CSS with non-matching media attribute
2455         https://bugs.webkit.org/show_bug.cgi?id=106198
2456
2457         Reviewed by Dean Jackson.
2458
2459         Test: http/tests/loading/preload-css-test.html
2460
2461         * html/parser/HTMLPreloadScanner.cpp:
2462         Remove m_linkMediaAttributeIsScreen
2463         Remove MediaQueryEvaluator calls
2464         Add m_mediaAttribute that gets the value of the "media" attribute
2465         Pass m_mediaAttribute to PreloadRequest
2466         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
2467         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
2468         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2469         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
2470         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
2471         * html/parser/HTMLResourcePreloader.cpp:
2472         Add MediaQueryEvaluator calls to see if "media" matches
2473         Perform preload only to resource with a matching media (if media exists)
2474         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2475         (WebCore::mediaAttributeMatches):
2476         (WebCore::HTMLResourcePreloader::preload):
2477         * html/parser/HTMLResourcePreloader.h:
2478         Add a constructor with a mediaAttribute value
2479         Add m_mediaAttribute & its getter.
2480         (WebCore::PreloadRequest::create):
2481         (WebCore::PreloadRequest::media):
2482         (WebCore::PreloadRequest::PreloadRequest):
2483
2484 2013-08-03  Andreas Kling  <akling@apple.com>
2485
2486         RenderBoxModelObject::firstLetterRemainingText should be a RenderTextFragment*.
2487         <http://webkit.org/b/119181>
2488
2489         Reviewed by Sam Weinig.
2490
2491         De-generalize this code a bit since we know that the firstLetterRemainingText() is always
2492         going to be a RenderTextFragment.
2493
2494         * rendering/RenderBoxModelObject.h:
2495         * rendering/RenderBoxModelObject.cpp:
2496         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
2497         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText):
2498
2499             Make these two deal in RenderTextFragment*.
2500
2501         * rendering/RenderBlock.cpp:
2502         (WebCore::RenderBlock::updateFirstLetterStyle):
2503
2504             Tighten up some pointer types so we don't have to cast as much.
2505
2506 2013-08-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2507
2508         Introduce toSVGMaskElement(), and use it
2509         https://bugs.webkit.org/show_bug.cgi?id=119443
2510
2511         Reviewed by Andreas Kling.
2512
2513         As a step to change static_cast with toSVGXXX, static_cast<SVGMaskElement*> can
2514         be changed with toSVGMaskElement().
2515
2516         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155432
2517
2518         * rendering/svg/RenderSVGResourceMasker.cpp:
2519         (WebCore::RenderSVGResourceMasker::applyResource):
2520         (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
2521         * rendering/svg/RenderSVGResourceMasker.h:
2522         * svg/SVGMaskElement.h:
2523         (WebCore::toSVGMaskElement):
2524
2525 2013-08-02  Benjamin Poulain  <bpoulain@apple.com>
2526
2527         REGRESSION (r153005): Crash in SpaceSplitString::spaceSplitStringContainsValue on Facebook
2528         https://bugs.webkit.org/show_bug.cgi?id=119384
2529
2530         Reviewed by Alexey Proskuryakov.
2531
2532         When removing the "rel" attribute from HTMLAnchorElement, we parse the attribute for no value.
2533         Following r153005, we no longer checked for null String, which caused a crash in that case.
2534
2535         Creating a SpaceSplitString from a null string causes the SpaceSplitString to be null. In that case
2536         SpaceSplitString::contains() would always return false.
2537         This patch modify SpaceSplitString::spaceSplitStringContainsValue() to follow the exact same
2538         behavior.
2539
2540         Test: fast/dom/HTMLAnchorElement/remove-rel-attribute.html
2541
2542         * dom/SpaceSplitString.cpp:
2543         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2544
2545 2013-08-02  Dean Jackson  <dino@apple.com>
2546
2547         Force elements with perspective or preserve-3d to disallow direct composited backgrounds
2548         https://bugs.webkit.org/show_bug.cgi?id=119462
2549         <rdar://problem/14607548>
2550
2551         Reviewed by Simon Fraser.
2552
2553         Bug 119461 (http://wkb.ug/119461) describes how a directly composited
2554         background color can intersect with its children. It's not clear exactly
2555         what the best way to fix that is, but for the moment we should disallow
2556         any element that has perspective or a preserve-3d transform style from
2557         getting a directly composited background.
2558
2559         Test: compositing/background-color/no-composited-background-color-when-perspective.html
2560
2561         * rendering/RenderLayerBacking.cpp:
2562         (WebCore::hasPerspectiveOrPreserves3D): New static helper.
2563         (WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
2564
2565 2013-08-02  Oliver Hunt  <oliver@apple.com>
2566
2567         Update binding test results
2568
2569         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2570         (WebCore::JSFloat64Array::getOwnPropertySlot):
2571         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
2572         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2573         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
2574         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2575         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
2576
2577 2013-08-02  Gavin Barraclough  <barraclough@apple.com>
2578
2579         Remove no-arguments constructor to PropertySlot
2580         https://bugs.webkit.org/show_bug.cgi?id=119460
2581
2582         Reviewed by Geoff Garen.
2583
2584         This constructor was unsafe if getValue is subsequently called,
2585         and the property is a getter. Simplest to just remove it.
2586
2587         * bindings/js/JSDOMWindowCustom.cpp:
2588         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
2589         (WebCore::DialogHandler::returnValue):
2590         * bindings/js/JSHistoryCustom.cpp:
2591         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
2592         * bindings/js/JSLocationCustom.cpp:
2593         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2594         * bindings/js/JSPluginElementFunctions.cpp:
2595         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
2596         * bindings/js/JSStorageCustom.cpp:
2597         (WebCore::JSStorage::deleteProperty):
2598         (WebCore::JSStorage::putDelegate):
2599         * bindings/scripts/CodeGeneratorJS.pm:
2600         (GenerateGetOwnPropertyDescriptorBody):
2601         * bridge/runtime_array.cpp:
2602         (JSC::RuntimeArray::getOwnPropertyDescriptor):
2603         * bridge/runtime_method.cpp:
2604         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
2605         * bridge/runtime_object.cpp:
2606         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2607
2608 2013-08-02  Andreas Kling  <akling@apple.com>
2609
2610         Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
2611         <http://webkit.org/b/119442>
2612         <rdar://problem/14631785>
2613
2614         Reviewed by Antti Koivisto.
2615
2616         Let Document decide whether or not to do a style recalc after a <link> element is removed.
2617         This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
2618
2619         Some Facebook pages have a <link rel="stylesheet" href="data:text/css;base64,"> that gets
2620         removed during the initial page load, causing style recalc.
2621
2622         * html/HTMLLinkElement.cpp:
2623         (WebCore::HTMLLinkElement::removedFrom):
2624
2625             Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
2626             cause a recalc (because it's no longer in the set of active sheets) or do nothing.
2627
2628 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
2629
2630         Remove WebCore folder from include statements
2631         https://bugs.webkit.org/show_bug.cgi?id=119438
2632
2633         Reviewed by Darin Adler.
2634
2635         This aligns the style of the changed files with the other WebCore code.
2636
2637         * platform/network/curl/CurlDownload.cpp:
2638         * platform/network/curl/CurlDownload.h:
2639
2640 2013-08-02  Ryosuke Niwa  <rniwa@webkit.org>
2641
2642         FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
2643         https://bugs.webkit.org/show_bug.cgi?id=119309
2644
2645         Reviewed by Kent Tamura.
2646
2647         Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
2648
2649         I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
2650
2651         * html/FormAssociatedElement.cpp:
2652         (WebCore::FormAssociatedElement::formAttributeChanged):
2653         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2654
2655 2013-08-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2656
2657         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
2658         https://bugs.webkit.org/show_bug.cgi?id=119316
2659
2660         Reviewed by Ryosuke Niwa.
2661
2662         As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
2663         information even if nodes are disconnected:
2664         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
2665
2666         This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
2667
2668         No new tests, covered by existing tests.
2669
2670         * dom/Node.cpp:
2671         (WebCore::compareDetachedElementsPosition):
2672         (WebCore::Node::compareDocumentPosition):
2673
2674 2013-08-02  Simon Fraser  <simon.fraser@apple.com>
2675
2676         Revert r153632, since it caused fast/forms/change-form-element-document-crash.html
2677         to assert.
2678
2679         * html/FormAssociatedElement.cpp:
2680         (WebCore::FormAssociatedElement::formAttributeChanged):
2681         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2682
2683 2013-08-02  Mario Sanchez Prada  <mario.prada@samsung.com>
2684
2685         Implement atk_text_get_text_*_offset for WORD
2686         https://bugs.webkit.org/show_bug.cgi?id=114871
2687
2688         Reviewed by Martin Robinson.
2689
2690         Re-implement this functions without using GailTextUtil nor Pango.
2691
2692         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2693         (textForObject): Made the parameter a const, to avoid warnings.
2694         (getSelectionOffsetsForObject): Add special cases for END boundaries.
2695         (emptyTextSelectionAtOffset): Convenience function to be used in
2696         early returns from functions returning both text and offsets.
2697         (webkitAccessibleTextGetChar): Use emptyTextSelectionAtOffset(),
2698         and remove checks that are now done outside of this function, in
2699         webkitAccessibleTextGetTextForOffset().
2700         (nextWordStartPosition): Helper function to reliably find the
2701         start of the next word as and user would do it by navigating with
2702         Ctrl and the arrows (considering spaces and punctuation).
2703         (previousWordEndPosition): Similar to nextWordStartPosition, but
2704         written to help find the end of the previous one.
2705         (wordAtPositionForAtkBoundary): Helper function to find the word
2706         at a given position considering values of AtkTextBoundary.
2707         (numberOfReplacedElementsBeforeOffset): Helper function to help
2708         figure out how many embedded objects we have exposed for an
2709         AtkText object, used to adjust offsets coming from outside.
2710         (webkitAccessibleTextGetWordForBoundary): New function,
2711         implementing atk_text_get_text_*_offset for WORD.
2712         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
2713         WORD boundaries with webkitAccessibleTextGetWordForBoundary().
2714         Also, moved the initialization of the start and end offsets to the
2715         bottom, into the gail/pango section, since those values will be
2716         from now on initialized in getSelectionOffsetsForObject().
2717         (webkitAccessibleTextGetSelection): Removed the initialization of
2718         the start and end offsets, since those values will be from now on
2719         initialized in getSelectionOffsetsForObject().
2720
2721 2013-08-02  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2722
2723         Buildfix for !ENABLE(SVG) platforms after r153581.
2724         https://bugs.webkit.org/show_bug.cgi?id=119444
2725
2726         Reviewed by Andreas Kling.
2727
2728         Adding missing guards.
2729
2730         * css/StylePropertyShorthand.cpp:
2731         (WebCore::matchingShorthandsForLonghand):
2732         * css/StylePropertyShorthand.h:
2733
2734 2013-08-02  Brady Eidson  <beidson@apple.com>
2735
2736         REGRESSION (r130783): Scrolling is broken going back to a cached page from a page that still has outstanding subresources.
2737         <rdar://problem/14601124> and https://bugs.webkit.org/show_bug.cgi?id=119416
2738
2739         Reviewed by Darin Adler.
2740
2741         Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
2742
2743         * loader/DocumentLoader.cpp:
2744         (WebCore::DocumentLoader::stopLoading): Always explicitly cancel the Document parser when stopLoading is called.
2745
2746 2013-08-02  Antoine Quint  <graouts@apple.com>
2747
2748         <input type="search"> doesn't correctly handle the "size" attribute
2749         https://bugs.webkit.org/show_bug.cgi?id=119174
2750
2751         We weren't taking into account the decorations for search fields (results and close buttons)
2752         when computing the preferred logical width for these fields based on the "size" attribute
2753         and as a result we would not guarantee that we could show the number of characters set by
2754         the "size" attribute.
2755
2756         To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
2757         method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
2758         and have NumberInputType and SearchInputType return custom decoration widths.
2759
2760         Reviewed by Darin Adler.
2761
2762         Test: fast/forms/search/search-size-with-decorations.html
2763
2764         * html/HTMLInputElement.cpp:
2765         (WebCore::HTMLInputElement::decorationWidth):
2766         * html/HTMLInputElement.h:
2767         * html/InputType.cpp:
2768         (WebCore::InputType::decorationWidth):
2769         * html/InputType.h:
2770         Expose a new method to get the width for the input's decoration through the InputType.
2771
2772         * html/NumberInputType.cpp:
2773         (WebCore::NumberInputType::decorationWidth):
2774         * html/NumberInputType.h:
2775         Override InputType::decorationWidth() to return the decoration width for a number input
2776         using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
2777
2778         * html/SearchInputType.cpp:
2779         (WebCore::SearchInputType::sizeShouldIncludeDecoration):
2780         Override InputType::sizeShouldIncludeDecoration() to return true since search fields
2781         have custom decoration adding to the size of the field.
2782
2783         (WebCore::SearchInputType::decorationWidth):
2784         Return the combined size of the results and cancel buttons, as available.
2785         * html/SearchInputType.h:
2786
2787         * rendering/RenderTextControlSingleLine.cpp:
2788         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2789         Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
2790         and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
2791         return the extra decoration width for an input element should it have any.
2792
2793 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
2794
2795         [WIN] Fix build without precompiled header.
2796
2797         * accessibility/win/AccessibilityObjectWrapperWin.h: Added missing include.
2798         * rendering/RenderThemeWin.cpp: Ditto.
2799
2800 2013-08-02  Byungwoo Lee  <bw80.lee@samsung.com>
2801
2802         Remove redundant call of argsList->current() from loops in CSSParser.
2803         https://bugs.webkit.org/show_bug.cgi?id=119432
2804
2805         Reviewed by Christophe Dumez.
2806
2807         while loops in CSSParser call argList->current() function at the start
2808         of each iteration, but this is redundant because argsList->next() at
2809         the end of the iteration calls the argList->current() and returns the
2810         result.
2811
2812         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155402
2813
2814         * css/CSSParser.cpp:
2815         (WebCore::CSSParser::parseMixFunction):
2816         (WebCore::CSSParser::parseCustomFilterFunctionWithInlineSyntax):
2817
2818 2013-08-01  Andreas Kling  <akling@apple.com>
2819
2820         Removing an empty style sheet shouldn't trigger style recalc.
2821         <http://webkit.org/b/119428>
2822         <rdar://problem/14629045>
2823
2824         Reviewed by Antti Koivisto.
2825
2826         Teach DocumentStyleSheetCollection to filter out empty style sheets when deciding whether
2827         or not to trigger a style recalc. We can then be clever when an empty style sheet is removed
2828         from the document, and avoid causing extra work.
2829
2830         Some pages use this pattern:
2831
2832             (1) Create a <style> element.
2833             (2) Add it to the document's <head> element.
2834             (3) Insert some CSS as a text child of the <style> element.
2835
2836         Since the <style> element is already inside the document at (3), we had to treat this as an
2837         old style sheet being removed, even though it was just an empty sheet of nothing.
2838
2839         With this patch, Document gains enough smarts to know that removing/adding an empty sheet
2840         won't affect layout/rendering in any meaningful way, thus a style recalc can be avoided.
2841
2842         * dom/Document.h:
2843         * dom/Document.cpp:
2844         (WebCore::Document::styleResolverChanged):
2845
2846             Add a DeferRecalcStyleIfNeeded mode to styleResolverChanged().
2847
2848         * css/CSSStyleSheet.h:
2849         * css/CSSStyleSheet.cpp:
2850         (WebCore::CSSStyleSheet::clearOwnerNode):
2851
2852             Use DeferRecalcStyleIfNeeded when saying bye from a CSSStyleSheet and let Document decide
2853             if removing the sheet should trigger style recalc instead of always assuming it should.
2854
2855         * dom/DocumentStyleSheetCollection.cpp:
2856         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2857         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2858
2859             Exclude empty sheets from the activeAuthorStyleSheets() collection. They are still
2860             visible through CSSOM's document.styleSheets.
2861
2862 2013-08-02  Zalan Bujtas  <zalan@apple.com>
2863
2864         Frame flattening: Change the logic on whether resize event needs to be dispatched.
2865         https://bugs.webkit.org/show_bug.cgi?id=119394
2866
2867         Reviewed by Simon Fraser.
2868
2869         http://trac.webkit.org/changeset/149287 changed the logic so that resize events are
2870         sent out from FrameView::setFrameRect() too. Checking whether frame flattening is
2871         enabled is sufficient enough to ensure that no extra resize events are dispatched.
2872
2873         Test: fast/frames/flattening/iframe-flattening-resize-event-count.html
2874
2875         * page/FrameView.cpp:
2876         (WebCore::FrameView::FrameView):
2877         (WebCore::FrameView::setFrameRect):
2878         (WebCore::FrameView::frameFlatteningEnabled):
2879         (WebCore::FrameView::supportsFrameFlattening):
2880         (WebCore::FrameView::avoidScrollbarCreation):
2881         (WebCore::FrameView::calculateScrollbarModesForLayout):
2882         (WebCore::FrameView::layout):
2883         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
2884         * page/FrameView.h:
2885         * rendering/RenderFrameBase.cpp:
2886         (WebCore::RenderFrameBase::layoutWithFlattening):
2887
2888 2013-08-01  Commit Queue  <commit-queue@webkit.org>
2889
2890         Unreviewed, rolling out r153608.
2891         http://trac.webkit.org/changeset/153608
2892         https://bugs.webkit.org/show_bug.cgi?id=119425
2893
2894         Snorkled fast/multicol/overflow-content-expected.html
2895         (Requested by kling on #webkit).
2896
2897         * css/StyleResolver.cpp:
2898         (WebCore::StyleResolver::applyMatchedProperties):
2899
2900 2013-08-01  Ruth Fong  <ruth_fong@apple.com>
2901
2902         [Forms: color] <input type='color'> popover color well implementation
2903         <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
2904
2905         Reviewed by Benjamin Poulain.
2906
2907         * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
2908
2909 2013-07-31  Ryosuke Niwa  <rniwa@webkit.org>
2910
2911         FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
2912         https://bugs.webkit.org/show_bug.cgi?id=119309
2913
2914         Reviewed by Kent Tamura.
2915
2916         Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
2917
2918         I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
2919
2920         * html/FormAssociatedElement.cpp:
2921         (WebCore::FormAssociatedElement::formAttributeChanged):
2922         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2923
2924 2013-08-01  Rob Buis  <rwlbuis@webkit.org>
2925
2926         selectors should match attribute name with case sensitivity based on element & document type
2927         https://bugs.webkit.org/show_bug.cgi?id=71152
2928
2929         Reviewed by Darin Adler.
2930
2931         Support case-sensitive attribute name selecting for non HTML. In order to do this we have to
2932         store the attribute name in the selector as-is when css parsing, and get the lowercase localName
2933         on demand for case-insensitive matching. The only time we want case-insensitive matching is when
2934         we try to match a HTML element in a HTML document.
2935
2936         Tests: fast/dom/SelectorAPI/attrname-case-insensitive.html
2937                fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
2938                svg/css/case-sensitive-attrname-selectors.html
2939
2940         * css/CSSGrammar.y.in: do not lowercase attribute selector name.
2941         * css/CSSParserValues.h:
2942         (WebCore::CSSParserSelector::setAttribute):
2943         * css/CSSSelector.cpp:
2944         (WebCore::CSSSelector::setAttribute):
2945         * css/CSSSelector.h: allow access to lowered version of attribute localName if needed.
2946         (WebCore::CSSSelector::attributeCanonicalLocalName):
2947         * css/SelectorChecker.cpp:
2948         (WebCore::anyAttributeMatches): do only case-insensitive matching for HTML.
2949         (WebCore::SelectorChecker::checkOne):
2950         * css/SelectorChecker.h:
2951         (WebCore::SelectorChecker::checkExactAttribute): do only case-insensitive matching for HTML.
2952         * css/SelectorCheckerFastPath.cpp:
2953         (WebCore::HTMLNames::checkExactAttributeValue):
2954         * css/SelectorCheckerFastPath.h:
2955         (WebCore::SelectorCheckerFastPath::matchesRightmostAttributeSelector):
2956         * dom/Attribute.h:
2957         (WebCore::Attribute::matches): use more convenient parameters.
2958
2959 2013-08-01  Brent Fulgham  <bfulgham@apple.com>
2960
2961         [Windows] WebKit1 Fullscreen Video Play is Broken
2962         https://bugs.webkit.org/show_bug.cgi?id=119415
2963
2964         Reviewed by Jer Noble.
2965
2966         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
2967         call for ACFPlayerLayerSetFrame
2968         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2969         (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
2970         Tear down video player when leaving Fullscreen mode and not using
2971         the newer Fullscreen feature.
2972         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
2973         Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
2974         AVCFPlayerItemDuratoinChangedNotification, and disconnect any
2975         LegibleOutput items added to the player item.
2976         (WebCore::AVFWrapper::createPlayerItem): Add notifications for
2977         AVCFPlayerItemPresentationSizeChanged. 
2978         (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
2979         the AVCFPLayerLayer when the display size has changed.
2980         * platform/graphics/ca/win/CACFLayerTreeHost.h:
2981         (WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
2982         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
2983         (WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
2984         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2985         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
2986         cleanups.
2987         (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
2988         Make sure a Direct3D renderer is created when building the full screen
2989         window for Video playback.
2990
2991 2013-08-01  Dean Jackson  <dino@apple.com>
2992
2993         srcset algorithm breaks base64 src attributes
2994         https://bugs.webkit.org/show_bug.cgi?id=119413
2995
2996         Reviewed by Darin Adler.
2997
2998         Base64 encoded src attributes typically have a COMMA
2999         character which was breaking in the candidate matching
3000         algorithm. Make sure to handle that case, and to unescape
3001         any incoming URLs.
3002
3003         Slight cleanup of the srcset matching algorithm. The
3004         candidates are now gathered from a single update
3005         method. I've renamed the methods in the process.
3006         This means we now reparse the srcset attribute if
3007         only the src changes, but I think the code is
3008         cleaner this way.
3009
3010         Tests: fast/hidpi/image-srcset-data-src.html
3011                fast/hidpi/image-srcset-data-srcset.html
3012                fast/hidpi/image-srcset-nomodifier.html
3013                fast/hidpi/image-srcset-viewport-modifiers.html
3014
3015         * html/HTMLImageElement.cpp:
3016         (WebCore::HTMLImageElement::HTMLImageElement): No need to initialise m_bestFitImageURL.
3017         (WebCore::HTMLImageElement::imageSourceURL): Use isEmpty() rather than checking for nullAtom.
3018         (WebCore::HTMLImageElement::determineBestImageForScaleFactor): New renamed method that selects the best
3019         candidate for the image source.
3020         (WebCore::HTMLImageElement::collectImageCandidatesFromSrcSet): Gather the srcset images. Changes include
3021         simplifying the whitespace and skipping candidates that we don't yet support.
3022         (WebCore::HTMLImageElement::collectImageCandidateFromSrc): Add the src attribute to the list of candidates.
3023         (WebCore::HTMLImageElement::parseAttribute): Now both attributes call determineBestImageForScaleFactor.
3024         * html/HTMLImageElement.h: No need for m_srcImageIndex any more.
3025
3026 2013-08-01  Romain Perier  <romain.perier@gmail.com>
3027
3028         Implement img element's srcset attribute
3029         https://bugs.webkit.org/show_bug.cgi?id=110252
3030
3031         Reviewed by Dean Jackson.
3032
3033         Tests: fast/hidpi/image-srcset-simple.html
3034                fast/hidpi/image-srcset-src-selection.html
3035                fast/hidpi/image-srcset-simple.html
3036                fast/hidpi/image-srcset-src-selection.html
3037                fast/hidpi/image-srcset-only-src-attribute.html
3038                fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
3039                fast/hidpi/image-srcset-invalid-inputs.html
3040                fast/hidpi/image-srcset-invalid-inputs-except-one.html
3041                fast/hidpi/image-srcset-invalid-inputs-correct-src.html
3042                fast/hidpi/image-srcset-change-dynamically-from-js.html
3043                fast/hidpi/image-srcset-remove-dynamically-from-js.html
3044
3045         * html/HTMLAttributeNames.in: Add srcset attribute.
3046         * html/HTMLImageElement.cpp:
3047         (WebCore::HTMLImageElement::HTMLImageElement):
3048         Adding initialization for new variables member.
3049         (WebCore::HTMLImageElement::imageSourceURL):
3050         Override this method to return the choosen image transparently to the ImageLoader.
3051         (WebCore::HTMLImageElement::updateBestImageForScaleFactor):
3052         New method to select the good image candidate dependending on the scale factor. This method is separated from
3053         parsing because it will be useful for selecting a new image candidate on the fly if the device scale factor changes.
3054         (WebCore::HTMLImageElement::updateImagesFromSrcSet):
3055         New method for parsing the srcset attribute and build a list of images with the corresponding scale factor.
3056         (WebCore::HTMLImageElement::parseAttribute):
3057         Adding support for processing the image candidates, select the good one and call ImageLoader for rendering.
3058         * html/HTMLImageElement.h:
3059         - Adding new methods declarations.
3060         - Adding new type definition.
3061         - Adding new variable member to store the URL of the choosen image.
3062         - Adding new variable member to store the index of the src image.
3063         - Adding new Vector to store the list of images after parsing.
3064         * html/HTMLImageElement.idl: Adding srcset attribute for the differents existing bidings.
3065
3066 2013-08-01  Filip Pizlo  <fpizlo@apple.com>
3067
3068         DFG optimizations don't handle neutered arrays properly
3069         https://bugs.webkit.org/show_bug.cgi?id=119409
3070
3071         Reviewed by Mark Hahnenberg and Oliver Hunt.
3072
3073         Test: fast/js/dfg-typed-array-neuter.
3074
3075         * bindings/js/SerializedScriptValue.cpp:
3076         (WebCore::neuterView):
3077         (WebCore::SerializedScriptValue::transferArrayBuffers):
3078         (WebCore::SerializedScriptValue::create):
3079         * bindings/js/SerializedScriptValue.h:
3080
3081 2013-08-01  Morten Stenshorne  <mstensho@opera.com>
3082
3083         REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
3084         https://bugs.webkit.org/show_bug.cgi?id=113058
3085
3086         Before sharing CSS properties with an element in the cache, we need to
3087         check that the new element is suitable for this, just like we check
3088         elements before inserting them into the cache.
3089
3090         Reviewed by Andreas Kling.
3091
3092         Test: fast/css/identical-logical-height-decl.html
3093
3094         * css/StyleResolver.cpp:
3095         (WebCore::StyleResolver::applyMatchedProperties):
3096
3097 2013-08-01  Mark Lam  <mark.lam@apple.com>
3098
3099         Fixed expected test results for run-bindings-tests after r153532, r153537.
3100         https://bugs.webkit.org/show_bug.cgi?id=119410.
3101
3102         Reviewed by Simon Fraser.
3103
3104         No new tests.
3105
3106         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3107         (WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
3108         (WebCore::JSFloat64ArrayPrototype::getOwnPropertySlot):
3109         (WebCore::JSFloat64Array::getOwnPropertySlot):
3110         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
3111         * bindings/scripts/test/JS/JSFloat64Array.h:
3112         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3113         (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot):
3114         (WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot):
3115         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
3116         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3117         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3118         (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot):
3119         (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot):
3120         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
3121         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
3122         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3123         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3124         (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
3125         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
3126         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3127         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3128         (WebCore::JSTestEventTargetConstructor::getOwnPropertySlot):
3129         (WebCore::JSTestEventTargetPrototype::getOwnPropertySlot):
3130         (WebCore::JSTestEventTarget::getOwnPropertySlot):
3131         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3132         * bindings/scripts/test/JS/JSTestEventTarget.h:
3133         * bindings/scripts/test/JS/JSTestException.cpp:
3134         (WebCore::JSTestExceptionConstructor::getOwnPropertySlot):
3135         (WebCore::JSTestException::getOwnPropertySlot):
3136         * bindings/scripts/test/JS/JSTestException.h:
3137         * bindings/scripts/test/JS/JSTestInterface.cpp:
3138         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
3139         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
3140         (WebCore::JSTestInterface::getOwnPropertySlot):
3141         * bindings/scripts/test/JS/JSTestInterface.h:
3142         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3143         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
3144         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
3145         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
3146         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3147         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3148         (WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot):
3149         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
3150         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3151         * bindings/scripts/test/JS/JSTestNode.cpp:
3152         (WebCore::JSTestNodeConstructor::getOwnPropertySlot):
3153         (WebCore::JSTestNode::getOwnPropertySlot):
3154         * bindings/scripts/test/JS/JSTestNode.h:
3155         * bindings/scripts/test/JS/JSTestObj.cpp:
3156         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
3157         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
3158         (WebCore::JSTestObj::getOwnPropertySlot):
3159         * bindings/scripts/test/JS/JSTestObj.h:
3160         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3161         (WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertySlot):
3162         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
3163         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3164         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3165         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
3166         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
3167         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3168         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3169         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
3170         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
3171         (WebCore::JSTestTypedefs::getOwnPropertySlot):
3172         * bindings/scripts/test/JS/JSTestTypedefs.h:
3173
3174 2013-08-01  Alex Christensen  <achristensen@apple.com>
3175
3176         Copy eglplatform.h to be found by Windows WebGL build.
3177         https://bugs.webkit.org/show_bug.cgi?id=119299
3178
3179         Reviewed by Brent Fulgham.
3180
3181         * WebCore.vcxproj/WebCorePreBuild.cmd: Copy eglplatform.h.
3182
3183 2013-08-01  Jer Noble  <jer.noble@apple.com>
3184
3185         Crash in WebCore:  WebCore::AudioSession::beganAudioInterruption + 62
3186         https://bugs.webkit.org/show_bug.cgi?id=119406
3187
3188         Reviewed by Eric Carlson.
3189
3190         Unregister for AudioSession interruption events when being destroyed.
3191
3192         * platform/audio/ios/AudioDestinationIOS.cpp:
3193         (WebCore::AudioDestinationIOS::~AudioDestinationIOS):
3194
3195 2013-08-01  Andreas Kling  <akling@apple.com>
3196
3197         Layout should force a StyleResolver rebuild if there isn't one at all.
3198         <http://webkit.org/b/119378>
3199
3200         Reviewed by Antti Koivisto.
3201
3202         We can't tell if viewport-dependent media queries have been invalidated at layout,
3203         unless we have a StyleResolver to ask about this.
3204         In case there isn't one, take the same path as we would with an invalidated query
3205         instead of relying on ensureStyleResolver() to build it.
3206
3207         * page/FrameView.cpp:
3208         (WebCore::FrameView::layout):
3209
3210 2013-08-01  Jacky Jiang  <zhajiang@blackberry.com>
3211
3212         [BlackBerry] Crash at absoluteClippedOverflowRect() in PluginView::calculateClipRect()
3213         https://bugs.webkit.org/show_bug.cgi?id=119401
3214
3215         Reviewed by George Staikos.
3216
3217         JIRA 462881
3218         The renderer of the PluginView's element has been detached due to transition
3219         to a new load. We should return an empty contentRect if there even isn't
3220         a renderer. This is a speculative fix based on the stack trace provided.
3221
3222         * plugins/blackberry/PluginViewBlackBerry.cpp:
3223         (WebCore::PluginView::calculateClipRect):
3224
3225 2013-08-01  Tim Horton  <timothy_horton@apple.com>
3226
3227         Unavailable plug-in indicator arrow should be inside the rounded rect, not in its own circle
3228         https://bugs.webkit.org/show_bug.cgi?id=119400
3229         <rdar://problem/14616012>
3230
3231         Reviewed by Anders Carlsson.
3232
3233         * rendering/RenderEmbeddedObject.cpp:
3234         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
3235         Shift the arrow in by 9px, and make the text's rounded rect include it,
3236         instead of having the arrow in a separate circle.
3237
3238 2013-08-01  Patrick Gansterer  <paroga@webkit.org>
3239
3240         Merge FrameWinCE into FrameWin
3241         https://bugs.webkit.org/show_bug.cgi?id=117988
3242
3243         Reviewed by Brent Fulgham.
3244
3245         Reuse the code from FrameWin.cpp instead of duplicating it.
3246
3247         * PlatformWinCE.cmake:
3248         * page/win/FrameGdiWin.cpp: Added.
3249         (WebCore::imageFromRect):
3250         * page/wince/FrameWinCE.cpp: Removed.
3251
3252 2013-08-01  Alex Christensen  <achristensen@apple.com>
3253
3254         Made OESTextureHalfFloat work on Windows.
3255         https://bugs.webkit.org/show_bug.cgi?id=119298
3256
3257         Reviewed by Christophe Dumez.
3258
3259         * DerivedSources.cpp: Added JSOESTextureHalfFloat.cpp inside of #if ENABLE(WEBGL).
3260         * WebCore.vcxproj/WebCore.vcxproj:
3261         * WebCore.vcxproj/WebCore.vcxproj.filters:
3262         Added JSOESTextureHalfFloat.cpp and JSOESTextureHalfFloat.h.
3263         * html/canvas/OESTextureHalfFloat.idl: Added newline to end of file.
3264         * html/canvas/WebGLObject.cpp: Removed unused #includes.
3265
3266 2013-08-01  Patrick Gansterer  <paroga@webkit.org>
3267
3268         Rearrange the code of FrameWin
3269         https://bugs.webkit.org/show_bug.cgi?id=117984
3270
3271         Reviewed by Brent Fulgham.
3272
3273         Move code from the CG implementation into the general file so we can
3274         share the code with Windows CE port in a next step. In a first step
3275         it only shares more code between the CG and Cairo implementations.
3276         Also use OwnPtr instead of plain pointers to make ownership more clear.
3277
3278         * page/win/FrameCGWin.cpp:
3279         (WebCore::imageFromRect):
3280         * page/win/FrameCairoWin.cpp:
3281         (WebCore::imageFromRect):
3282         * page/win/FrameWin.cpp:
3283         (WebCore::imageFromSelection):
3284         (WebCore::Frame::dragImageForSelection):
3285         (WebCore::Frame::nodeImage):
3286         * page/win/FrameWin.h:
3287
3288 2013-08-01  Andrei Parvu  <parvu@adobe.com>
3289
3290         mask-repeat: round bug
3291
3292         Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the
3293         image is scaled so that the image can fit a whole number of times in the background.
3294         https://bugs.webkit.org/show_bug.cgi?id=119080
3295
3296         Reviewed by Dirk Schulze.
3297
3298         Tests: css3/masking/mask-repeat-round-auto1.html
3299                css3/masking/mask-repeat-round-auto2.html
3300                css3/masking/mask-repeat-round-border.html
3301                css3/masking/mask-repeat-round-content.html
3302                css3/masking/mask-repeat-round-padding.html
3303                css3/background/background-repeat-round-auto1.html
3304                css3/background/background-repeat-round-auto2.html
3305                css3/background/background-repeat-round-border.html
3306                css3/background/background-repeat-round-content.html
3307                css3/background/background-repeat-round-padding.html
3308
3309
3310
3311         * rendering/RenderBoxModelObject.cpp:
3312         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3313
3314 2013-08-01  Alexis Menard  <alexis@webkit.org>
3315
3316         Reduce CSSProperty's StylePropertyMetadata memory footprint by half when used inside a ImmutableStylePropertySet.
3317         https://bugs.webkit.org/show_bug.cgi?id=117715
3318
3319         Reviewed by Andreas Kling.
3320
3321         Today CSSProperty holds its metadata in the following way :
3322
3323         --------------------------------------------------------------------------------------------
3324         | m_propertyID : 14 We use 14 bits because CSSPropertyIDs start at 1001.                    | 
3325         | m_shorthandID : 14 id of the shorthand this property was set, 0 if not part of a shorthand|
3326         | m_important : 1                                                                           |
3327         | m_implicit : 1                                                                            |
3328         | m_inherited : 1                                                                           |
3329         --------------------------------------------------------------------------------------------
3330
3331         The proposal to decrease the memory footprint on CSSProperty's metadata
3332         only stand when stored inside ImmutableStylePropertySet which uses a custom
3333         way to allocate and lay out the StylePropertyMetadata and the CSSValues in
3334         memory because the idea behind is that the content will not change.
3335         The MutableStylePropertySet uses a regular vector to retrieve, remove
3336         and modify the CSSProperties. ImmutableStylePropertySet is used by default
3337         when parsing up until someone start to access the CSSOM like
3338         div.style which will convert the immutable to a mutable set. It is also good
3339         to note that a CSSProperty is created for every single statement inside a block
3340         in a stylesheet so we do have quite a bunch around. Another consideration is
3341         that the only client to the m_shorthandID is the inspector which uses it
3342         to group the longhands into a shorthand drop down list.
3343
3344         The new proposal is the following one :
3345         - Reduce m_propertyID to 10 bits by not starting the CSSPropertyIDs from
3346         1001 but rather 0 (or 3 as two are hardcoded CSSPropertyInvalid and CSSPropertyVariable).
3347         - Use the fact that we statically know which longhand belong to which shorthand. So
3348         we create a static mapping between longhands and shorthands.
3349
3350         Here is the new layout :
3351         ------------------------------------------------------------------------------
3352         | m_propertyID : 10 (up to 1024 properties), we have less than 400 today      |
3353         | m_isSetFromShorthand : 1 and then use the mapping in StylePropertyShorthand |
3354         | m_indexInShorthandsVector : 2                                               |
3355         | m_important : 1 (unchanged)                                                 |
3356         | m_implicit : 1  (unchanged)                                                 |
3357         | m_inherited : 1 (unchanged)                                                 |
3358         ------------------------------------------------------------------------------
3359
3360         it was set from using the new code in StylePropertyShorthand.
3361         - m_indexInShorthandsVector : 2 bits, unfortunately there are few longhands which belong to multiple
3362         shorthands so we need to store which was this longhand was part at parsing time. Notice
3363         that it does not store the CSSPropertyID of the matching shorthand but rather its position
3364         in the vector of matching shorthands. CSSProperty::m_shorthandID() method make it transparent
3365         for call sites and return the actual CSSPropertyID of the shorthand. So far 2 bits seems
3366         enough as there is only few longhands with ambiguity and they belong to 3 shorthands.
3367
3368         Profiling the benchmark with Intel Vtune to find out the performance regression
3369         showed that copying uint16_t, so StylePropertyMetadata, is not
3370         a fast operation in term of assembly code and has a big penalty on Windows 
3371         MSVC over unsigned for example. The latter produces a much faster code 
3372         when using unsigned over uint16_t (45% difference in the benchmark).
3373
3374         The patch avoid the copies of StylePropertyMetadata when applicable (by using const ref).
3375
3376         The second part of the fix is avoiding the conversion from an int (enum) to
3377         an uint16_t in a tight loop such as StylePropertySet::findPropertyIndex 
3378         (which is the hotspot of the benchmark).
3379
3380         On my Windows 7 64 bits Core i5 machine CSSPropertySetterGetter results are :
3381         - avg : 2714 runs/s with the patch
3382         - avg : 2696 runs/s without the patch
3383
3384         According to Andreas Kling this patch save up ~1.8Mb on membuster.
3385
3386         No new tests : refactor, old ones should cover.
3387
3388         * css/CSSComputedStyleDeclaration.cpp:
3389         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
3390         * css/CSSParser.cpp:
3391         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
3392         (WebCore::CSSParser::addProperty):
3393         * css/CSSProperty.cpp:
3394         (WebCore::StylePropertyMetadata::shorthandID):
3395         (WebCore::borderDirections):
3396         * css/CSSProperty.h:
3397         (WebCore::StylePropertyMetadata::StylePropertyMetadata): Use uint16_t type for bitfields so sizeof() returns 2 bytes.
3398         (WebCore::CSSProperty::CSSProperty):
3399         (WebCore::CSSProperty::isSetFromShorthand):
3400         (WebCore::CSSProperty::shorthandID):
3401         * css/StylePropertySet.cpp:
3402         (WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
3403         (WebCore::getIndexInShorthandVectorForPrefixingVariant):
3404         (WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
3405         (WebCore::MutableStylePropertySet::setPrefixingVariantProperty):
3406         * css/StylePropertySet.h:
3407         (WebCore::StylePropertySet::PropertyReference::shorthandID):
3408         * css/StylePropertyShorthand.cpp:
3409         (WebCore::backgroundShorthand):
3410         (WebCore::backgroundPositionShorthand):
3411         (WebCore::backgroundRepeatShorthand):
3412         (WebCore::borderShorthand):
3413         (WebCore::borderAbridgedShorthand):
3414         (WebCore::borderBottomShorthand):
3415         (WebCore::borderColorShorthand):
3416         (WebCore::borderImageShorthand):
3417         (WebCore::borderLeftShorthand):
3418         (WebCore::borderRadiusShorthand):
3419         (WebCore::webkitBorderRadiusShorthand):
3420         (WebCore::borderRightShorthand):
3421         (WebCore::borderSpacingShorthand):
3422         (WebCore::borderStyleShorthand):
3423         (WebCore::borderTopShorthand):
3424         (WebCore::borderWidthShorthand):
3425         (WebCore::listStyleShorthand):
3426         (WebCore::fontShorthand):
3427         (WebCore::marginShorthand):
3428         (WebCore::markerShorthand):
3429         (WebCore::outlineShorthand):
3430         (WebCore::overflowShorthand):
3431         (WebCore::paddingShorthand):
3432         (WebCore::transitionShorthand)