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