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