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