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