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