Background doesn't fully repaint when body has margins.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-04  Zalan Bujtas  <zalan@apple.com>
2
3         Background doesn't fully repaint when body has margins.
4         https://bugs.webkit.org/show_bug.cgi?id=119033
5
6         Reviewed by Simon Fraser.
7
8         Ensure that background-color changes do not leave unpainted areas when
9         body has margins.
10
11         Both <body> and <html> background-color get propagated up to the viewport.
12         If <body> has background-color attribute set, while <html> doesn't, the color is
13         applied not only on the <body> but on both the <html> and the viewport. However,
14         it's not enough to mark the RenderView dirty because with tiles backing on,
15         there could be areas outside of the viewport that need repaint. By marking
16         the RenderView's graphics layer dirty instead, we ensure that all the related
17         tiles get marked dirty too and the new background color covers all areas.
18
19         Manual test added. When forcing top-level composition on (even with embedded iframe to
20         make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
21         that the repaint rects don't reflect the functionality difference anymore.
22
23         * page/FrameView.cpp:
24         (WebCore::FrameView::reset):
25         (WebCore::FrameView::layout):
26         * page/FrameView.h:
27         (WebCore::FrameView::needsFullRepaint):
28         * rendering/RenderBox.cpp:
29         (WebCore::RenderBox::styleWillChange):
30         * rendering/RenderObjectChildList.cpp:
31         (WebCore::RenderObjectChildList::removeChildNode):
32         * rendering/RenderView.cpp:
33         (WebCore::RenderView::repaintRootContents):
34         (WebCore::RenderView::repaintViewAndCompositedLayers):
35         * rendering/RenderView.h:
36
37 2013-08-04  Andreas Kling  <akling@apple.com>
38
39         Document needn't expose its active element.
40         <http://webkit.org/b/119466>
41
42         Reviewed by Antonio Gomes.
43
44         The Document::m_activeElement pointer is only used inside updateHoverActiveState(),
45         so we can remove the activeElement()/setActiveElement() accessors.
46
47         * dom/Document.h:
48         * dom/Document.cpp:
49         (WebCore::Document::updateHoverActiveState):
50
51 2013-08-04  Andreas Kling  <akling@apple.com>
52
53         Inserting a rule into an empty style sheet shouldn't trigger style recalc unless necessary.
54         <http://webkit.org/b/119475>
55         <rdar://problem/14643481>
56
57         Reviewed by Antti Koivisto.
58
59         This is kind of a cheesy optimization, but it turns out that the use case is quite common.
60         The pattern goes like this:
61
62             (1) Create <style> element.
63             (2) Add it to the document's <head>.
64             (3) .addRule() one rule through the CSSOM API.
65
66         Prior to this patch, (3) would always cause a full (deferred) style recalc.
67
68         Now that we exclude empty style sheets from the document's (effective) active set,
69         we can piggyback on the style invalidation analysis when transitioning from an empty
70         sheet to a single-rule sheet.
71
72         In other words, add a special code path for the first rule insertion into an empty,
73         in-document style sheet to minimize the amount of invalidation that happens.
74
75         * css/CSSStyleSheet.cpp:
76         (WebCore::CSSStyleSheet::didMutateRules):
77         (WebCore::CSSStyleSheet::insertRule):
78         * css/CSSStyleSheet.h:
79         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
80         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
81
82 2013-08-04  Claudio Saavedra  <csaavedra@igalia.com>
83
84         [GTK] Fix a C++11 warning.
85
86         Rubber-stamped by Martin Robinson.
87
88         * platform/gtk/FileSystemGtk.cpp:
89         (WebCore::sharedResourcesPath): Fix a C++11 warning.
90
91 2013-08-04  Diego Pino Garcia  <dpino@igalia.com>
92
93         [GTK] Remove legacy hack in CodeGeneratorGObject.pm
94         https://bugs.webkit.org/show_bug.cgi?id=117545
95
96         Reviewed by Carlos Garcia Campos.
97
98         There's a checking that sets gtype to uint in case it's ushort. gtype 
99         is a value obtained from GetGValueTypeName(), which never returns 
100         ushort.
101
102         * bindings/scripts/CodeGeneratorGObject.pm:
103         (GenerateProperty): remove unnecessary glitch
104
105 2013-08-04  Andreas Kling  <akling@apple.com>
106
107         [Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
108         <http://webkit.org/b/119474>
109         <rdar://problem/14643349>
110
111         Reviewed by Dan Bernstein.
112
113         Disable screen font substitution by default in Settings so internal WebCore clients
114         such as SVG-as-image will get the right default setting.
115
116         * page/Settings.cpp:
117         (WebCore::Settings::Settings):
118         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
119         (WebCore::Settings::setScreenFontSubstitutionEnabled):
120         * page/Settings.h:
121         (WebCore::Settings::screenFontSubstitutionEnabled):
122         * page/Settings.in:
123         * page/mac/SettingsMac.mm:
124         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
125
126 2013-08-03  Tim Horton  <timothy_horton@apple.com>
127
128         Refine the unavailable plug-in indicator
129         https://bugs.webkit.org/show_bug.cgi?id=119400
130         <rdar://problem/14616012>
131
132         Reviewed by Oliver Hunt.
133
134         Add a border, flip the text and background colors, and make the indicator
135         much higher contrast, to be more visible on a variety of sites.
136         Also, refine the arrow to be less blocky and inlaid inside a circle.
137
138         * rendering/RenderEmbeddedObject.cpp:
139         (WebCore::replacementTextRoundedRectPressedColor):
140         (WebCore::replacementTextRoundedRectColor):
141         (WebCore::replacementTextColor):
142         (WebCore::unavailablePluginBorderColor):
143         (WebCore::drawReplacementArrow):
144         (WebCore::RenderEmbeddedObject::paintReplaced):
145         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
146         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
147         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
148         * rendering/RenderEmbeddedObject.h:
149
150 2013-08-03  Yoav Weiss  <yoav@yoav.ws>
151
152         PreloadScanner preloads external CSS with non-matching media attribute
153         https://bugs.webkit.org/show_bug.cgi?id=106198
154
155         Reviewed by Dean Jackson.
156
157         Test: http/tests/loading/preload-css-test.html
158
159         * html/parser/HTMLPreloadScanner.cpp:
160         Remove m_linkMediaAttributeIsScreen
161         Remove MediaQueryEvaluator calls
162         Add m_mediaAttribute that gets the value of the "media" attribute
163         Pass m_mediaAttribute to PreloadRequest
164         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
165         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
166         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
167         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
168         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
169         * html/parser/HTMLResourcePreloader.cpp:
170         Add MediaQueryEvaluator calls to see if "media" matches
171         Perform preload only to resource with a matching media (if media exists)
172         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
173         (WebCore::mediaAttributeMatches):
174         (WebCore::HTMLResourcePreloader::preload):
175         * html/parser/HTMLResourcePreloader.h:
176         Add a constructor with a mediaAttribute value
177         Add m_mediaAttribute & its getter.
178         (WebCore::PreloadRequest::create):
179         (WebCore::PreloadRequest::media):
180         (WebCore::PreloadRequest::PreloadRequest):
181
182 2013-08-03  Andreas Kling  <akling@apple.com>
183
184         RenderBoxModelObject::firstLetterRemainingText should be a RenderTextFragment*.
185         <http://webkit.org/b/119181>
186
187         Reviewed by Sam Weinig.
188
189         De-generalize this code a bit since we know that the firstLetterRemainingText() is always
190         going to be a RenderTextFragment.
191
192         * rendering/RenderBoxModelObject.h:
193         * rendering/RenderBoxModelObject.cpp:
194         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
195         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText):
196
197             Make these two deal in RenderTextFragment*.
198
199         * rendering/RenderBlock.cpp:
200         (WebCore::RenderBlock::updateFirstLetterStyle):
201
202             Tighten up some pointer types so we don't have to cast as much.
203
204 2013-08-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
205
206         Introduce toSVGMaskElement(), and use it
207         https://bugs.webkit.org/show_bug.cgi?id=119443
208
209         Reviewed by Andreas Kling.
210
211         As a step to change static_cast with toSVGXXX, static_cast<SVGMaskElement*> can
212         be changed with toSVGMaskElement().
213
214         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155432
215
216         * rendering/svg/RenderSVGResourceMasker.cpp:
217         (WebCore::RenderSVGResourceMasker::applyResource):
218         (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
219         * rendering/svg/RenderSVGResourceMasker.h:
220         * svg/SVGMaskElement.h:
221         (WebCore::toSVGMaskElement):
222
223 2013-08-02  Benjamin Poulain  <bpoulain@apple.com>
224
225         REGRESSION (r153005): Crash in SpaceSplitString::spaceSplitStringContainsValue on Facebook
226         https://bugs.webkit.org/show_bug.cgi?id=119384
227
228         Reviewed by Alexey Proskuryakov.
229
230         When removing the "rel" attribute from HTMLAnchorElement, we parse the attribute for no value.
231         Following r153005, we no longer checked for null String, which caused a crash in that case.
232
233         Creating a SpaceSplitString from a null string causes the SpaceSplitString to be null. In that case
234         SpaceSplitString::contains() would always return false.
235         This patch modify SpaceSplitString::spaceSplitStringContainsValue() to follow the exact same
236         behavior.
237
238         Test: fast/dom/HTMLAnchorElement/remove-rel-attribute.html
239
240         * dom/SpaceSplitString.cpp:
241         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
242
243 2013-08-02  Dean Jackson  <dino@apple.com>
244
245         Force elements with perspective or preserve-3d to disallow direct composited backgrounds
246         https://bugs.webkit.org/show_bug.cgi?id=119462
247         <rdar://problem/14607548>
248
249         Reviewed by Simon Fraser.
250
251         Bug 119461 (http://wkb.ug/119461) describes how a directly composited
252         background color can intersect with its children. It's not clear exactly
253         what the best way to fix that is, but for the moment we should disallow
254         any element that has perspective or a preserve-3d transform style from
255         getting a directly composited background.
256
257         Test: compositing/background-color/no-composited-background-color-when-perspective.html
258
259         * rendering/RenderLayerBacking.cpp:
260         (WebCore::hasPerspectiveOrPreserves3D): New static helper.
261         (WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
262
263 2013-08-02  Oliver Hunt  <oliver@apple.com>
264
265         Update binding test results
266
267         * bindings/scripts/test/JS/JSFloat64Array.cpp:
268         (WebCore::JSFloat64Array::getOwnPropertySlot):
269         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
270         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
271         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
272         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
273         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
274
275 2013-08-02  Gavin Barraclough  <barraclough@apple.com>
276
277         Remove no-arguments constructor to PropertySlot
278         https://bugs.webkit.org/show_bug.cgi?id=119460
279
280         Reviewed by Geoff Garen.
281
282         This constructor was unsafe if getValue is subsequently called,
283         and the property is a getter. Simplest to just remove it.
284
285         * bindings/js/JSDOMWindowCustom.cpp:
286         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
287         (WebCore::DialogHandler::returnValue):
288         * bindings/js/JSHistoryCustom.cpp:
289         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
290         * bindings/js/JSLocationCustom.cpp:
291         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
292         * bindings/js/JSPluginElementFunctions.cpp:
293         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
294         * bindings/js/JSStorageCustom.cpp:
295         (WebCore::JSStorage::deleteProperty):
296         (WebCore::JSStorage::putDelegate):
297         * bindings/scripts/CodeGeneratorJS.pm:
298         (GenerateGetOwnPropertyDescriptorBody):
299         * bridge/runtime_array.cpp:
300         (JSC::RuntimeArray::getOwnPropertyDescriptor):
301         * bridge/runtime_method.cpp:
302         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
303         * bridge/runtime_object.cpp:
304         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
305
306 2013-08-02  Andreas Kling  <akling@apple.com>
307
308         Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
309         <http://webkit.org/b/119442>
310         <rdar://problem/14631785>
311
312         Reviewed by Antti Koivisto.
313
314         Let Document decide whether or not to do a style recalc after a <link> element is removed.
315         This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
316
317         Some Facebook pages have a <link rel="stylesheet" href="data:text/css;base64,"> that gets
318         removed during the initial page load, causing style recalc.
319
320         * html/HTMLLinkElement.cpp:
321         (WebCore::HTMLLinkElement::removedFrom):
322
323             Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
324             cause a recalc (because it's no longer in the set of active sheets) or do nothing.
325
326 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
327
328         Remove WebCore folder from include statements
329         https://bugs.webkit.org/show_bug.cgi?id=119438
330
331         Reviewed by Darin Adler.
332
333         This aligns the style of the changed files with the other WebCore code.
334
335         * platform/network/curl/CurlDownload.cpp:
336         * platform/network/curl/CurlDownload.h:
337
338 2013-08-02  Ryosuke Niwa  <rniwa@webkit.org>
339
340         FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
341         https://bugs.webkit.org/show_bug.cgi?id=119309
342
343         Reviewed by Kent Tamura.
344
345         Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
346
347         I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
348
349         * html/FormAssociatedElement.cpp:
350         (WebCore::FormAssociatedElement::formAttributeChanged):
351         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
352
353 2013-08-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
354
355         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
356         https://bugs.webkit.org/show_bug.cgi?id=119316
357
358         Reviewed by Ryosuke Niwa.
359
360         As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
361         information even if nodes are disconnected:
362         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
363
364         This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
365
366         No new tests, covered by existing tests.
367
368         * dom/Node.cpp:
369         (WebCore::compareDetachedElementsPosition):
370         (WebCore::Node::compareDocumentPosition):
371
372 2013-08-02  Simon Fraser  <simon.fraser@apple.com>
373
374         Revert r153632, since it caused fast/forms/change-form-element-document-crash.html
375         to assert.
376
377         * html/FormAssociatedElement.cpp:
378         (WebCore::FormAssociatedElement::formAttributeChanged):
379         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
380
381 2013-08-02  Mario Sanchez Prada  <mario.prada@samsung.com>
382
383         Implement atk_text_get_text_*_offset for WORD
384         https://bugs.webkit.org/show_bug.cgi?id=114871
385
386         Reviewed by Martin Robinson.
387
388         Re-implement this functions without using GailTextUtil nor Pango.
389
390         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
391         (textForObject): Made the parameter a const, to avoid warnings.
392         (getSelectionOffsetsForObject): Add special cases for END boundaries.
393         (emptyTextSelectionAtOffset): Convenience function to be used in
394         early returns from functions returning both text and offsets.
395         (webkitAccessibleTextGetChar): Use emptyTextSelectionAtOffset(),
396         and remove checks that are now done outside of this function, in
397         webkitAccessibleTextGetTextForOffset().
398         (nextWordStartPosition): Helper function to reliably find the
399         start of the next word as and user would do it by navigating with
400         Ctrl and the arrows (considering spaces and punctuation).
401         (previousWordEndPosition): Similar to nextWordStartPosition, but
402         written to help find the end of the previous one.
403         (wordAtPositionForAtkBoundary): Helper function to find the word
404         at a given position considering values of AtkTextBoundary.
405         (numberOfReplacedElementsBeforeOffset): Helper function to help
406         figure out how many embedded objects we have exposed for an
407         AtkText object, used to adjust offsets coming from outside.
408         (webkitAccessibleTextGetWordForBoundary): New function,
409         implementing atk_text_get_text_*_offset for WORD.
410         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
411         WORD boundaries with webkitAccessibleTextGetWordForBoundary().
412         Also, moved the initialization of the start and end offsets to the
413         bottom, into the gail/pango section, since those values will be
414         from now on initialized in getSelectionOffsetsForObject().
415         (webkitAccessibleTextGetSelection): Removed the initialization of
416         the start and end offsets, since those values will be from now on
417         initialized in getSelectionOffsetsForObject().
418
419 2013-08-02  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
420
421         Buildfix for !ENABLE(SVG) platforms after r153581.
422         https://bugs.webkit.org/show_bug.cgi?id=119444
423
424         Reviewed by Andreas Kling.
425
426         Adding missing guards.
427
428         * css/StylePropertyShorthand.cpp:
429         (WebCore::matchingShorthandsForLonghand):
430         * css/StylePropertyShorthand.h:
431
432 2013-08-02  Brady Eidson  <beidson@apple.com>
433
434         REGRESSION (r130783): Scrolling is broken going back to a cached page from a page that still has outstanding subresources.
435         <rdar://problem/14601124> and https://bugs.webkit.org/show_bug.cgi?id=119416
436
437         Reviewed by Darin Adler.
438
439         Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
440
441         * loader/DocumentLoader.cpp:
442         (WebCore::DocumentLoader::stopLoading): Always explicitly cancel the Document parser when stopLoading is called.
443
444 2013-08-02  Antoine Quint  <graouts@apple.com>
445
446         <input type="search"> doesn't correctly handle the "size" attribute
447         https://bugs.webkit.org/show_bug.cgi?id=119174
448
449         We weren't taking into account the decorations for search fields (results and close buttons)
450         when computing the preferred logical width for these fields based on the "size" attribute
451         and as a result we would not guarantee that we could show the number of characters set by
452         the "size" attribute.
453
454         To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
455         method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
456         and have NumberInputType and SearchInputType return custom decoration widths.
457
458         Reviewed by Darin Adler.
459
460         Test: fast/forms/search/search-size-with-decorations.html
461
462         * html/HTMLInputElement.cpp:
463         (WebCore::HTMLInputElement::decorationWidth):
464         * html/HTMLInputElement.h:
465         * html/InputType.cpp:
466         (WebCore::InputType::decorationWidth):
467         * html/InputType.h:
468         Expose a new method to get the width for the input's decoration through the InputType.
469
470         * html/NumberInputType.cpp:
471         (WebCore::NumberInputType::decorationWidth):
472         * html/NumberInputType.h:
473         Override InputType::decorationWidth() to return the decoration width for a number input
474         using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
475
476         * html/SearchInputType.cpp:
477         (WebCore::SearchInputType::sizeShouldIncludeDecoration):
478         Override InputType::sizeShouldIncludeDecoration() to return true since search fields
479         have custom decoration adding to the size of the field.
480
481         (WebCore::SearchInputType::decorationWidth):
482         Return the combined size of the results and cancel buttons, as available.
483         * html/SearchInputType.h:
484
485         * rendering/RenderTextControlSingleLine.cpp:
486         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
487         Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
488         and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
489         return the extra decoration width for an input element should it have any.
490
491 2013-08-02  Patrick Gansterer  <paroga@webkit.org>
492
493         [WIN] Fix build without precompiled header.
494
495         * accessibility/win/AccessibilityObjectWrapperWin.h: Added missing include.
496         * rendering/RenderThemeWin.cpp: Ditto.
497
498 2013-08-02  Byungwoo Lee  <bw80.lee@samsung.com>
499
500         Remove redundant call of argsList->current() from loops in CSSParser.
501         https://bugs.webkit.org/show_bug.cgi?id=119432
502
503         Reviewed by Christophe Dumez.
504
505         while loops in CSSParser call argList->current() function at the start
506         of each iteration, but this is redundant because argsList->next() at
507         the end of the iteration calls the argList->current() and returns the
508         result.
509
510         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155402
511
512         * css/CSSParser.cpp:
513         (WebCore::CSSParser::parseMixFunction):
514         (WebCore::CSSParser::parseCustomFilterFunctionWithInlineSyntax):
515
516 2013-08-01  Andreas Kling  <akling@apple.com>
517
518         Removing an empty style sheet shouldn't trigger style recalc.
519         <http://webkit.org/b/119428>
520         <rdar://problem/14629045>
521
522         Reviewed by Antti Koivisto.
523
524         Teach DocumentStyleSheetCollection to filter out empty style sheets when deciding whether
525         or not to trigger a style recalc. We can then be clever when an empty style sheet is removed
526         from the document, and avoid causing extra work.
527
528         Some pages use this pattern:
529
530             (1) Create a <style> element.
531             (2) Add it to the document's <head> element.
532             (3) Insert some CSS as a text child of the <style> element.
533
534         Since the <style> element is already inside the document at (3), we had to treat this as an
535         old style sheet being removed, even though it was just an empty sheet of nothing.
536
537         With this patch, Document gains enough smarts to know that removing/adding an empty sheet
538         won't affect layout/rendering in any meaningful way, thus a style recalc can be avoided.
539
540         * dom/Document.h:
541         * dom/Document.cpp:
542         (WebCore::Document::styleResolverChanged):
543
544             Add a DeferRecalcStyleIfNeeded mode to styleResolverChanged().
545
546         * css/CSSStyleSheet.h:
547         * css/CSSStyleSheet.cpp:
548         (WebCore::CSSStyleSheet::clearOwnerNode):
549
550             Use DeferRecalcStyleIfNeeded when saying bye from a CSSStyleSheet and let Document decide
551             if removing the sheet should trigger style recalc instead of always assuming it should.
552
553         * dom/DocumentStyleSheetCollection.cpp:
554         (WebCore::filterEnabledNonemptyCSSStyleSheets):
555         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
556
557             Exclude empty sheets from the activeAuthorStyleSheets() collection. They are still
558             visible through CSSOM's document.styleSheets.
559
560 2013-08-02  Zalan Bujtas  <zalan@apple.com>
561
562         Frame flattening: Change the logic on whether resize event needs to be dispatched.
563         https://bugs.webkit.org/show_bug.cgi?id=119394
564
565         Reviewed by Simon Fraser.
566
567         http://trac.webkit.org/changeset/149287 changed the logic so that resize events are
568         sent out from FrameView::setFrameRect() too. Checking whether frame flattening is
569         enabled is sufficient enough to ensure that no extra resize events are dispatched.
570
571         Test: fast/frames/flattening/iframe-flattening-resize-event-count.html
572
573         * page/FrameView.cpp:
574         (WebCore::FrameView::FrameView):
575         (WebCore::FrameView::setFrameRect):
576         (WebCore::FrameView::frameFlatteningEnabled):
577         (WebCore::FrameView::supportsFrameFlattening):
578         (WebCore::FrameView::avoidScrollbarCreation):
579         (WebCore::FrameView::calculateScrollbarModesForLayout):
580         (WebCore::FrameView::layout):
581         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
582         * page/FrameView.h:
583         * rendering/RenderFrameBase.cpp:
584         (WebCore::RenderFrameBase::layoutWithFlattening):
585
586 2013-08-01  Commit Queue  <commit-queue@webkit.org>
587
588         Unreviewed, rolling out r153608.
589         http://trac.webkit.org/changeset/153608
590         https://bugs.webkit.org/show_bug.cgi?id=119425
591
592         Snorkled fast/multicol/overflow-content-expected.html
593         (Requested by kling on #webkit).
594
595         * css/StyleResolver.cpp:
596         (WebCore::StyleResolver::applyMatchedProperties):
597
598 2013-08-01  Ruth Fong  <ruth_fong@apple.com>
599
600         [Forms: color] <input type='color'> popover color well implementation
601         <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
602
603         Reviewed by Benjamin Poulain.
604
605         * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
606
607 2013-07-31  Ryosuke Niwa  <rniwa@webkit.org>
608
609         FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
610         https://bugs.webkit.org/show_bug.cgi?id=119309
611
612         Reviewed by Kent Tamura.
613
614         Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
615
616         I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
617
618         * html/FormAssociatedElement.cpp:
619         (WebCore::FormAssociatedElement::formAttributeChanged):
620         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
621
622 2013-08-01  Rob Buis  <rwlbuis@webkit.org>
623
624         selectors should match attribute name with case sensitivity based on element & document type
625         https://bugs.webkit.org/show_bug.cgi?id=71152
626
627         Reviewed by Darin Adler.
628
629         Support case-sensitive attribute name selecting for non HTML. In order to do this we have to
630         store the attribute name in the selector as-is when css parsing, and get the lowercase localName
631         on demand for case-insensitive matching. The only time we want case-insensitive matching is when
632         we try to match a HTML element in a HTML document.
633
634         Tests: fast/dom/SelectorAPI/attrname-case-insensitive.html
635                fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
636                svg/css/case-sensitive-attrname-selectors.html
637
638         * css/CSSGrammar.y.in: do not lowercase attribute selector name.
639         * css/CSSParserValues.h:
640         (WebCore::CSSParserSelector::setAttribute):
641         * css/CSSSelector.cpp:
642         (WebCore::CSSSelector::setAttribute):
643         * css/CSSSelector.h: allow access to lowered version of attribute localName if needed.
644         (WebCore::CSSSelector::attributeCanonicalLocalName):
645         * css/SelectorChecker.cpp:
646         (WebCore::anyAttributeMatches): do only case-insensitive matching for HTML.
647         (WebCore::SelectorChecker::checkOne):
648         * css/SelectorChecker.h:
649         (WebCore::SelectorChecker::checkExactAttribute): do only case-insensitive matching for HTML.
650         * css/SelectorCheckerFastPath.cpp:
651         (WebCore::HTMLNames::checkExactAttributeValue):
652         * css/SelectorCheckerFastPath.h:
653         (WebCore::SelectorCheckerFastPath::matchesRightmostAttributeSelector):
654         * dom/Attribute.h:
655         (WebCore::Attribute::matches): use more convenient parameters.
656
657 2013-08-01  Brent Fulgham  <bfulgham@apple.com>
658
659         [Windows] WebKit1 Fullscreen Video Play is Broken
660         https://bugs.webkit.org/show_bug.cgi?id=119415
661
662         Reviewed by Jer Noble.
663
664         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
665         call for ACFPlayerLayerSetFrame
666         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
667         (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
668         Tear down video player when leaving Fullscreen mode and not using
669         the newer Fullscreen feature.
670         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
671         Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
672         AVCFPlayerItemDuratoinChangedNotification, and disconnect any
673         LegibleOutput items added to the player item.
674         (WebCore::AVFWrapper::createPlayerItem): Add notifications for
675         AVCFPlayerItemPresentationSizeChanged. 
676         (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
677         the AVCFPLayerLayer when the display size has changed.
678         * platform/graphics/ca/win/CACFLayerTreeHost.h:
679         (WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
680         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
681         (WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
682         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
683         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
684         cleanups.
685         (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
686         Make sure a Direct3D renderer is created when building the full screen
687         window for Video playback.
688
689 2013-08-01  Dean Jackson  <dino@apple.com>
690
691         srcset algorithm breaks base64 src attributes
692         https://bugs.webkit.org/show_bug.cgi?id=119413
693
694         Reviewed by Darin Adler.
695
696         Base64 encoded src attributes typically have a COMMA
697         character which was breaking in the candidate matching
698         algorithm. Make sure to handle that case, and to unescape
699         any incoming URLs.
700
701         Slight cleanup of the srcset matching algorithm. The
702         candidates are now gathered from a single update
703         method. I've renamed the methods in the process.
704         This means we now reparse the srcset attribute if
705         only the src changes, but I think the code is
706         cleaner this way.
707
708         Tests: fast/hidpi/image-srcset-data-src.html
709                fast/hidpi/image-srcset-data-srcset.html
710                fast/hidpi/image-srcset-nomodifier.html
711                fast/hidpi/image-srcset-viewport-modifiers.html
712
713         * html/HTMLImageElement.cpp:
714         (WebCore::HTMLImageElement::HTMLImageElement): No need to initialise m_bestFitImageURL.
715         (WebCore::HTMLImageElement::imageSourceURL): Use isEmpty() rather than checking for nullAtom.
716         (WebCore::HTMLImageElement::determineBestImageForScaleFactor): New renamed method that selects the best
717         candidate for the image source.
718         (WebCore::HTMLImageElement::collectImageCandidatesFromSrcSet): Gather the srcset images. Changes include
719         simplifying the whitespace and skipping candidates that we don't yet support.
720         (WebCore::HTMLImageElement::collectImageCandidateFromSrc): Add the src attribute to the list of candidates.
721         (WebCore::HTMLImageElement::parseAttribute): Now both attributes call determineBestImageForScaleFactor.
722         * html/HTMLImageElement.h: No need for m_srcImageIndex any more.
723
724 2013-08-01  Romain Perier  <romain.perier@gmail.com>
725
726         Implement img element's srcset attribute
727         https://bugs.webkit.org/show_bug.cgi?id=110252
728
729         Reviewed by Dean Jackson.
730
731         Tests: fast/hidpi/image-srcset-simple.html
732                fast/hidpi/image-srcset-src-selection.html
733                fast/hidpi/image-srcset-simple.html
734                fast/hidpi/image-srcset-src-selection.html
735                fast/hidpi/image-srcset-only-src-attribute.html
736                fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
737                fast/hidpi/image-srcset-invalid-inputs.html
738                fast/hidpi/image-srcset-invalid-inputs-except-one.html
739                fast/hidpi/image-srcset-invalid-inputs-correct-src.html
740                fast/hidpi/image-srcset-change-dynamically-from-js.html
741                fast/hidpi/image-srcset-remove-dynamically-from-js.html
742
743         * html/HTMLAttributeNames.in: Add srcset attribute.
744         * html/HTMLImageElement.cpp:
745         (WebCore::HTMLImageElement::HTMLImageElement):
746         Adding initialization for new variables member.
747         (WebCore::HTMLImageElement::imageSourceURL):
748         Override this method to return the choosen image transparently to the ImageLoader.
749         (WebCore::HTMLImageElement::updateBestImageForScaleFactor):
750         New method to select the good image candidate dependending on the scale factor. This method is separated from
751         parsing because it will be useful for selecting a new image candidate on the fly if the device scale factor changes.
752         (WebCore::HTMLImageElement::updateImagesFromSrcSet):
753         New method for parsing the srcset attribute and build a list of images with the corresponding scale factor.
754         (WebCore::HTMLImageElement::parseAttribute):
755         Adding support for processing the image candidates, select the good one and call ImageLoader for rendering.
756         * html/HTMLImageElement.h:
757         - Adding new methods declarations.
758         - Adding new type definition.
759         - Adding new variable member to store the URL of the choosen image.
760         - Adding new variable member to store the index of the src image.
761         - Adding new Vector to store the list of images after parsing.
762         * html/HTMLImageElement.idl: Adding srcset attribute for the differents existing bidings.
763
764 2013-08-01  Filip Pizlo  <fpizlo@apple.com>
765
766         DFG optimizations don't handle neutered arrays properly
767         https://bugs.webkit.org/show_bug.cgi?id=119409
768
769         Reviewed by Mark Hahnenberg and Oliver Hunt.
770
771         Test: fast/js/dfg-typed-array-neuter.
772
773         * bindings/js/SerializedScriptValue.cpp:
774         (WebCore::neuterView):
775         (WebCore::SerializedScriptValue::transferArrayBuffers):
776         (WebCore::SerializedScriptValue::create):
777         * bindings/js/SerializedScriptValue.h:
778
779 2013-08-01  Morten Stenshorne  <mstensho@opera.com>
780
781         REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
782         https://bugs.webkit.org/show_bug.cgi?id=113058
783
784         Before sharing CSS properties with an element in the cache, we need to
785         check that the new element is suitable for this, just like we check
786         elements before inserting them into the cache.
787
788         Reviewed by Andreas Kling.
789
790         Test: fast/css/identical-logical-height-decl.html
791
792         * css/StyleResolver.cpp:
793         (WebCore::StyleResolver::applyMatchedProperties):
794
795 2013-08-01  Mark Lam  <mark.lam@apple.com>
796
797         Fixed expected test results for run-bindings-tests after r153532, r153537.
798         https://bugs.webkit.org/show_bug.cgi?id=119410.
799
800         Reviewed by Simon Fraser.
801
802         No new tests.
803
804         * bindings/scripts/test/JS/JSFloat64Array.cpp:
805         (WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
806         (WebCore::JSFloat64ArrayPrototype::getOwnPropertySlot):
807         (WebCore::JSFloat64Array::getOwnPropertySlot):
808         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
809         * bindings/scripts/test/JS/JSFloat64Array.h:
810         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
811         (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot):
812         (WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot):
813         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
814         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
815         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
816         (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot):
817         (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot):
818         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
819         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
820         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
821         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
822         (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
823         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
824         * bindings/scripts/test/JS/JSTestEventConstructor.h:
825         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
826         (WebCore::JSTestEventTargetConstructor::getOwnPropertySlot):
827         (WebCore::JSTestEventTargetPrototype::getOwnPropertySlot):
828         (WebCore::JSTestEventTarget::getOwnPropertySlot):
829         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
830         * bindings/scripts/test/JS/JSTestEventTarget.h:
831         * bindings/scripts/test/JS/JSTestException.cpp:
832         (WebCore::JSTestExceptionConstructor::getOwnPropertySlot):
833         (WebCore::JSTestException::getOwnPropertySlot):
834         * bindings/scripts/test/JS/JSTestException.h:
835         * bindings/scripts/test/JS/JSTestInterface.cpp:
836         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
837         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
838         (WebCore::JSTestInterface::getOwnPropertySlot):
839         * bindings/scripts/test/JS/JSTestInterface.h:
840         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
841         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
842         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
843         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
844         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
845         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
846         (WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot):
847         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
848         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
849         * bindings/scripts/test/JS/JSTestNode.cpp:
850         (WebCore::JSTestNodeConstructor::getOwnPropertySlot):
851         (WebCore::JSTestNode::getOwnPropertySlot):
852         * bindings/scripts/test/JS/JSTestNode.h:
853         * bindings/scripts/test/JS/JSTestObj.cpp:
854         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
855         (WebCore::JSTestObjPrototype::getOwnPropertySlot):
856         (WebCore::JSTestObj::getOwnPropertySlot):
857         * bindings/scripts/test/JS/JSTestObj.h:
858         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
859         (WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertySlot):
860         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
861         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
862         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
863         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
864         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
865         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
866         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
867         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
868         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
869         (WebCore::JSTestTypedefs::getOwnPropertySlot):
870         * bindings/scripts/test/JS/JSTestTypedefs.h:
871
872 2013-08-01  Alex Christensen  <achristensen@apple.com>
873
874         Copy eglplatform.h to be found by Windows WebGL build.
875         https://bugs.webkit.org/show_bug.cgi?id=119299
876
877         Reviewed by Brent Fulgham.
878
879         * WebCore.vcxproj/WebCorePreBuild.cmd: Copy eglplatform.h.
880
881 2013-08-01  Jer Noble  <jer.noble@apple.com>
882
883         Crash in WebCore:  WebCore::AudioSession::beganAudioInterruption + 62
884         https://bugs.webkit.org/show_bug.cgi?id=119406
885
886         Reviewed by Eric Carlson.
887
888         Unregister for AudioSession interruption events when being destroyed.
889
890         * platform/audio/ios/AudioDestinationIOS.cpp:
891         (WebCore::AudioDestinationIOS::~AudioDestinationIOS):
892
893 2013-08-01  Andreas Kling  <akling@apple.com>
894
895         Layout should force a StyleResolver rebuild if there isn't one at all.
896         <http://webkit.org/b/119378>
897
898         Reviewed by Antti Koivisto.
899
900         We can't tell if viewport-dependent media queries have been invalidated at layout,
901         unless we have a StyleResolver to ask about this.
902         In case there isn't one, take the same path as we would with an invalidated query
903         instead of relying on ensureStyleResolver() to build it.
904
905         * page/FrameView.cpp:
906         (WebCore::FrameView::layout):
907
908 2013-08-01  Jacky Jiang  <zhajiang@blackberry.com>
909
910         [BlackBerry] Crash at absoluteClippedOverflowRect() in PluginView::calculateClipRect()
911         https://bugs.webkit.org/show_bug.cgi?id=119401
912
913         Reviewed by George Staikos.
914
915         JIRA 462881
916         The renderer of the PluginView's element has been detached due to transition
917         to a new load. We should return an empty contentRect if there even isn't
918         a renderer. This is a speculative fix based on the stack trace provided.
919
920         * plugins/blackberry/PluginViewBlackBerry.cpp:
921         (WebCore::PluginView::calculateClipRect):
922
923 2013-08-01  Tim Horton  <timothy_horton@apple.com>
924
925         Unavailable plug-in indicator arrow should be inside the rounded rect, not in its own circle
926         https://bugs.webkit.org/show_bug.cgi?id=119400
927         <rdar://problem/14616012>
928
929         Reviewed by Anders Carlsson.
930
931         * rendering/RenderEmbeddedObject.cpp:
932         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
933         Shift the arrow in by 9px, and make the text's rounded rect include it,
934         instead of having the arrow in a separate circle.
935
936 2013-08-01  Patrick Gansterer  <paroga@webkit.org>
937
938         Merge FrameWinCE into FrameWin
939         https://bugs.webkit.org/show_bug.cgi?id=117988
940
941         Reviewed by Brent Fulgham.
942
943         Reuse the code from FrameWin.cpp instead of duplicating it.
944
945         * PlatformWinCE.cmake:
946         * page/win/FrameGdiWin.cpp: Added.
947         (WebCore::imageFromRect):
948         * page/wince/FrameWinCE.cpp: Removed.
949
950 2013-08-01  Alex Christensen  <achristensen@apple.com>
951
952         Made OESTextureHalfFloat work on Windows.
953         https://bugs.webkit.org/show_bug.cgi?id=119298
954
955         Reviewed by Christophe Dumez.
956
957         * DerivedSources.cpp: Added JSOESTextureHalfFloat.cpp inside of #if ENABLE(WEBGL).
958         * WebCore.vcxproj/WebCore.vcxproj:
959         * WebCore.vcxproj/WebCore.vcxproj.filters:
960         Added JSOESTextureHalfFloat.cpp and JSOESTextureHalfFloat.h.
961         * html/canvas/OESTextureHalfFloat.idl: Added newline to end of file.
962         * html/canvas/WebGLObject.cpp: Removed unused #includes.
963
964 2013-08-01  Patrick Gansterer  <paroga@webkit.org>
965
966         Rearrange the code of FrameWin
967         https://bugs.webkit.org/show_bug.cgi?id=117984
968
969         Reviewed by Brent Fulgham.
970
971         Move code from the CG implementation into the general file so we can
972         share the code with Windows CE port in a next step. In a first step
973         it only shares more code between the CG and Cairo implementations.
974         Also use OwnPtr instead of plain pointers to make ownership more clear.
975
976         * page/win/FrameCGWin.cpp:
977         (WebCore::imageFromRect):
978         * page/win/FrameCairoWin.cpp:
979         (WebCore::imageFromRect):
980         * page/win/FrameWin.cpp:
981         (WebCore::imageFromSelection):
982         (WebCore::Frame::dragImageForSelection):
983         (WebCore::Frame::nodeImage):
984         * page/win/FrameWin.h:
985
986 2013-08-01  Andrei Parvu  <parvu@adobe.com>
987
988         mask-repeat: round bug
989
990         Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the
991         image is scaled so that the image can fit a whole number of times in the background.
992         https://bugs.webkit.org/show_bug.cgi?id=119080
993
994         Reviewed by Dirk Schulze.
995
996         Tests: css3/masking/mask-repeat-round-auto1.html
997                css3/masking/mask-repeat-round-auto2.html
998                css3/masking/mask-repeat-round-border.html
999                css3/masking/mask-repeat-round-content.html
1000                css3/masking/mask-repeat-round-padding.html
1001                css3/background/background-repeat-round-auto1.html
1002                css3/background/background-repeat-round-auto2.html
1003                css3/background/background-repeat-round-border.html
1004                css3/background/background-repeat-round-content.html
1005                css3/background/background-repeat-round-padding.html
1006
1007
1008
1009         * rendering/RenderBoxModelObject.cpp:
1010         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1011
1012 2013-08-01  Alexis Menard  <alexis@webkit.org>
1013
1014         Reduce CSSProperty's StylePropertyMetadata memory footprint by half when used inside a ImmutableStylePropertySet.
1015         https://bugs.webkit.org/show_bug.cgi?id=117715
1016
1017         Reviewed by Andreas Kling.
1018
1019         Today CSSProperty holds its metadata in the following way :
1020
1021         --------------------------------------------------------------------------------------------
1022         | m_propertyID : 14 We use 14 bits because CSSPropertyIDs start at 1001.                    | 
1023         | m_shorthandID : 14 id of the shorthand this property was set, 0 if not part of a shorthand|
1024         | m_important : 1                                                                           |
1025         | m_implicit : 1                                                                            |
1026         | m_inherited : 1                                                                           |
1027         --------------------------------------------------------------------------------------------
1028
1029         The proposal to decrease the memory footprint on CSSProperty's metadata
1030         only stand when stored inside ImmutableStylePropertySet which uses a custom
1031         way to allocate and lay out the StylePropertyMetadata and the CSSValues in
1032         memory because the idea behind is that the content will not change.
1033         The MutableStylePropertySet uses a regular vector to retrieve, remove
1034         and modify the CSSProperties. ImmutableStylePropertySet is used by default
1035         when parsing up until someone start to access the CSSOM like
1036         div.style which will convert the immutable to a mutable set. It is also good
1037         to note that a CSSProperty is created for every single statement inside a block
1038         in a stylesheet so we do have quite a bunch around. Another consideration is
1039         that the only client to the m_shorthandID is the inspector which uses it
1040         to group the longhands into a shorthand drop down list.
1041
1042         The new proposal is the following one :
1043         - Reduce m_propertyID to 10 bits by not starting the CSSPropertyIDs from
1044         1001 but rather 0 (or 3 as two are hardcoded CSSPropertyInvalid and CSSPropertyVariable).
1045         - Use the fact that we statically know which longhand belong to which shorthand. So
1046         we create a static mapping between longhands and shorthands.
1047
1048         Here is the new layout :
1049         ------------------------------------------------------------------------------
1050         | m_propertyID : 10 (up to 1024 properties), we have less than 400 today      |
1051         | m_isSetFromShorthand : 1 and then use the mapping in StylePropertyShorthand |
1052         | m_indexInShorthandsVector : 2                                               |
1053         | m_important : 1 (unchanged)                                                 |
1054         | m_implicit : 1  (unchanged)                                                 |
1055         | m_inherited : 1 (unchanged)                                                 |
1056         ------------------------------------------------------------------------------
1057
1058         it was set from using the new code in StylePropertyShorthand.
1059         - m_indexInShorthandsVector : 2 bits, unfortunately there are few longhands which belong to multiple
1060         shorthands so we need to store which was this longhand was part at parsing time. Notice
1061         that it does not store the CSSPropertyID of the matching shorthand but rather its position
1062         in the vector of matching shorthands. CSSProperty::m_shorthandID() method make it transparent
1063         for call sites and return the actual CSSPropertyID of the shorthand. So far 2 bits seems
1064         enough as there is only few longhands with ambiguity and they belong to 3 shorthands.
1065
1066         Profiling the benchmark with Intel Vtune to find out the performance regression
1067         showed that copying uint16_t, so StylePropertyMetadata, is not
1068         a fast operation in term of assembly code and has a big penalty on Windows 
1069         MSVC over unsigned for example. The latter produces a much faster code 
1070         when using unsigned over uint16_t (45% difference in the benchmark).
1071
1072         The patch avoid the copies of StylePropertyMetadata when applicable (by using const ref).
1073
1074         The second part of the fix is avoiding the conversion from an int (enum) to
1075         an uint16_t in a tight loop such as StylePropertySet::findPropertyIndex 
1076         (which is the hotspot of the benchmark).
1077
1078         On my Windows 7 64 bits Core i5 machine CSSPropertySetterGetter results are :
1079         - avg : 2714 runs/s with the patch
1080         - avg : 2696 runs/s without the patch
1081
1082         According to Andreas Kling this patch save up ~1.8Mb on membuster.
1083
1084         No new tests : refactor, old ones should cover.
1085
1086         * css/CSSComputedStyleDeclaration.cpp:
1087         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1088         * css/CSSParser.cpp:
1089         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
1090         (WebCore::CSSParser::addProperty):
1091         * css/CSSProperty.cpp:
1092         (WebCore::StylePropertyMetadata::shorthandID):
1093         (WebCore::borderDirections):
1094         * css/CSSProperty.h:
1095         (WebCore::StylePropertyMetadata::StylePropertyMetadata): Use uint16_t type for bitfields so sizeof() returns 2 bytes.
1096         (WebCore::CSSProperty::CSSProperty):
1097         (WebCore::CSSProperty::isSetFromShorthand):
1098         (WebCore::CSSProperty::shorthandID):
1099         * css/StylePropertySet.cpp:
1100         (WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
1101         (WebCore::getIndexInShorthandVectorForPrefixingVariant):
1102         (WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
1103         (WebCore::MutableStylePropertySet::setPrefixingVariantProperty):
1104         * css/StylePropertySet.h:
1105         (WebCore::StylePropertySet::PropertyReference::shorthandID):
1106         * css/StylePropertyShorthand.cpp:
1107         (WebCore::backgroundShorthand):
1108         (WebCore::backgroundPositionShorthand):
1109         (WebCore::backgroundRepeatShorthand):
1110         (WebCore::borderShorthand):
1111         (WebCore::borderAbridgedShorthand):
1112         (WebCore::borderBottomShorthand):
1113         (WebCore::borderColorShorthand):
1114         (WebCore::borderImageShorthand):
1115         (WebCore::borderLeftShorthand):
1116         (WebCore::borderRadiusShorthand):
1117         (WebCore::webkitBorderRadiusShorthand):
1118         (WebCore::borderRightShorthand):
1119         (WebCore::borderSpacingShorthand):
1120         (WebCore::borderStyleShorthand):
1121         (WebCore::borderTopShorthand):
1122         (WebCore::borderWidthShorthand):
1123         (WebCore::listStyleShorthand):
1124         (WebCore::fontShorthand):
1125         (WebCore::marginShorthand):
1126         (WebCore::markerShorthand):
1127         (WebCore::outlineShorthand):
1128         (WebCore::overflowShorthand):
1129         (WebCore::paddingShorthand):
1130         (WebCore::transitionShorthand):
1131         (WebCore::webkitAnimationShorthand):
1132         (WebCore::webkitAnimationShorthandForParsing):
1133         (WebCore::webkitBorderAfterShorthand):
1134         (WebCore::webkitBorderBeforeShorthand):
1135         (WebCore::webkitBorderEndShorthand):
1136         (WebCore::webkitBorderStartShorthand):
1137         (WebCore::webkitColumnsShorthand):
1138         (WebCore::webkitColumnRuleShorthand):
1139         (WebCore::webkitFlexFlowShorthand):
1140         (WebCore::webkitFlexShorthand):
1141         (WebCore::webkitMarginCollapseShorthand):
1142         (WebCore::webkitGridColumnShorthand):
1143         (WebCore::webkitGridRowShorthand):
1144         (WebCore::webkitMarqueeShorthand):
1145         (WebCore::webkitMaskShorthand):
1146         (WebCore::webkitMaskPositionShorthand):
1147         (WebCore::webkitMaskRepeatShorthand):
1148         (WebCore::webkitTextEmphasisShorthand):
1149         (WebCore::webkitTextStrokeShorthand):
1150         (WebCore::webkitTransitionShorthand):
1151         (WebCore::webkitTransformOriginShorthand):
1152         (WebCore::widthShorthand):
1153         (WebCore::heightShorthand):
1154         (WebCore::matchingShorthandsForLonghand):
1155         (WebCore::indexOfShorthandForLonghand):
1156         * css/StylePropertyShorthand.h:
1157         (WebCore::StylePropertyShorthand::StylePropertyShorthand):
1158         (WebCore::StylePropertyShorthand::id):
1159         * css/makeprop.pl:
1160
1161 2013-07-31  Andreas Kling  <akling@apple.com>
1162
1163         FINALize StyleSheet subclasses.
1164         <http://webkit.org/b/119370>
1165
1166         Reviewed by Anders Carlsson.
1167
1168         CSSStyleSheet and XSLStyleSheet have no further subclasses so make them final.
1169
1170         * css/CSSStyleSheet.h:
1171         * xml/XSLStyleSheet.h:
1172
1173 2013-07-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1174
1175         Introduce toSVGFontFaceElement, and use it
1176         https://bugs.webkit.org/show_bug.cgi?id=119330
1177
1178         Reviewed by Andreas Kling.
1179
1180         As a step to change static_cast with toSVGXXX, static_cast<SVGFontFaceElement*> can
1181         be changed with toSVGFontFaceElement().
1182
1183         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155082
1184
1185         * css/CSSFontFaceSource.cpp:
1186         (WebCore::CSSFontFaceSource::getFontData):
1187         * svg/SVGFontFaceElement.h:
1188         (WebCore::toSVGFontFaceElement):
1189         * svg/SVGFontFaceFormatElement.cpp:
1190         (WebCore::SVGFontFaceFormatElement::childrenChanged):
1191         * svg/SVGFontFaceSrcElement.cpp:
1192         (WebCore::SVGFontFaceSrcElement::childrenChanged):
1193         * svg/SVGFontFaceUriElement.cpp:
1194         (WebCore::SVGFontFaceUriElement::childrenChanged):
1195
1196 2013-07-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1197
1198         Introduce toSVGSMILElement, and use it
1199         https://bugs.webkit.org/show_bug.cgi?id=119260
1200
1201         Reviewed by Darin Adler.
1202
1203         As a step to change static_cast with toSVGXXX, static_cast<SVGSMILElement*> can
1204         be changed with toSVGSMILElement().
1205
1206         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155048
1207
1208         * svg/SVGAElement.cpp:
1209         (WebCore::SVGAElement::defaultEventHandler):
1210         * svg/animation/SMILTimeContainer.cpp:
1211         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
1212         * svg/animation/SVGSMILElement.cpp:
1213         (WebCore::SVGSMILElement::connectConditions):
1214         (WebCore::SVGSMILElement::disconnectConditions):
1215         * svg/animation/SVGSMILElement.h:
1216         (WebCore::toSVGSMILElement):
1217
1218 2013-07-31  Ryosuke Niwa  <rniwa@webkit.org>
1219
1220         Reuse of XMLHttpRequests causes character corruption in response text
1221         https://bugs.webkit.org/show_bug.cgi?id=119358
1222
1223         Reviewed by Anders Carlsson.
1224
1225         Merge https://chromium.googlesource.com/chromium/blink/+/6496e7bb9a0b46bc79032b86d5993b25f127a4cb
1226
1227         Test: http/tests/xmlhttprequest/reopen-encoding.html
1228
1229         * xml/XMLHttpRequest.cpp:
1230         (WebCore::XMLHttpRequest::clearResponseBuffers):
1231         (WebCore::XMLHttpRequest::didFinishLoading):
1232
1233 2013-07-31  Alexey Proskuryakov  <ap@apple.com>
1234
1235         Make ActiveDOMObject overrides private
1236         https://bugs.webkit.org/show_bug.cgi?id=119352
1237
1238         Reviewed by Sam Weinig.
1239
1240         There is no need to call these through derived classes. And it's quite harmful for
1241         anyone except for ScriptExecutionContext to call suspend/resume in particular -
1242         ScriptExecutionContext won't know, and it will try to manage the state on its own.
1243
1244         * Modules/filesystem/DOMFileSystem.h:
1245         * Modules/filesystem/FileWriter.h:
1246         * Modules/geolocation/Geolocation.h:
1247         * Modules/indexeddb/IDBDatabase.h:
1248         * Modules/indexeddb/IDBRequest.h:
1249         * Modules/indexeddb/IDBTransaction.h:
1250         * Modules/mediasource/MediaSource.h:
1251         * Modules/notifications/Notification.h:
1252         * Modules/notifications/NotificationCenter.h:
1253         * Modules/websockets/WebSocket.h:
1254         * fileapi/FileReader.h:
1255         * html/HTMLMediaElement.h:
1256         * html/canvas/WebGLRenderingContext.h:
1257         * page/DOMTimer.h:
1258         * page/EventSource.h:
1259         * page/SuspendableTimer.h:
1260         * workers/AbstractWorker.h:
1261         * xml/XMLHttpRequest.h:
1262
1263 2013-07-31  Tim Horton  <timothy_horton@apple.com>
1264
1265         Remove didFinishLoad order quirk
1266         https://bugs.webkit.org/show_bug.cgi?id=119354
1267         <rdar://problem/11510686>
1268
1269         Reviewed by Alexey Proskuryakov.
1270
1271         * loader/FrameLoader.cpp:
1272         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1273         Remove the quirk.
1274
1275         * page/Settings.in:
1276         Remove the setting controlling the quirk.
1277
1278 2013-07-31  Kwang Yul Seo  <skyul@company100.net>
1279
1280         Replace CRASH() on overflow with Checked<>
1281         https://bugs.webkit.org/show_bug.cgi?id=119327
1282
1283         Reviewed by Oliver Hunt.
1284
1285         Use a checked type that allows us to automate bound checks. We use a
1286         non-recording Checked<> to keep the behavior.
1287
1288         No behavior change, no new tests needed.
1289
1290         * dom/Text.cpp:
1291         (WebCore::Text::wholeText):
1292         * platform/audio/AudioArray.h:
1293         (WebCore::AudioArray::allocate):
1294
1295 2013-07-31  Kwang Yul Seo  <skyul@company100.net>
1296
1297         Use emptyString instead of String("")
1298         https://bugs.webkit.org/show_bug.cgi?id=119335
1299
1300         Reviewed by Darin Adler.
1301
1302         Use emptyString() instead of String("") because it is better style and
1303         faster. This is a followup to r116908, removing all occurrences of
1304         String("") from WebKit.
1305
1306         No behavior change, no new tests needed.
1307
1308         * platform/graphics/blackberry/LayerAnimation.h:
1309         (WebCore::LayerAnimation::name):
1310         * platform/mac/PlatformEventFactoryMac.mm:
1311         (WebCore::textFromEvent):
1312         (WebCore::unmodifiedTextFromEvent):
1313         (WebCore::keyIdentifierForKeyEvent):
1314
1315 2013-07-31  Ruth Fong  <ruth_fong@apple.com>
1316
1317         <input type=color> Mac UI behaviour
1318         <rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
1319
1320         Reviewed by Brady Eidson.
1321
1322         This patch turns on INPUT_TYPE_COLOR and implements it using the native
1323         Mac color panel.
1324
1325         No new tests added.
1326     
1327         Currently, there are no automated ways to test the types of changes made in this patch. (i.e. checking 
1328         which color is being displayed in the color panel, checking which color element is currently 
1329         associated to the color panel, checking the state of color elements after directing away and 
1330         being directed back to its page, etc.)
1331
1332         * Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
1333         * WebCore.exp.in:
1334         * WebCore.xcodeproj/project.pbxproj:
1335
1336         * html/ColorInputType.cpp:
1337         (WebCore::ColorInputType::handleDOMActivateEvent): Reattaches the color picker if
1338           a color picker has already been shown for an element
1339         (WebCore::ColorInputType::shouldResetOnDocumentActivation): Always returns true, needed to
1340           detach the color picker when caching a page.
1341         * html/ColorInputType.h:
1342
1343         * html/HTMLInputElement.cpp:
1344         (WebCore::HTMLInputElement::documentDidResumeFromPageCache): For <input type='color'>,
1345           don't reset the element.
1346         (WebCore::HTMLInputElement::documentWillSuspendForPageCache): For <input type='color'>, call detach().
1347         * html/HTMLInputElement.h:
1348
1349         * platform/ColorChooser.h:
1350         (WebCore::ColorChooser::reattachColorChooser): Added definition.
1351
1352 2013-07-30  Gavin Barraclough  <barraclough@apple.com>
1353
1354         Some cleanup in JSValue::get
1355         https://bugs.webkit.org/show_bug.cgi?id=119343
1356
1357         Reviewed by Geoff Garen.
1358
1359         * WebCore.exp.in:
1360         * bindings/js/JSDOMWindowCustom.cpp:
1361         (WebCore::JSDOMWindow::getOwnPropertySlot):
1362         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1363         * bindings/scripts/CodeGeneratorJS.pm:
1364         (GenerateHeader):
1365         (GenerateImplementation):
1366         (GenerateConstructorDeclaration):
1367         (GenerateConstructorHelperMethods):
1368         * bridge/objc/objc_runtime.h:
1369         * bridge/objc/objc_runtime.mm:
1370         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
1371         * bridge/runtime_array.cpp:
1372         (JSC::RuntimeArray::getOwnPropertySlot):
1373         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
1374         * bridge/runtime_array.h:
1375         * bridge/runtime_method.cpp:
1376         (JSC::RuntimeMethod::getOwnPropertySlot):
1377         * bridge/runtime_method.h:
1378         * bridge/runtime_object.cpp:
1379         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
1380         * bridge/runtime_object.h:
1381             - getOwnPropertySlot, JSCell -> JSObject
1382
1383 2013-07-31  Alexey Proskuryakov  <ap@apple.com>
1384
1385         REGRESSION (r153406): DOM intervals are not properly restarted when resumed
1386         https://bugs.webkit.org/show_bug.cgi?id=119345
1387
1388         Reviewed by Sam Weinig.
1389
1390         * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::suspend): Call base class
1391         version of repeatInterval(), not our version that will just return the current value
1392         of m_savedRepeatInterval in this situation.
1393
1394 2013-07-31  Ryosuke Niwa  <rniwa@webkit.org>
1395
1396         Avoid calling nextRenderer() in some cases
1397         https://bugs.webkit.org/show_bug.cgi?id=119313
1398
1399         Reviewed by Andreas Kling.
1400
1401         Merge https://chromium.googlesource.com/chromium/blink/+/3207cfda52082f4fd6a04c7819c18a980de58beb.
1402
1403         * dom/Text.cpp:
1404         (WebCore::Text::textRendererIsNeeded):
1405
1406 2013-07-31  Ryosuke Niwa  <rniwa@webkit.org>
1407
1408         Convert most callers of setInlineStyleProperty passing strings to enums or doubles instead
1409         https://bugs.webkit.org/show_bug.cgi?id=119304
1410
1411         Reviewed by Andreas Kling.
1412
1413         Merge https://chromium.googlesource.com/chromium/blink/+/8157dd9381716759f183fabbfed29c52962be746
1414
1415         * editing/DeleteButtonController.cpp:
1416         (WebCore::DeleteButtonController::createDeletionUI):
1417         (WebCore::DeleteButtonController::show):
1418         * html/HTMLTextFormControlElement.cpp:
1419         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1420         * html/ImageDocument.cpp:
1421         (WebCore::ImageDocument::resizeImageToFit):
1422         (WebCore::ImageDocument::restoreImageSize):
1423         (WebCore::ImageDocument::windowSizeChanged):
1424         * html/shadow/MediaControlElements.cpp:
1425         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1426         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
1427         * html/track/TextTrackCue.cpp:
1428         (WebCore::TextTrackCue::setFontSize):
1429         * html/track/TextTrackCueGeneric.cpp:
1430         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1431         (WebCore::TextTrackCueGeneric::setFontSize):
1432         * rendering/RenderLayer.cpp:
1433         (WebCore::RenderLayer::resize):
1434
1435 2013-07-31  Jae Hyun Park  <jae.park@company100.net>
1436
1437         [Coordinated Graphics] Use m_ prefix only for member variable
1438         https://bugs.webkit.org/show_bug.cgi?id=119250
1439
1440         Reviewed by Noam Rosenthal.
1441
1442         WebKit coding style suggests to use m_ prefix only for data members.
1443         This patch also removes unnecessary copy by passing const-reference
1444         parameter values.
1445
1446         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
1447         (WebCore::CoordinatedCustomFilterProgram::create):
1448
1449 2013-07-31  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1450
1451         [Qt] Images are down-scaled badly
1452         https://bugs.webkit.org/show_bug.cgi?id=119263
1453
1454         Reviewed by Jocelyn Turcotte.
1455
1456         QPainter only does bilinear filtering, which means it will downscaling beyond
1457         0.5x will start skipping pixel and start to degrade the end result. Scaling in
1458         QImage and QPixmap however uses a better but much more expensive sampling that
1459         counts all pixels.
1460
1461         To get the high quality downscaling we must therefore prescale the images before
1462         painting them. To avoid a performance impact on repeated paints the prescaled
1463         image are saved in the QPixmapCache.
1464
1465         * platform/graphics/qt/ImageQt.cpp:
1466         (WebCore::BitmapImage::draw):
1467
1468 2013-07-31  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1469
1470         Remove guessesVector param from isUngrammatical
1471         https://bugs.webkit.org/show_bug.cgi?id=119241
1472
1473         Reviewed by Ryosuke Niwa.
1474
1475         TextCheckingHelper::isUngrammatical(Vector<String>& guessesVector) doesn't return
1476         guesses for ungrammatical phrases through its parameter.
1477         Editor::isSelectionUngrammatical() uses it to check whether the selection
1478         is ungrammatical.
1479
1480         r71009 showed that isUngrammatical(Vector<String>& guessesVector) had not supported
1481         grammar guesses.
1482
1483         The grammar guesses can be retrieved by guessesForMisspelledOrUngrammaticalRange
1484         when UNIFIED_TEXT_CHECKING is on.
1485
1486         No new tests, this is dead code due to no WebKit port implements grammar using
1487         legacy text checker.
1488
1489         * WebCore.exp.in: Removed __ZN7WebCore6Editor32guessesForUngrammaticalSelectionEv.
1490         * editing/Editor.cpp:
1491         (WebCore::Editor::isSelectionUngrammatical):
1492         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
1493         * editing/Editor.h: Removed guessesForUngrammaticalSelection. Dead code.
1494         * editing/TextCheckingHelper.cpp:
1495         (WebCore::TextCheckingHelper::isUngrammatical):
1496         * editing/TextCheckingHelper.h:
1497
1498 2013-07-31  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1499
1500         Unnecessary const_cast<TextCheckingHelper*>(this)->findFirstBadGrammar
1501         https://bugs.webkit.org/show_bug.cgi?id=119244
1502
1503         Reviewed by Ryosuke Niwa.
1504
1505         Added missing const modifier to findFirstBadGrammar (and findFirstGrammarDetail
1506         respectively) to call it in 'isUngrammatical() const' without const casting.
1507
1508         No new tests, no behavior change.
1509
1510         * editing/TextCheckingHelper.cpp:
1511         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
1512         (WebCore::TextCheckingHelper::findFirstBadGrammar):
1513         Added const.
1514
1515         (WebCore::TextCheckingHelper::isUngrammatical):
1516         Now const_cast can be removed.
1517
1518         * editing/TextCheckingHelper.h:
1519
1520 2013-07-30  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1521
1522         findFirstGrammarDetail doesn't need to be exposed.
1523         https://bugs.webkit.org/show_bug.cgi?id=119249
1524
1525         Reviewed by Darin Adler.
1526
1527         Make TextCheckingHelper::findFirstGrammarDetail private.
1528         Remove badGrammarPhraseLength param. It's not used any longer.
1529
1530         No new tests, no behavior change.
1531
1532         * editing/TextCheckingHelper.cpp:
1533         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
1534         (WebCore::TextCheckingHelper::findFirstBadGrammar):
1535         * editing/TextCheckingHelper.h:
1536
1537 2013-07-30  Tim Horton  <timothy_horton@apple.com>
1538
1539         DHTML drag can result in a null-deref under WebDragClient::startDrag
1540         https://bugs.webkit.org/show_bug.cgi?id=119297
1541         <rdar://problem/14213012>
1542
1543         Reviewed by Simon Fraser.
1544
1545         Test: fast/events/setDragImage-in-document-element-crash.html
1546
1547         * page/mac/FrameSnapshottingMac.mm:
1548         (WebCore::snapshotDragImage):
1549         We shouldn't waste time painting an empty image, nor should we return
1550         an image with no size.
1551
1552 2013-07-30  Pravin D  <pravind@samsung.com>
1553
1554         Dotted borders render w/ artifacts and sometimes as solid lines
1555         https://bugs.webkit.org/show_bug.cgi?id=3964
1556
1557         Reviewed by Elliott Sprehn.
1558
1559         While drawing the dotted border, the common borders are drawn by the cells sharing them. The dotted borders
1560         become(tend) solid when the starting and the end points of the border drawn by the two cells don't match. This
1561         fixes the same. 
1562
1563         Test: fast/table/border-collapsing/dotted-collapsed-border.html
1564
1565         * rendering/RenderTableCell.cpp:
1566         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
1567         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
1568          Helper function to decide if border's start point requires any adjustment.
1569
1570         (WebCore::RenderTableCell::paintCollapsedBorders):
1571         Added logic to handle dotted borders so that they do not become solid.
1572
1573         * rendering/RenderTableCell.h:
1574          Helper function declarations.
1575
1576 2013-07-30  Vani Hegde  <vani.hegde@samsung.com>
1577
1578         Gmail reply email - Bold and Italic style  get stuck
1579         https://bugs.webkit.org/show_bug.cgi?id=118185
1580
1581         Reviewed by Ryosuke Niwa.
1582
1583         When bold/italic style is applied to a content with mixed editability,
1584         style is applied appropriately for the first time.
1585         But after this, style toggling does not work any more. Same behavior
1586         can be observed when the content on which style is applied contains
1587         text node without renderer (Ex: text node corresponding to tab/space etc)
1588
1589         When bold/italic style is applied on a selection, we actually apply the
1590         style only for text nodes that have renderers and also are contenteditable.
1591         Similarly during style toggling, to check whether a style has been already
1592         applied on a selection
1593
1594         Tests: editing/style/toggle-style-bold-italic-mixed-editability.html
1595                editing/style/toggle-style-bold-italic.html
1596
1597         * editing/EditingStyle.cpp:
1598         (WebCore::EditingStyle::triStateOfStyle):
1599         A particular selection on which style is applied may contain text nodes
1600         without renderers(text nodes corresponding to tab/space) or text nodes
1601         that are not contenteditable. We do not apply style to such text nodes.
1602         Hence, even during style toggling we should not consider the styles
1603         present in such nodes.
1604
1605 2013-07-30  Rob Buis  <rwlbuis@webkit.org>
1606
1607         XMLSerializer should reset default namespace when necessary
1608         https://bugs.webkit.org/show_bug.cgi?id=16739
1609         XMLSerializer's handling of namespaces seems to be pretty broken
1610         https://bugs.webkit.org/show_bug.cgi?id=106531
1611
1612         Reviewed by Ryosuke Niwa.
1613
1614         Write out empty default namespace declaration if the element is not in any namespace, as
1615         described in http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-serialization-algorithm.
1616
1617         Tests: fast/dom/XMLSerializer-element-empty-namespace.html
1618                fast/dom/XMLSerializer-element-empty-namespace2.html
1619
1620         * editing/MarkupAccumulator.cpp:
1621         (WebCore::MarkupAccumulator::appendNamespace):
1622         (WebCore::MarkupAccumulator::appendOpenTag):
1623         * editing/MarkupAccumulator.h:
1624
1625 2013-07-30  Chris Fleizach  <cfleizach@apple.com>
1626
1627         Don't post accessibility notification on object in detached document.
1628         https://bugs.webkit.org/show_bug.cgi?id=119286
1629
1630         Reviewed by Ryosuke Niwa.
1631
1632         Merge https://chromium.googlesource.com/chromium/blink/+/ef9fc9e70202dcf33e5cf2f0f0a2135945ffe17e%5E%21/#F0
1633
1634         Don't post accessibility notification on object in detached document.
1635
1636         This can happen if an accessibility notification is queued on a node,
1637         then that node is reparented to a different document that's not attached
1638         anywhere before the accessibility notification is fired.
1639
1640         * accessibility/AXObjectCache.cpp:
1641         (WebCore::AXObjectCache::notificationPostTimerFired):
1642
1643 2013-07-30  Andy Estes  <aestes@apple.com>  
1644
1645         Content filter replacement data uses the encoding from the blocked page's response headers
1646         https://bugs.webkit.org/show_bug.cgi?id=119237
1647
1648         Reviewed by Darin Adler.
1649
1650         When a document specifies an encoding in an HTTP response header, or
1651         when the embedder specifies an override encoding, and the content filter
1652         blocks the document, we interpret the content filter's replacement data
1653         using this encoding. This might be the wrong.
1654
1655         Forget about encodings determined from these sources. The replacement
1656         data will specify an encoding in a <meta charset>, so let that be used
1657         instead.
1658
1659         No new tests. We don't currently have a mechanism for testing the
1660         content filter from WebKit.
1661
1662         * loader/DocumentLoader.cpp:
1663         (WebCore::DocumentLoader::commitData): Pretend as if no encoding is
1664         specified if the content filter blocked the load.
1665         (WebCore::DocumentLoader::dataReceived): Stopped calling commitLoad()
1666         before early-returning if the content filter needs more data. This isn't
1667         necessary.
1668
1669 2013-07-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1670
1671         Add 'colno' attribute to ErrorEvent interface
1672         https://bugs.webkit.org/show_bug.cgi?id=119257
1673
1674         Reviewed by Darin Adler.
1675
1676         Add 'colno' attribute to ErrorEvent interface to match the latest specification:
1677         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent
1678
1679         The 'colno' attribute is already supported by IE10 and Blink.
1680
1681         No new tests, covered by existing tests.
1682
1683         * dom/ErrorEvent.cpp:
1684         (WebCore::ErrorEventInit::ErrorEventInit):
1685         (WebCore::ErrorEvent::ErrorEvent):
1686         * dom/ErrorEvent.h:
1687         * dom/ErrorEvent.idl:
1688
1689 2013-07-30  Andreas Kling  <akling@apple.com>
1690
1691         Inactive style sheets should not trigger style recalc when loaded.
1692         <http://webkit.org/b/119236>
1693         <rdar://problem/14588132>
1694
1695         Reviewed by Antti Koivisto.
1696
1697         Style sheets that are either alternate sheets or are excluded by their media query should not trigger
1698         a full style recalc when they finish loading, since the end result will not be observably different.
1699
1700         The sheets are still inspectable through document.styleSheets.
1701
1702         Changed enums from Blocking/NonBlocking to ActiveSheet/InactiveSheet to clarify what's going on.
1703
1704         * html/HTMLLinkElement.h:
1705         * html/HTMLLinkElement.cpp:
1706         (WebCore::HTMLLinkElement::HTMLLinkElement):
1707         (WebCore::HTMLLinkElement::setDisabledState):
1708         (WebCore::HTMLLinkElement::process):
1709         (WebCore::HTMLLinkElement::startLoadingDynamicSheet):
1710         (WebCore::HTMLLinkElement::addPendingSheet):
1711         (WebCore::HTMLLinkElement::removePendingSheet):
1712
1713 2013-07-30  Tim Horton  <timothy_horton@apple.com>
1714
1715         Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
1716         https://bugs.webkit.org/show_bug.cgi?id=119275
1717
1718         Reviewed by Simon Fraser.
1719
1720         * WebCore.exp.in:
1721         * page/FrameView.cpp:
1722         (WebCore::FrameView::paintContentsForSnapshot):
1723         * page/FrameView.h:
1724         Fix typo.
1725
1726 2013-07-30  Alex Christensen  <achristensen@apple.com>
1727
1728         Compile fix for WebGL on 32-bit Windows.
1729         https://bugs.webkit.org/show_bug.cgi?id=119235
1730
1731         Reviewed by Darin Adler.
1732
1733         * platform/graphics/GLContext.cpp:
1734         Created GLNativeWindowType typedef.
1735         (WebCore::GLContext::createContextForWindow):
1736         * platform/graphics/GLContext.h:
1737         Replaced uint64_t with GLNativeWindowType.
1738
1739 2013-07-30  Patrick Gansterer  <paroga@webkit.org>
1740
1741         [WIN] Remove dependency on CoreFoundation from DownloadBundle
1742         https://bugs.webkit.org/show_bug.cgi?id=119247
1743
1744         Reviewed by Anders Carlsson.
1745
1746         * platform/network/cf/DownloadBundle.h:
1747         * platform/network/curl/DownloadBundle.h:
1748         * platform/network/win/DownloadBundleWin.cpp:
1749         (WebCore::DownloadBundle::magicNumber):
1750         (WebCore::DownloadBundle::appendResumeData):
1751         (WebCore::DownloadBundle::extractResumeData):
1752
1753 2013-07-30  Patrick Gansterer  <paroga@webkit.org>
1754
1755         Move WindowsExtras.h from WebCore to WTF
1756         https://bugs.webkit.org/show_bug.cgi?id=118125
1757
1758         Reviewed by Anders Carlsson.
1759
1760         Move it to WTF to be able to use the functions in WTF too.
1761
1762         * platform/PlatformKeyboardEvent.h:
1763         * platform/PlatformMouseEvent.h:
1764         * platform/PlatformWheelEvent.h:
1765         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
1766         * platform/win/MIMETypeRegistryWin.cpp:
1767         * platform/win/PasteboardWin.cpp:
1768         * platform/win/PopupMenuWin.cpp:
1769         * platform/win/RunLoopWin.cpp:
1770         * platform/win/SharedTimerWin.cpp:
1771         * platform/win/WindowMessageListener.h:
1772         * plugins/win/PluginDatabaseWin.cpp:
1773
1774 2013-07-30  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1775
1776         Pass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
1777         https://bugs.webkit.org/show_bug.cgi?id=119251
1778
1779         Reviewed by Geoffrey Garen.
1780
1781         As per the latest specification, the WorkerGlobalScope.onerror and Window.onerror event
1782         handlers should be given the column as fourth argument:
1783         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
1784         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#onerroreventhandler
1785
1786         The column argument is already supported by IE10 and Blink.
1787
1788         No new tests, covered by existing tests.
1789
1790         * bindings/js/JSErrorHandler.cpp:
1791         (WebCore::JSErrorHandler::handleEvent):
1792         * bindings/js/WorkerScriptController.cpp:
1793         (WebCore::WorkerScriptController::evaluate):
1794         * dom/ErrorEvent.cpp:
1795         (WebCore::ErrorEvent::ErrorEvent):
1796         * dom/ErrorEvent.h:
1797         (WebCore::ErrorEvent::create):
1798         (WebCore::ErrorEvent::colno):
1799         * dom/ScriptExecutionContext.cpp:
1800         (WebCore::ScriptExecutionContext::sanitizeScriptError):
1801         (WebCore::ScriptExecutionContext::reportException):
1802         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
1803         * dom/ScriptExecutionContext.h:
1804         * workers/WorkerMessagingProxy.cpp:
1805         (WebCore::WorkerExceptionTask::performTask):
1806
1807 2013-07-30  Patrick Gansterer  <paroga@webkit.org>
1808
1809         Use OwnPtr in RenderThemeWin and ScrollbarThemeWin
1810         https://bugs.webkit.org/show_bug.cgi?id=117978
1811
1812         Reviewed by Brent Fulgham.
1813
1814         Use OwnPtr to avoid manual deletion of objects.
1815
1816         * platform/win/ScrollbarThemeWin.cpp:
1817         (WebCore::ScrollbarThemeWin::paintTrackPiece):
1818         * rendering/RenderThemeWin.cpp:
1819         (WebCore::drawControl):
1820
1821 2013-07-30  Alex Christensen  <achristensen@apple.com>
1822
1823         Added include directories to Visual Studio for WebGL.
1824         https://bugs.webkit.org/show_bug.cgi?id=119161
1825
1826         Reviewed by Brent Fulgham.
1827
1828         * WebCore.vcxproj/WebCoreCommon.props: Added more include directories.
1829
1830 2013-07-30  Commit Queue  <commit-queue@webkit.org>
1831
1832         Unreviewed, rolling out r151957 and r152531.
1833         http://trac.webkit.org/changeset/151957
1834         http://trac.webkit.org/changeset/152531
1835         https://bugs.webkit.org/show_bug.cgi?id=119267
1836
1837         They revealed a bug on Mac I can't fix (Requested by Ossy on
1838         #webkit).
1839
1840         * platform/graphics/BitmapImage.cpp:
1841         (WebCore::BitmapImage::frameIsCompleteAtIndex):
1842         (WebCore::BitmapImage::frameDurationAtIndex):
1843         * platform/graphics/ImageSource.cpp:
1844         (WebCore::ImageSource::frameDurationAtIndex):
1845         (WebCore::ImageSource::frameHasAlphaAtIndex):
1846         (WebCore::ImageSource::frameIsCompleteAtIndex):
1847         * platform/graphics/ImageSource.h:
1848         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1849         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1850         * platform/graphics/cg/ImageSourceCG.cpp:
1851         (WebCore::ImageSource::frameIsCompleteAtIndex):
1852         (WebCore::ImageSource::frameDurationAtIndex):
1853         (WebCore::ImageSource::frameHasAlphaAtIndex):
1854         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1855         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1856         * platform/image-decoders/ImageDecoder.cpp:
1857         (WebCore::ImageDecoder::frameHasAlphaAtIndex):
1858         * platform/image-decoders/ImageDecoder.h:
1859         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1860         (WebCore::GIFImageDecoder::haveDecodedRow):
1861         (WebCore::GIFImageDecoder::gifComplete):
1862         (WebCore::GIFImageDecoder::decode):
1863         (WebCore::GIFImageDecoder::initFrameBuffer):
1864         * platform/image-decoders/gif/GIFImageDecoder.h:
1865         * platform/image-decoders/gif/GIFImageReader.h:
1866         (GIFImageReader::frameContext):
1867
1868 2013-07-30  Kwang Yul Seo  <skyul@company100.net>
1869
1870         Remove using namespace std from SpatialNavigation
1871         https://bugs.webkit.org/show_bug.cgi?id=119242
1872
1873         Reviewed by Antonio Gomes.
1874
1875         "using namespace" statements in headers are dangerous and should be
1876         avoided. check-webkit-style has been changed to flag them as an error
1877         since r152719. Use explicit std:: qualifiers instead.
1878
1879         No behavior change, no new tests needed.
1880
1881         * page/SpatialNavigation.cpp:
1882         (WebCore::scrollInDirection):
1883         * page/SpatialNavigation.h:
1884         (WebCore::maxDistance):
1885
1886 2013-07-30  Simon Hausmann  <simon.hausmann@digia.com>
1887
1888         [Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012
1889         https://bugs.webkit.org/show_bug.cgi?id=119238
1890
1891         Reviewed by Jocelyn Turcotte.
1892
1893         As suggested in https://bugreports.qt-project.org/browse/QTBUG-20556,
1894         the WebKit build with MSVC 2012 is affected by the same size
1895         limitations.
1896
1897         * WebCore.pri:
1898
1899 2013-07-30  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1900
1901         REGRESION(r151091) ASSERTION FAILED: m_readableData || m_writableData
1902         https://bugs.webkit.org/show_bug.cgi?id=119142
1903
1904         Reviewed by Jocelyn Turcotte.
1905
1906         Remove invalid assert.
1907
1908         Covered by existing tests.
1909
1910         * platform/qt/PasteboardQt.cpp:
1911         (WebCore::Pasteboard::readData):
1912
1913 2013-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1914
1915         Unreviewed. Fix make distcheck.
1916
1917         * GNUmakefile.list.am: Add missing header file to compilation.
1918
1919 2013-07-29  Kwang Yul Seo  <skyul@company100.net>
1920
1921         [Gtk] Improve string use in PasteboardGtk
1922         https://bugs.webkit.org/show_bug.cgi?id=119204
1923
1924         Reviewed by Martin Robinson.
1925
1926         Use emptyString() instead of "" and use ASCIILiteral where appropriate.
1927
1928         No behavior change, no new tests needed.
1929
1930         * platform/gtk/PasteboardGtk.cpp:
1931         (WebCore::Pasteboard::documentFragment):
1932         Use emptyString() instead of "".
1933         (WebCore::Pasteboard::types):
1934         Use ASCIILiteral where appropriate.
1935
1936 2013-07-29  Simon Fraser  <simon.fraser@apple.com>
1937
1938         Page count can be incorrect if there is a pending style recalc
1939         https://bugs.webkit.org/show_bug.cgi?id=119232
1940
1941         Reviewed by Beth Dakin.
1942
1943         If style is changed in a way that schedules a style recalc on the Document,
1944         and then Page::pageCount() is called, we may give the wrong answer because
1945         the existing code only checked FrameView::needsLayout(), not whether a style
1946         recale was pending.
1947         
1948         Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
1949         as we do for other properties that require layer, and are exposed to JS
1950         or via API.
1951
1952         * page/Page.cpp:
1953         (WebCore::Page::pageCount):
1954
1955 2013-07-29  Alex Christensen  <achristensen@apple.com>
1956
1957         Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
1958         https://bugs.webkit.org/show_bug.cgi?id=119223
1959
1960         Reviewed by Kenneth Rohde Christiansen.
1961
1962         * GNUmakefile.list.am:
1963         * PlatformGTK.cmake:
1964         * WebCore.vcxproj/WebCore.vcxproj:
1965         * WebCore.vcxproj/WebCore.vcxproj.filters:
1966         Changed location of GLContext.cpp and GLContext.h.
1967         * platform/graphics/GLContext.cpp: Copied from WebCore/platform/graphics/cairo/GLContext.cpp.
1968         * platform/graphics/GLContext.h: Copied from WebCore/platform/graphics/cairo/GLContext.h.
1969         * platform/graphics/cairo/GLContext.cpp: Removed.
1970         * platform/graphics/cairo/GLContext.h: Removed.
1971
1972 2013-07-29  Jer Noble  <jer.noble@apple.com>
1973
1974         TextTrackRepresentation captions often disappear then appear again.
1975         https://bugs.webkit.org/show_bug.cgi?id=119228
1976
1977         Reviewed by Simon Fraser.
1978
1979         Calling updateTextTrackDisplay() will cause the entire DOM subtree containing the active cues
1980         to be torn down and rebuilt. Only call into this method when text tracks have actually changed.
1981
1982         Add an enum parameter to configureTextTrackDisplay() which allows the caller to specify that
1983         method should assume that the list of visible text tracks has changed, forcing a call to
1984         updateTextTrackDisplay().
1985
1986         * html/HTMLMediaElement.cpp:
1987         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove the unnecessary call to updateTextTrackDisplay().
1988         (WebCore::HTMLMediaElement::textTrackModeChanged): Pass AssumeVisibleTextTracksChanged to configureTextTrackDisplay().
1989         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Check the passed flags and exit early only if
1990             AssumeVisibleTextTracksChanged is not set.
1991         * html/HTMLMediaElement.h:
1992
1993 2013-07-26  Ryosuke Niwa  <rniwa@webkit.org>
1994
1995         Fix crash due to unexpected Node deletion during MutationObserver registration book-keeping
1996         https://bugs.webkit.org/show_bug.cgi?id=119124
1997
1998         Reviewed by Sam Weinig.
1999
2000         Merge https://chromium.googlesource.com/chromium/blink/+/b6afb927695b3acf2c75c25f05e99682660993e2
2001
2002         No new tests since I could not reproduce the crash with the test attached in the Blink change.
2003
2004         The bug was caused by Node::unregisterMutationObserver removing the MutationObserverRegistration
2005         that holds the last ref to the node. Avoid that by explicitly allocating a local RefPtr to the node
2006         in MutationObserverRegistration::unregister. Also rename it to unregisterAndDelete to clarify
2007         the semantics and make it a static member function to be even safer.
2008
2009         * dom/MutationObserver.cpp:
2010         (WebCore::MutationObserver::disconnect):
2011         * dom/MutationObserverRegistration.cpp:
2012         (WebCore::MutationObserverRegistration::unregisterAndDelete):
2013         * dom/MutationObserverRegistration.h:
2014
2015 2013-07-29  Alex Christensen  <achristensen@apple.com>
2016
2017         Moved GLTransportSurface.h and .cpp out of efl-specific directory.
2018         https://bugs.webkit.org/show_bug.cgi?id=119163
2019
2020         Reviewed by Alexis Menard.
2021
2022         * PlatformEfl.cmake: Changed directory of GLTransportSurface.cpp.
2023         * platform/graphics/surfaces/GLTransportSurface.cpp: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.cpp.
2024         * platform/graphics/surfaces/GLTransportSurface.h: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.h.
2025         * platform/graphics/surfaces/efl/GLTransportSurface.cpp: Removed.
2026         * platform/graphics/surfaces/efl/GLTransportSurface.h: Removed.
2027
2028 2013-07-29  Alex Christensen  <achristensen@apple.com>
2029
2030         Speculative implementation of missing GraphicsContext3D methods on Windows.
2031         https://bugs.webkit.org/show_bug.cgi?id=119167
2032
2033         Reviewed by Dean Jackson.
2034
2035         * WebCore.vcxproj/WebCore.vcxproj:
2036         * WebCore.vcxproj/WebCore.vcxproj.filters:
2037         * platform/graphics/win/GraphicsContext3DWin.cpp: Added.
2038         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2039         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2040         (WebCore::GraphicsContext3D::create):
2041         (WebCore::GraphicsContext3D::GraphicsContext3D):
2042         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2043         (WebCore::GraphicsContext3D::setContextLostCallback):
2044         (WebCore::GraphicsContext3D::setErrorMessageCallback):
2045         (WebCore::GraphicsContext3D::makeContextCurrent):
2046         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2047         (WebCore::GraphicsContext3D::platformTexture):
2048         (WebCore::GraphicsContext3D::isGLES2Compliant):
2049         (WebCore::GraphicsContext3D::platformLayer):
2050
2051 2013-07-29  Dean Jackson  <dino@apple.com>
2052
2053         Max IOSurfaceDimension should be an inclusive upper bound
2054         https://bugs.webkit.org/show_bug.cgi?id=119206
2055         <rdar://problem/14555311>
2056
2057         Reviewed by Simon Fraser.
2058
2059         The maxIOSurfaceDimension value should be an inclusive upper bound.
2060         Change the greater than or equal to into a greater than. This will
2061         allow canvas elements of this dimension to be accelerated.
2062
2063         * platform/graphics/cg/ImageBufferCG.cpp:
2064         (WebCore::ImageBuffer::ImageBuffer): Change >= to >
2065
2066 2013-07-29  Renata Hodovan  <reni@webkit.org>
2067
2068         ASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString
2069         https://bugs.webkit.org/show_bug.cgi?id=118744
2070
2071         Reviewed by Philip Rogers.
2072
2073         If we have an <animateTransform> tag that sets the attributeName and attributeType
2074         properties however they are not consistent and we shouldn't try to apply it.
2075         It is already checked and catched in SVGAnimateElement::resetAnimatedType() but
2076         DontApplyAnimation case isn't handled properly. The patch forces an early return
2077         in this case.
2078
2079         Test: svg/animations/attributeNameAndAttributeTypeMissmatch.svg
2080
2081         * svg/SVGAnimateElement.cpp:
2082         (WebCore::SVGAnimateElement::resetAnimatedType):
2083
2084 2013-07-29  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2085
2086         REGRESSION(148300) GIFs not reanimated after resumeActiveDOMObjectAndAnimations
2087         https://bugs.webkit.org/show_bug.cgi?id=119217
2088
2089         Reviewed by Tim Horton.
2090
2091         Commit 148300 introduced a new better was of restarting GIF animations after
2092         they have been suspended. Unfortunately the method was not activated when a page
2093         is resumed but only when it is returning from background.
2094
2095         This fixes GIF animations that are stopped during user interaction on Qt and other
2096         platforms using suspendActiveDOMObjectAndAnimations.
2097
2098         * page/Frame.cpp:
2099         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
2100
2101 2013-07-29  Alex Christensen  <achristensen@apple.com>
2102
2103         Made EGL useable by non-cairo ports.
2104         https://bugs.webkit.org/show_bug.cgi?id=119177
2105
2106         Reviewed by Brent Fulgham.
2107
2108         * platform/graphics/cairo/GLContext.h:
2109         * platform/graphics/egl/GLContextEGL.cpp:
2110         (WebCore::GLContextEGL::GLContextEGL):
2111         * platform/graphics/egl/GLContextEGL.h:
2112         Protected Cairo-specific code with #if USE(CAIRO)
2113
2114 2013-07-29  Sergio Correia  <sergio.correia@openbossa.org>
2115
2116         CoordinatedGraphics: Add API to get and set the active state of a WebView
2117         https://bugs.webkit.org/show_bug.cgi?id=119067
2118
2119         Reviewed by Noam Rosenthal.
2120
2121         Added a method to return whether a scene is active or not.
2122
2123         No new tests, no behavior change.
2124
2125         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2126         (WebCore::CoordinatedGraphicsScene::isActive): Added method to return the
2127         active state of the scene.
2128
2129 2013-07-29  Mario Sanchez Prada  <mario.prada@samsung.com>
2130
2131         [ATK] Issues with edge cases when getting offsets for a text range in AtkText
2132         https://bugs.webkit.org/show_bug.cgi?id=118908
2133
2134         Reviewed by Martin Robinson.
2135
2136         Reimplement getSelectionOffsetsForObject() just in term of
2137         Positions instead of using ranges, which makes it simpler and
2138         works better. Also, make sure we use the right Node as reference
2139         for the accessibility object by getting the proper one both for
2140         text control objects (e.g. input, text area) and normal ones.
2141
2142         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2143         (getNodeForAccessibilityObject): New helper function to ensure we
2144         always get the relevant object from the DOM tree for a given
2145         accessibility object, in the context of the implementation of
2146         AtkText, so it works both with Text Controls and other elements.
2147         (getSelectionOffsetsForObject): Rewritten this function in terms
2148         of VisiblePositions and avoiding weird operations with ranges, so
2149         we have more control to fine tune the results and give more
2150         accurate ones. Besides, now it works better with edge cases.
2151
2152 2013-07-29  Zan Dobersek  <zdobersek@igalia.com>
2153
2154         Clean up DragImage
2155         https://bugs.webkit.org/show_bug.cgi?id=118981
2156
2157         Reviewed by Anders Carlsson.
2158
2159         * dom/Clipboard.h: Add forward declaration for the Range class. This was not necessary until now as the forward
2160         declaration was introduced in the DragImage header, from where it's being removed due to not being required in that class.
2161         * page/Frame.h: Ditto.
2162         * platform/DragImage.cpp: Remove the unnecessary DragController and FontRenderingMode header inclusions.
2163         The latter is already included in the header.
2164         * platform/DragImage.h: Remove the forward declaration for the Range class - it's not used by the DragImage class at all.
2165
2166 2013-07-29  Kwang Yul Seo  <skyul@company100.net>
2167
2168         [EFL] Improve string use in ErrorsEfl
2169         https://bugs.webkit.org/show_bug.cgi?id=119207
2170
2171         Reviewed by Christophe Dumez.
2172
2173         Use ASCIILiteral for constant strings becoming WTFStrings.
2174
2175         No behavior change.
2176
2177         * platform/efl/ErrorsEfl.cpp:
2178         (WebCore::cancelledError):
2179         (WebCore::blockedError):
2180         (WebCore::cannotShowURLError):
2181         (WebCore::interruptedForPolicyChangeError):
2182         (WebCore::cannotShowMIMETypeError):
2183         (WebCore::fileDoesNotExistError):
2184         (WebCore::pluginWillHandleLoadError):
2185         (WebCore::downloadCancelledByUserError):
2186         (WebCore::printerNotFoundError):
2187         (WebCore::invalidPageRangeToPrint):
2188
2189 2013-07-28  Andreas Kling  <akling@apple.com>
2190
2191         Don't update the text track override CSS every time a media element is created.
2192         <http://webkit.org/b/119199>
2193         <rdar://problem/14572855>
2194
2195         Reviewed by Darin Adler.
2196
2197         We should only have to update the CSS if the accessibility caption preferences are changed.
2198         This was forcing a full style recalc in every Document any time a media element is instantiated.
2199
2200         * page/CaptionUserPreferencesMediaAF.cpp:
2201         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
2202
2203 2013-07-28  Andy Estes  <aestes@apple.com>
2204
2205         Stop exporting Widget::frameRectsChanged()
2206         https://bugs.webkit.org/show_bug.cgi?id=119196
2207
2208         Reviewed by Darin Adler.
2209
2210         The definition is inlined in a private header, so there's no need to
2211         export a symbol to link against. On the Mac, since we compile with
2212         -fvisibility-inlines-hidden, removing the symbol from the export file
2213         silences an ld warning about exporting a hidden symbol.
2214
2215         * WebCore.exp.in: Removed __ZN7WebCore6Widget17frameRectsChangedEv.
2216
2217 2013-07-28  Sam Weinig  <sam@webkit.org>
2218
2219         Clean up CSSPrimitiveValue::equals a bit
2220         https://bugs.webkit.org/show_bug.cgi?id=119195
2221
2222         Reviewed by Andreas Kling.
2223
2224         * css/CSSPrimitiveValue.cpp:
2225         (WebCore::CSSPrimitiveValue::equals):
2226         This should not change behavior, but is quite a bit clearer.
2227
2228 2013-07-27  Ryuan Choi  <ryuan.choi@samsung.com>
2229
2230         [EFL] Bump required version of EFL to 1.7
2231         https://bugs.webkit.org/show_bug.cgi?id=119144
2232
2233         Reviewed by Christophe Dumez.
2234
2235         * platform/efl/FileSystemEfl.cpp: Removed workaround code which was fixed at Eina 1.7
2236         (WebCore::listDirectory):
2237
2238 2013-07-27  Jacky Jiang  <zhajiang@blackberry.com>
2239
2240         Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory
2241         https://bugs.webkit.org/show_bug.cgi?id=119186
2242
2243         Reviewed by Anders Carlsson.
2244
2245         Remove GraphicsLayer::create(GraphicsLayerClient*) function since it's
2246         been deprecated by r130072.
2247
2248         * WebCore.exp.in:
2249         * WebCore.order:
2250         * platform/graphics/GraphicsLayer.h:
2251         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
2252         * platform/graphics/ca/GraphicsLayerCA.cpp:
2253         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2254
2255 2013-07-27  Alexey Proskuryakov  <ap@apple.com>
2256
2257         HTMLParserScheduler gets into an inconsistent state when suspended for reasons
2258         other than WillDeferLoading
2259         https://bugs.webkit.org/show_bug.cgi?id=119172
2260
2261         Reviewed by Sam Weinig.
2262
2263         When loading is not deferred, even a suspended parser will be processing new data
2264         from network, potentially starting its next chunk timer.
2265
2266         Limit suspending to when we can actually enforce it.
2267
2268         Here is what happens for each ReasonForSuspension:
2269         - JavaScriptDebuggerPaused: continuing to parse is probably wrong, but in practice,
2270         this is unlikely to happen while debugging, and wasn't properly prevented before
2271         this patch anyway.
2272         - WillDeferLoading: No change in behavior.
2273         - DocumentWillBecomeInactive: This is about page cache, and documents are only allowed
2274         to be cached when fully loaded.
2275         - PageWillBeSuspended: This appears to be part of Frame::suspendActiveDOMObjectsAndAnimations()
2276         implementation, I'm guessing that it is appropriate to continue loading.
2277
2278         * dom/Document.cpp:
2279         (WebCore::Document::suspendScheduledTasks):
2280         (WebCore::Document::resumeScheduledTasks):
2281         Only suspend/resume parsing when loading is deferred. This is not expressed directly,
2282         but it's important to do this to avoid executing JS behind alerts and other modal dialogs.
2283
2284         * html/parser/HTMLParserScheduler.h: Added m_suspended member variable for assertions.
2285
2286         * html/parser/HTMLParserScheduler.cpp:
2287         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
2288         (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
2289         (WebCore::HTMLParserScheduler::scheduleForResume):
2290         (WebCore::HTMLParserScheduler::suspend):
2291         (WebCore::HTMLParserScheduler::resume):
2292         Update m_suspended and assert as appropriate. No behavior changes for release mode.
2293
2294         * page/Frame.cpp: (WebCore::Frame::suspendActiveDOMObjectsAndAnimations):
2295         Added a FIXME.
2296
2297 2013-07-27  Alexey Proskuryakov  <ap@apple.com>
2298
2299         Make SuspendableTimer safer
2300         https://bugs.webkit.org/show_bug.cgi?id=119127
2301
2302         Reviewed by Sam Weinig.
2303
2304         SuspendableTimer now enforces that it stays suspended until resumed (or until stopped
2305         and started again). To ensure this, TimerBase is now a private base class, and parts of
2306         its interface that clients use are reimplemented with suspend/resume in mind.
2307
2308         Derived classes are still allowed to override TimerBase virtual functions (notably
2309         fired() and alignedFireTime()).
2310
2311         * dom/DocumentEventQueue.cpp:
2312         (WebCore::DocumentEventQueueTimer): Removed an extraneous WTF_MAKE_NONCOPYABLE,
2313         TimerBase has it already.
2314         (WebCore::DocumentEventQueueTimer::create): Use our normal create() pattern.
2315         (WebCore::DocumentEventQueue::DocumentEventQueue): Made the constructor private, accordingly.
2316         (WebCore::DocumentEventQueue::cancelEvent): Use SuspendableTimer::cancel(), which
2317         is a new name to disambiguate TimerBase::stop() and ActiveDOMObject::stop().
2318         (WebCore::DocumentEventQueue::close): Ditto.
2319
2320         * page/DOMTimer.cpp:
2321         (WebCore::DOMTimer::fired): Now that SuspendableTimer knows whether it's currently
2322         suspended, assert that it's not.
2323         (WebCore::DOMTimer::didStop): Separated ActiveDOMObject::stop() implementation from
2324         additional cleanup, allowing for better SuspendableTimer encapsulation.
2325
2326         * page/DOMTimer.h: Added FINAL and OVVERIDE specifiers as appropriate.
2327
2328         * page/SuspendableTimer.h: Added FINAL (and OVERRIDE) qualifiers to ActiveDOMObject
2329         methods. A derived class that wants to override current behavior is most likely not
2330         a timer, and thus shouldn't be a derived class.
2331         (WebCore::SuspendableTimer::isActive): SuspendableTimer with a next fire time is
2332         active even if suspended, we shouldn't overwrite its saved data thinking that it's
2333         inactive.
2334         (WebCore::SuspendableTimer::isSuspended): Exposed to clients (m_suspended is no
2335         longer debug only).
2336
2337         * page/SuspendableTimer.cpp:
2338         (WebCore::SuspendableTimer::SuspendableTimer): Updated for new variable names.
2339         (WebCore::SuspendableTimer::stop): This is ActiveDOMObject::stop(), which is called
2340         before final destruction. We don't track this state directly, but can approximate
2341         with setting m_suspended, so even if someone tries to start the timer afterwards,
2342         it won't fire.
2343         (WebCore::SuspendableTimer::suspend): Updated for new names.
2344         (WebCore::SuspendableTimer::resume): Ditto.
2345         (WebCore::SuspendableTimer::didStop): No-op default implementation for client hook.
2346         (WebCore::SuspendableTimer::cancel): Equivalent of TimerBase::stop(), which also
2347         works when suspended. 
2348         (WebCore::SuspendableTimer::startRepeating): Replacement for TimerBase function with
2349         the same name, which works correctly when suspended. We don't want to actually start
2350         the timer in this case.
2351         (WebCore::SuspendableTimer::startOneShot): Ditto.
2352         (WebCore::SuspendableTimer::repeatInterval): Ditto.
2353         (WebCore::SuspendableTimer::augmentFireInterval): Ditto.
2354         (WebCore::SuspendableTimer::augmentRepeatInterval): Ditto.
2355
2356 2013-07-27  Sam Weinig  <sam@webkit.org>
2357
2358         Add assertions for CSSPrimitiveValue's m_value.valueID accessor
2359         https://bugs.webkit.org/show_bug.cgi?id=119180
2360
2361         Reviewed by Andreas Kling.
2362
2363         * css/CSSPrimitiveValueMappings.h:
2364         (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
2365         (WebCore::CSSPrimitiveValue::operator ColumnSpan):
2366         (WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
2367         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
2368         (WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
2369         (WebCore::CSSPrimitiveValue::operator CompositeOperator):
2370         (WebCore::CSSPrimitiveValue::operator ControlPart):
2371         (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
2372         (WebCore::CSSPrimitiveValue::operator EFillAttachment):
2373         (WebCore::CSSPrimitiveValue::operator EFillBox):
2374         (WebCore::CSSPrimitiveValue::operator EFillRepeat):
2375         (WebCore::CSSPrimitiveValue::operator EBoxPack):
2376         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2377         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
2378         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
2379         (WebCore::CSSPrimitiveValue::operator EBoxSizing):
2380         (WebCore::CSSPrimitiveValue::operator EBoxDirection):
2381         (WebCore::CSSPrimitiveValue::operator EBoxLines):
2382         (WebCore::CSSPrimitiveValue::operator EBoxOrient):
2383         (WebCore::CSSPrimitiveValue::operator ECaptionSide):
2384         (WebCore::CSSPrimitiveValue::operator EClear):
2385         (WebCore::CSSPrimitiveValue::operator ECursor):
2386         (WebCore::CSSPrimitiveValue::operator CursorVisibility):
2387         (WebCore::CSSPrimitiveValue::operator EDisplay):
2388         (WebCore::CSSPrimitiveValue::operator EEmptyCell):
2389         (WebCore::CSSPrimitiveValue::operator EAlignItems):
2390         (WebCore::CSSPrimitiveValue::operator EJustifyContent):
2391         (WebCore::CSSPrimitiveValue::operator EFlexDirection):
2392         (WebCore::CSSPrimitiveValue::operator EAlignContent):
2393         (WebCore::CSSPrimitiveValue::operator EFlexWrap):
2394         (WebCore::CSSPrimitiveValue::operator EFloat):
2395         (WebCore::CSSPrimitiveValue::operator LineBreak):
2396         (WebCore::CSSPrimitiveValue::operator EListStylePosition):
2397         (WebCore::CSSPrimitiveValue::operator EListStyleType):
2398         (WebCore::CSSPrimitiveValue::operator EMarginCollapse):
2399         (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
2400         (WebCore::CSSPrimitiveValue::operator RegionFragment):
2401         (WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
2402         (WebCore::CSSPrimitiveValue::operator ENBSPMode):
2403         (WebCore::CSSPrimitiveValue::operator EOverflow):
2404         (WebCore::CSSPrimitiveValue::operator EPageBreak):
2405         (WebCore::CSSPrimitiveValue::operator EPosition):
2406         (WebCore::CSSPrimitiveValue::operator EResize):
2407         (WebCore::CSSPrimitiveValue::operator ETableLayout):
2408         (WebCore::CSSPrimitiveValue::operator ETextAlign):
2409         (WebCore::CSSPrimitiveValue::operator TextAlignLast):
2410         (WebCore::CSSPrimitiveValue::operator TextJustify):
2411         (WebCore::CSSPrimitiveValue::operator TextDecoration):
2412         (WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
2413         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
2414         (WebCore::CSSPrimitiveValue::operator ETextSecurity):
2415         (WebCore::CSSPrimitiveValue::operator ETextTransform):
2416         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
2417         (WebCore::CSSPrimitiveValue::operator EUserDrag):
2418         (WebCore::CSSPrimitiveValue::operator EUserModify):
2419         (WebCore::CSSPrimitiveValue::operator EUserSelect):
2420         (WebCore::CSSPrimitiveValue::operator EVerticalAlign):
2421         (WebCore::CSSPrimitiveValue::operator EVisibility):
2422         (WebCore::CSSPrimitiveValue::operator EWhiteSpace):
2423         (WebCore::CSSPrimitiveValue::operator EWordBreak):
2424         (WebCore::CSSPrimitiveValue::operator EOverflowWrap):
2425         (WebCore::CSSPrimitiveValue::operator TextDirection):
2426         (WebCore::CSSPrimitiveValue::operator WritingMode):
2427         (WebCore::CSSPrimitiveValue::operator TextCombine):
2428         (WebCore::CSSPrimitiveValue::operator RubyPosition):
2429         (WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
2430         (WebCore::CSSPrimitiveValue::operator TextOverflow):
2431         (WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
2432         (WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
2433         (WebCore::CSSPrimitiveValue::operator TextOrientation):
2434         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
2435         (WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
2436         (WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
2437         (WebCore::CSSPrimitiveValue::operator FontWeight):
2438         (WebCore::CSSPrimitiveValue::operator FontItalic):
2439         (WebCore::CSSPrimitiveValue::operator FontSmallCaps):
2440         (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
2441         (WebCore::CSSPrimitiveValue::operator ColorSpace):
2442         (WebCore::CSSPrimitiveValue::operator Hyphens):
2443         (WebCore::CSSPrimitiveValue::operator LineSnap):
2444         (WebCore::CSSPrimitiveValue::operator LineAlign):
2445         (WebCore::CSSPrimitiveValue::operator Order):
2446         (WebCore::CSSPrimitiveValue::operator ESpeak):
2447         (WebCore::CSSPrimitiveValue::operator BlendMode):
2448         (WebCore::CSSPrimitiveValue::operator LineCap):
2449         (WebCore::CSSPrimitiveValue::operator LineJoin):
2450         (WebCore::CSSPrimitiveValue::operator WindRule):
2451         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
2452         (WebCore::CSSPrimitiveValue::operator EBorderCollapse):
2453         (WebCore::CSSPrimitiveValue::operator EBorderFit):
2454         (WebCore::CSSPrimitiveValue::operator EImageRendering):
2455         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
2456         (WebCore::CSSPrimitiveValue::operator ColumnAxis):
2457         (WebCore::CSSPrimitiveValue::operator ColumnProgression):
2458         (WebCore::CSSPrimitiveValue::operator WrapFlow):
2459         (WebCore::CSSPrimitiveValue::operator WrapThrough):
2460         (WebCore::CSSPrimitiveValue::operator GridAutoFlow):
2461         (WebCore::CSSPrimitiveValue::operator EBufferedRendering):
2462         (WebCore::CSSPrimitiveValue::operator EColorInterpolation):
2463         (WebCore::CSSPrimitiveValue::operator EColorRendering):
2464         (WebCore::CSSPrimitiveValue::operator EDominantBaseline):
2465         (WebCore::CSSPrimitiveValue::operator EShapeRendering):
2466         (WebCore::CSSPrimitiveValue::operator ETextAnchor):
2467         (WebCore::CSSPrimitiveValue::operator SVGWritingMode):
2468         (WebCore::CSSPrimitiveValue::operator EVectorEffect):
2469         (WebCore::CSSPrimitiveValue::operator EMaskType):
2470         Assert that the CSSPrimitiveValue is holding a CSSValueID before accessing it.
2471
2472 2013-07-26  Sam Weinig  <sam@webkit.org>
2473
2474         Stop pretending to support <string> for text-align.
2475         https://bugs.webkit.org/show_bug.cgi?id=119107
2476
2477         Reviewed by Andreas Kling.
2478
2479         Test: fast/css/text-align-string-crash.html
2480
2481         * css/CSSParser.cpp:
2482         (WebCore::CSSParser::parseValue):
2483         Stop pretending to support <string> for text-align.
2484
2485         * css/DeprecatedStyleBuilder.cpp:
2486         (WebCore::ApplyPropertyTextAlign::applyValue):
2487         ASSERT that only value IDs get passed.
2488
2489 2013-07-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2490
2491         Introduce toSVGRectElement(), use it
2492         https://bugs.webkit.org/show_bug.cgi?id=119126
2493
2494         Reviewed by Andreas Kling.
2495
2496         As a step to change static_cast with toSVGXXX, static_cast<SVGRectElement*> can
2497         be changed with toSVGRectElement().
2498
2499         No new tests, no behavior change.
2500
2501         * rendering/svg/RenderSVGRect.cpp:
2502         (WebCore::RenderSVGRect::updateShapeFromElement):
2503         * rendering/svg/SVGPathData.cpp:
2504         (WebCore::updatePathFromRectElement):
2505         * rendering/svg/SVGRenderTreeAsText.cpp:
2506         (WebCore::operator<<):
2507         * svg/SVGRectElement.h:
2508         (WebCore::toSVGRectElement):
2509
2510 2013-07-26  Yongjun Zhang  <yongjun_zhang@apple.com>
2511
2512         With frame flattening on, too many resize events fired if document is resized in onresize handler.
2513         https://bugs.webkit.org/show_bug.cgi?id=119075
2514
2515         Reviewed by Simon Fraser.
2516
2517         With http://trac.webkit.org/changeset/149287, WebCore also sends resize event in FrameView::setFrameRect.  When
2518         flattening an iframe, setFrameRect could be called multiple times from RenderFrameBase::layoutWithFlattening and
2519         we could get multiple resize events.  This patch adds a flag in FrameView to disallow sending resize events if
2520         we are inside layoutWithFlattening.  The resize event will be sent in performPostLayoutTasks after the iframe
2521         is done laying out.
2522
2523         Manually tested by verifying the rendering slowness in www.hi-pda.com is fixed when frame flattening is enabled.
2524
2525         * page/FrameView.cpp:
2526         (WebCore::FrameView::FrameView):
2527         (WebCore::FrameView::setFrameRect):
2528         * page/FrameView.h:
2529         (WebCore::FrameView::setResizeEventAllowed):
2530         (WebCore::FrameView::resizeEventAllowed):
2531         * rendering/RenderFrameBase.cpp:
2532         (WebCore::RenderFrameBase::layoutWithFlattening):
2533
2534 2013-07-26  Dean Jackson  <dino@apple.com>
2535
2536         Allow new transitions to run even when controller is suspended
2537         https://bugs.webkit.org/show_bug.cgi?id=119171
2538         <rdar://problem/14511404>
2539
2540         Reviewed by Simon Fraser.
2541
2542         Expose a new property on AnimationController that allows newly created
2543         animations to run even if the controller says it is suspended. See WebKit
2544         ChangeLog for more details.
2545
2546         Test: transitions/created-while-suspended.html
2547
2548         * WebCore.exp.in: Export the new methods so WebView can use them.
2549         * page/animation/AnimationController.cpp:
2550         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
2551         (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Check new flag is not true.
2552         (WebCore::AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended): Expose setter.
2553         (WebCore::AnimationController::allowsNewAnimationsWhileSuspended): "Public" getter.
2554         (WebCore::AnimationController::setAllowsNewAnimationsWhileSuspended): "Public" setter.
2555         * page/animation/AnimationController.h:
2556         * page/animation/AnimationControllerPrivate.h:
2557         (WebCore::AnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
2558         * page/animation/CompositeAnimation.cpp:
2559         (WebCore::CompositeAnimation::CompositeAnimation): Only suspend if new flag is false. Everything else
2560         relies on the m_suspended flag, so the real code change is this one line.
2561
2562 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
2563
2564         [Windows] Unreviewed build fix.
2565
2566         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2567         (WebCore::createMetadataKeyNames): Do not include Media Selection
2568         synbols when building without Media Selection API.
2569
2570 2013-07-26  Oliver Hunt  <oliver@apple.com>
2571
2572         REGRESSION(FTL?): Crashes in plugin tests
2573         https://bugs.webkit.org/show_bug.cgi?id=119141
2574
2575         Reviewed by Michael Saboff.
2576
2577         Getting the correct semantics to appease the inspector is fairly
2578         awful with the iterator system.  For the time being lets just revert
2579         to requesting a full stack trace as we did in the past. 
2580
2581         * bindings/js/ScriptCallStackFactory.cpp:
2582         (WebCore::createScriptCallStack):
2583
2584 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
2585
2586         [Windows] Unreviewed build fix.
2587
2588         Correct build when targeting a release that does not have the AVCF
2589         Legible Output infrastructure.
2590
2591         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Exclude
2592         a soft-link target when the API doesn't exist.
2593         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2594         Correct include options for non-Legible Output supporting environments.
2595         (WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
2596         Prevent build failure when building with legacy caption support.
2597
2598 2013-07-26  Andreas Kling  <akling@apple.com>
2599
2600         Apply FINAL to the RenderObject hierarchy.
2601         <http://webkit.org/b/115977>
2602
2603         Mostly from Blink r148795 by <cevans@chromium.org>
2604         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
2605
2606         * rendering/: Beat things with the FINAL stick.
2607         * WebCore.exp.in: Export a now-needed symbol.
2608
2609 2013-07-26  Tim Horton  <timothy_horton@apple.com>
2610
2611         Add a mode where autosizing fixes the FrameView height to at least the WKView height
2612         https://bugs.webkit.org/show_bug.cgi?id=119104
2613         <rdar://problem/14549021>
2614
2615         Reviewed by Anders Carlsson.
2616
2617         * WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
2618         * page/FrameView.cpp:
2619         (WebCore::FrameView::FrameView):
2620         Initialize m_autoSizeFixedMinimumHeight to 0.
2621
2622         (WebCore::FrameView::autoSizeIfEnabled):
2623         Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
2624         and do another layout. Store the computed intrinsic content size.
2625
2626         (WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.
2627
2628         * page/FrameView.h:
2629         (WebCore::FrameView::autoSizingIntrinsicContentSize): Added.
2630
2631 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
2632
2633         [Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
2634         https://bugs.webkit.org/show_bug.cgi?id=119150
2635
2636         Reviewed by Anders Carlsson.
2637
2638         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2639         (WebCore::AVFWrapper::createPlayer): Remove workaround to add legible output
2640         after player is created.
2641         (WebCore::AVFWrapper::createPlayerItem): Remove workaround to delay adding
2642         legible output until player is created.
2643         (WebCore::AVFWrapper::platformLayer): Get rid of unused temporary.
2644
2645 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
2646
2647         [Windows] Unreviewed gardening.
2648
2649         * WebCore.vcxproj/WebCore.vcxproj: Add missing header file to ease code viewing.
2650         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2651
2652 2013-07-26  Arvid Nilsson  <anilsson@rim.com>
2653
2654         [BlackBerry] LayerTiler fails to render layer after waking up
2655         https://bugs.webkit.org/show_bug.cgi?id=119146
2656
2657         Reviewed by George Staikos.
2658
2659         When the application is backgrounded, all tiles are freed up to
2660         release memory back to the system. We also mark the contents as dirty
2661         in LayerTiler::deleteTextures() so tiles will be repopulated when
2662         waking up again.
2663
2664         The problem was caused by an optimization to avoid re-rendering tiles
2665         repeatedly until the UI thread catches up with the fact that we have
2666         indeed rendered those tiles (which will happen when the UI thread next
2667         composites a frame).
2668
2669         When contents are dirty, we're not supposed to perform this
2670         optimization (i.e. we're not supposed to skip rendering) because the
2671         appearance of the layer has changed, so we do need to render those
2672         tiles. Unfortunately, the code that was supposed to forget the list of
2673         tiles rendered was in a conditional, "if (frontVisibility)", which
2674         happened to be false sometimes when the app woke up again. So we ended
2675         up perpetually skipping those render jobs, and the UI thread kept
2676         yelling at us to render them.
2677
2678         Fixed by unconditionally dropping the list of tiles rendered when
2679         contents are dirty.
2680
2681         This can't be detected without pixel tests, which BB DRT currently
2682         doesn't support.
2683
2684         JIRA 452460
2685
2686         * platform/graphics/blackberry/LayerTiler.cpp:
2687         (WebCore::LayerVisibility::clearTilesRendered):
2688         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2689
2690 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2691
2692         Remove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
2693         https://bugs.webkit.org/show_bug.cgi?id=119121
2694
2695         Reviewed by Andreas Kling.
2696
2697         Merge https://chromium.googlesource.com/chromium/blink/+/3255ce725711707fe1fd18be91a6d06789517220.
2698
2699         * html/HTMLTextFormControlElement.cpp:
2700         * html/HTMLTextFormControlElement.h:
2701
2702 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2703
2704         Fix document leak when selection is created inside the document
2705         https://bugs.webkit.org/show_bug.cgi?id=119122
2706
2707         Reviewed by Andreas Kling.
2708
2709         Merge https://chromium.googlesource.com/chromium/blink/+/b908cb4c8da93316d787de31c93f2a43de332a10
2710
2711         The bug was caused by FrameSelection::m_previousCaretNode holding onto a Node, leaking its document.
2712         Fixed the bug by explicitly clearing it in FrameSelection::prepareForDestruction.
2713
2714         Test: editing/selection/leak-document-with-selection-inside.html
2715
2716         * editing/FrameSelection.cpp:
2717         (WebCore::FrameSelection::prepareForDestruction):
2718
2719 2013-07-25  Andreas Kling  <akling@apple.com>
2720
2721         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
2722         <http://webkit.org/b/119110>
2723
2724         Reviewed by Anders Carlsson.
2725
2726         Because only Elements can be focused.
2727
2728         * dom/Document.cpp:
2729         (WebCore::Document::setFocusedElement):
2730         * loader/EmptyClients.h:
2731         (WebCore::EmptyChromeClient::focusedElementChanged):
2732         * page/Chrome.cpp:
2733         (WebCore::Chrome::focusedElementChanged):
2734         * page/Chrome.h:
2735         * page/ChromeClient.h:
2736
2737 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
2738
2739         [WK2][Soup] Add private browsing support
2740         https://bugs.webkit.org/show_bug.cgi?id=118657
2741
2742         Reviewed by Gustavo Noronha Silva.
2743
2744         Support private browsing by adding a method to create a private
2745         browsing soup session. This private browsing session uses a
2746         non-persistent cookie jar and does not use the disk cache feature.
2747
2748         No new tests. Covered by existing private browsing tests.
2749
2750         * platform/network/NetworkStorageSession.h:
2751         (WebCore::NetworkStorageSession::isPrivateBrowsingSession):
2752         Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.
2753
2754         * platform/network/ResourceHandle.h:
2755         Add a factory method to create a private browsing session for soup.
2756
2757         * platform/network/soup/CookieJarSoup.cpp:
2758         (WebCore::createPrivateBrowsingCookieJar):
2759         * platform/network/soup/CookieJarSoup.h:
2760         Add a method to create a non-persistent cookie jar for private browsing.
2761
2762         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2763         (WebCore::NetworkStorageSession::NetworkStorageSession):
2764         Initialize m_isPrivate to false.
2765         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2766         Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.
2767
2768         * platform/network/soup/ResourceHandleSoup.cpp:
2769         (WebCore::createSoupSession):
2770         Extract common soup session creation code so that both defaultSession
2771         and createPrivateBrowsingSession can use this function to create a soup
2772         session.
2773         (WebCore::ResourceHandle::defaultSession):
2774         Change to use createSoupSession.
2775         (WebCore::ResourceHandle::createPrivateBrowsingSession):
2776         Create a session which uses a non-persistent cookie jar.
2777
2778 2013-07-25  Tim Horton  <timothy_horton@apple.com>
2779
2780         Null check m_frame in maximum and minimumScrollPosition
2781         https://bugs.webkit.org/show_bug.cgi?id=119109
2782         <rdar://problem/14545393>
2783
2784         Reviewed by Darin Adler.
2785
2786         * page/FrameView.cpp:
2787         (WebCore::FrameView::minimumScrollPosition):
2788         (WebCore::FrameView::maximumScrollPosition):
2789         Null-check m_frame (and move the early-return after the clamp-to-0
2790         as the revert in r152911 should have).
2791
2792 2013-07-25  Anders Carlsson  <andersca@apple.com>
2793
2794         Localizable.strings generated by extract-localizable-strings should be UTF-8
2795         https://bugs.webkit.org/show_bug.cgi?id=119106
2796
2797         Reviewed by Mark Rowe.
2798
2799         * English.lproj/Localizable.strings:
2800         Re-encode this as UTF-8 and remove the BOM.
2801
2802         * WebCore.xcodeproj/project.pbxproj:
2803         Set the file encoding of Localizable.strings to UTF-8.
2804
2805 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2806
2807         Don't force layout when querying a fixed or non-box margin/padding property
2808         https://bugs.webkit.org/show_bug.cgi?id=118032
2809
2810         Reviewed by David Hyatt.
2811
2812         Merge https://chromium.googlesource.com/chromium/blink/+/66427d0825fcc2975bd50220cdcaa2504d6f36e5.
2813
2814         This patch avoids layout in ComputedStyleExtractor::propertyValue for margin and padding properties
2815         when they are of fixed length. According to the Blink patch's author, this improves the page load
2816         time of economist.com by 27%.
2817
2818         The actual code change is significantly different from the original Blink patch since we've done
2819         some refactorins in r152938 and r153067 to make this change more self-contained.
2820
2821         Test: fast/css/computed-width-without-renderer.html
2822
2823         * css/CSSComputedStyleDeclaration.cpp:
2824         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
2825         (WebCore::paddingOrMarginIsRendererDependent):
2826         (WebCore::isLayoutDependent):
2827         (WebCore::ComputedStyleExtractor::propertyValue):
2828
2829 2013-07-25  Sam Weinig  <sam@webkit.org>
2830
2831         -[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
2832         https://bugs.webkit.org/show_bug.cgi?id=119099
2833         <rdar://problem/13439291>
2834
2835         Reviewed by Enrica Casucci.
2836
2837         Tests:
2838             API Test: AttributedStringTest_Strikethrough
2839
2840         * platform/mac/HTMLConverter.mm:
2841         (+[WebHTMLConverter editingAttributedStringFromRange:]):
2842         Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.
2843
2844 2013-07-25  Pratik Solanki  <psolanki@apple.com>
2845
2846         Unreviewed build fix after r153333.
2847
2848         * platform/network/cf/ResourceResponseCFNet.cpp: Remove toTimeT since it is no longer called.
2849
2850 2013-07-25  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2851
2852         Unreviewed EFL build fix after r153315.
2853
2854         Fix build error after we started compiling with c++0x support
2855         in r153315.
2856
2857         * platform/efl/RenderThemeEfl.cpp:
2858         (WebCore::toEdjeGroup):
2859
2860 2013-07-25  Anders Carlsson  <andersca@apple.com>
2861
2862         Remove lastModifiedDate from ResourceResponse
2863         https://bugs.webkit.org/show_bug.cgi?id=119092
2864
2865         Reviewed by Andreas Kling.
2866
2867         Computing m_lastResponseDate is costly on some platforms and we already have a better way to
2868         get the last response time, so convert the two call sites that used to call ResourceresponseBase::lastModifiedDate()
2869         over to using lastModified() instead.
2870
2871         * platform/network/ResourceResponseBase.cpp:
2872         (WebCore::ResourceResponseBase::ResourceResponseBase):
2873         (WebCore::ResourceResponseBase::adopt):
2874         (WebCore::ResourceResponseBase::copyData):
2875         * platform/network/ResourceResponseBase.h:
2876         * platform/network/cf/ResourceResponseCFNet.cpp:
2877         (WebCore::ResourceResponse::platformLazyInit):
2878         * plugins/PluginStream.cpp:
2879         (WebCore::lastModifiedDate):
2880         (WebCore::PluginStream::startStream):
2881
2882 2013-07-25  Yi Shen  <max.hong.shen@gmail.com>
2883
2884         Optimize the thread locks for API Shims
2885         https://bugs.webkit.org/show_bug.cgi?id=118573
2886
2887         Reviewed by Geoffrey Garen.
2888
2889         Remove the thread lock from API Shims if the VM has an exclusive thread (e.g. the VM 
2890         only used by WebCore's main thread).
2891
2892         No new tests required since no functionality changed.
2893
2894         * bindings/js/JSDOMWindowBase.cpp:
2895         (WebCore::JSDOMWindowBase::commonVM):
2896
2897 2013-07-25  Bear Travis  <betravis@adobe.com>
2898
2899         [CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag
2900         https://bugs.webkit.org/show_bug.cgi?id=117277
2901
2902         Reviewed by Alexandru Chiculita.
2903
2904         This patch adds some compile guards that were missing from the RenderStyle and
2905         StyleRareNonInheritedData files. When the compile guard caused parameters to
2906         not be used, the parameters were marked using UNUSED_PARAM.
2907
2908         * css/CSSPropertyNames.in: Inserting a line to trigger build.
2909         * rendering/RenderBlock.cpp:
2910         (WebCore::shapeInfoRequiresRelayout):
2911         (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
2912         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
2913         * rendering/RenderBox.cpp:
2914         (WebCore::isCandidateForOpaquenessTest):
2915         * rendering/RenderBox.h:
2916         * rendering/RenderObject.h:
2917         * rendering/style/RenderStyle.cpp:
2918         (WebCore::RenderStyle::changeRequiresLayout):
2919         (WebCore::RenderStyle::changeRequiresRepaint):
2920         * rendering/style/RenderStyle.h:
2921         * rendering/style/StyleRareNonInheritedData.cpp:
2922         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2923         (WebCore::StyleRareNonInheritedData::operator==):
2924         * rendering/style/StyleRareNonInheritedData.h:
2925
2926 2013-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2927
2928         Introduce toSVGPatternElement(), use it
2929         https://bugs.webkit.org/show_bug.cgi?id=119013
2930
2931         Reviewed by Andreas Kling.
2932
2933         As a step to change static_cast with toSVGXXX, static_cast<SVGPatternElement*> can
2934         be changed with toSVGPatternElement().
2935
2936         Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154734
2937
2938         * rendering/svg/RenderSVGResourcePattern.cpp:
2939         (WebCore::RenderSVGResourcePattern::buildPattern):
2940         * rendering/svg/SVGRenderTreeAsText.cpp:
2941         (WebCore::writeSVGResourceContainer):
2942         * rendering/svg/SVGResources.cpp:
2943         (WebCore::targetReferenceFromResource):
2944         * svg/SVGPatternElement.h:
2945         (WebCore::toSVGPatternElement):
2946
2947 2013-06-21  Mark Lam  <mark.lam@apple.com>
2948
2949         Fixed broken build: updated to match SmallStrings changes in r151864.
2950
2951         Not reviewed.
2952
2953         No new tests.
2954
2955         * bindings/js/JSDOMBinding.h:
2956         (WebCore::jsStringWithCache):
2957
2958 2013-06-15  Filip Pizlo  <fpizlo@apple.com>
2959
2960         Concurrent JIT shouldn't try to recompute the CodeBlockHash as part of debug dumps, since doing so may fail if dealing with a CachedScript that doesn't have its script string handy
2961         https://bugs.webkit.org/show_bug.cgi?id=117676
2962
2963         Reviewed by Sam Weinig.
2964
2965         Remove the broken hack for the concurrent JIT, since now the concurrent JIT won't use this code anymore.
2966
2967         No new tests because no new behavior.
2968
2969         * loader/cache/CachedScript.cpp:
2970         (WebCore::CachedScript::script):
2971
2972 2013-06-10  Mark Lam  <mark.lam@apple.com>
2973
2974         Introducing the StackIterator class.
2975         https://bugs.webkit.org/show_bug.cgi?id=117390.
2976
2977         Reviewed by Geoffrey Garen.
2978
2979         No new tests.
2980
2981         * ForwardingHeaders/interpreter/StackIterator.h: Added.
2982         * bindings/js/JSXMLHttpRequestCustom.cpp:
2983         (WebCore::JSXMLHttpRequest::send):
2984         * bindings/js/ScriptCallStackFactory.cpp:
2985         (WebCore::createScriptCallStack):
2986
2987 2013-06-09  Filip Pizlo  <fpizlo@apple.com>
2988
2989         Unreviewed, fix build. Use at() instead of operator[] because of ambiguity on some compilers.
2990
2991         * page/CaptionUserPreferencesMac.mm:
2992         (WebCore::languageIdentifier):
2993
2994 2013-05-27  Filip Pizlo  <fpizlo@apple.com>
2995
2996         testRunner should be able to tell you if a function is DFG compiled
2997         https://bugs.webkit.org/show_bug.cgi?id=116847
2998
2999         Reviewed by Mark Hahnenberg.
3000
3001         Bail early if we're in the compilation thread. This is only relevant for
3002         debug dumps.
3003
3004         No new tests becase no new behavior.
3005
3006         * loader/cache/CachedScript.cpp:
3007         (WebCore::CachedScript::script):
3008
3009 2013-05-25  Mark Lam  <mark.lam@apple.com>
3010
3011         Remove Interpreter::retrieveLastCaller().
3012         https://bugs.webkit.org/show_bug.cgi?id=116753.
3013
3014         Reviewed by Geoffrey Garen.
3015
3016         This is part of the refactoring effort to get rid of functions walking
3017         the JS stack in their own way.
3018
3019         No new tests.
3020
3021         * bindings/js/JSXMLHttpRequestCustom.cpp:
3022         (WebCore::JSXMLHttpRequest::send):
3023         * bindings/js/ScriptCallStackFactory.cpp:
3024         (WebCore::createScriptCallStack):
3025
3026 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
3027
3028         Rolled back in r149527 with crash fixed.
3029
3030         Reviewed by Oliver Hunt.
3031
3032             Rationalized 'this' value conversion
3033             https://bugs.webkit.org/show_bug.cgi?id=115542
3034
3035 2013-04-29  Filip Pizlo  <fpizlo@apple.com>
3036
3037         fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
3038         https://bugs.webkit.org/show_bug.cgi?id=115393
3039
3040         Reviewed by Geoffrey Garen.
3041
3042         No new tests because no new behavior.
3043
3044         * Modules/websockets/WebSocket.cpp:
3045         (WebCore::WebSocket::close):
3046         * Modules/websockets/WebSocketChannel.cpp:
3047         (WebCore::WebSocketChannel::send):
3048         * html/MediaFragmentURIParser.cpp:
3049         (WebCore::MediaFragmentURIParser::parseFragments):
3050
3051 2013-07-24  Simon Fraser  <simon.fraser@apple.com>
3052
3053         [iOS] Captions are clipped in documents using pagination
3054         https://bugs.webkit.org/show_bug.cgi?id=119072
3055
3056         Reviewed by Beth Dakin.
3057
3058         MediaControlTextTrackContainerElement::createTextTrackRepresentationImage() is called
3059         to paint captions into a layer used for fullscreen video. It did the painting using
3060         a subtree paint, but starting at the root RenderView's layer. This is problematic,
3061         because the caption painting is subject to clipping for columns, and any enclosing
3062         overflow:hidden container.
3063         
3064         Fix this by starting the paint at the MediaControlTextTrackContainerElement's
3065         renderer's layer. By doing this we don't have to worry about an offset, so no
3066         translation is required.
3067         
3068         Also make sure we update layer before grabbing the renderer (in case layout
3069         destroys it).
3070
3071         * html/shadow/MediaControlElements.cpp:
3072         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
3073
3074 2013-07-24  Simon Fraser  <simon.fraser@apple.com>
3075
3076         REGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
3077         https://bugs.webkit.org/show_bug.cgi?id=119066
3078         <rdar://problem/14499184>
3079
3080         Reviewed by Daniel Bates.
3081
3082         Following <http://trac.webkit.org/changeset/152335> (bug #118337) we set
3083         the z-index to 0 on every element with CSS "overflow: scroll" and
3084         "-webkit-overflow-scrolling: touch" regardless of whether the element has
3085         non-auto z-index. Instead we should only set the z-index to 0 for such elements
3086         that have an auto z-index.
3087
3088         * css/StyleResolver.cpp:
3089         (WebCore::StyleResolver::adjustRenderStyle):
3090
3091 2013-07-24  Ryosuke Niwa  <rniwa@webkit.org>
3092
3093         Use-after-free in ApplyStyleCommand::removeInlineStyle
3094         https://bugs.webkit.org/show_bug.cgi?id=118627
3095
3096         Reviewed by Oliver Hunt.
3097         
3098         Merge https://chromium.googlesource.com/chromium/blink/+/b6471d077e012b05ccba14d0ce8e6d616106c8e6
3099
3100         Unfortunately, there is no test case for this bug.
3101
3102         * editing/ApplyStyleCommand.cpp:
3103         (WebCore::ApplyStyleCommand::removeInlineStyle):
3104
3105 2013-07-24  Zan Dobersek  <zdobersek@igalia.com>
3106
3107         Remove CheckedInt, use Checked<T, RecordOverflow> instead
3108         https://bugs.webkit.org/show_bug.cgi?id=119022
3109
3110         Reviewed by Oliver Hunt.
3111
3112         Following the cleanup in r153062, the CheckedInt uses are replaced with
3113         using the Checked<T, RecordOverflow> class. The CheckedInt header is not
3114         used anywhere anymore and is thus removed.
3115
3116         * GNUmakefile.list.am:
3117         * WebCore.xcodeproj/project.pbxproj:
3118         * html/canvas/CheckedInt.h: Removed.
3119         * html/canvas/DataView.cpp:
3120         (WebCore::DataView::create):
3121         * html/canvas/WebGLBuffer.cpp:
3122         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
3123         * html/canvas/WebGLRenderingContext.cpp:
3124         (WebCore::WebGLRenderingContext::drawArrays):
3125
3126 2013-07-24  Andreas Kling  <akling@apple.com>
3127
3128         RenderMenuList computes the width of its longest option twice.
3129         <http://webkit.org/b/119046>
3130         <rdar://problem/14534679>
3131
3132         Reviewed by Darin Adler.
3133
3134         Rename the RenderMenuList::m_optionsChanged flag to m_needsOptionsWidthUpdate,
3135         and make sure it gets cleared after we do a width computation in response to font changes.
3136
3137         * rendering/RenderMenuList.cpp:
3138         (WebCore::RenderMenuList::styleDidChange):
3139
3140 2013-07-24  Zan Dobersek  <zdobersek@igalia.com>
3141
3142         Make KURL::hasPath private
3143         https://bugs.webkit.org/show_bug.cgi?id=118279
3144
3145         Reviewed by Darin Adler.
3146
3147         * platform/KURL.h: The KURL::hasPath method is not used outside of the KURL class, so it is made private.
3148
3149 2013-07-24  Jessie Berlin  <jberlin@apple.com>
3150
3151         Remove WKPageGetPlugInInformation - it is not used anymore
3152         https://bugs.webkit.org/show_bug.cgi?id=119047
3153
3154         Rubber-stamped by Alexey Proskuryakov.
3155
3156         Revert r152328, which added a key used only in the callback info for
3157         WKPageGetPlugInInformation.
3158
3159         * WebCore.exp.in:
3160
3161 2013-07-24  Robert Hogan  <robert@webkit.org>
3162
3163         Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
3164         https://bugs.webkit.org/show_bug.cgi?id=18305
3165
3166         Reviewed by David Hyatt.
3167
3168         overflowClipRect() clips out the table's half of a collapsed border when there is an overflow clip
3169         on the table. This prevents the table's half of the border ever getting painted. 
3170
3171         To fix this, clip to the border box of tables when we're in the paint phase that gets the sections to draw the collapsed borders
3172         or when we're self painting. This will allow the table's half of the border to get painted. In the case where the table is self
3173         painting we ensure that content gets clipped to cell's side of the collapsed border by ensuring the clip passed to child layers
3174         from the table clips to the inside of the collapsed border. 
3175
3176         It's worth noting that a table's collapsed borders are painted by the table's layer using functions in 
3177         RenderTableSection and RenderTableCell. So if a table section has a self-painting layer this patch still works, because
3178         the borders aren't painted by the section's layer.
3179
3180         Tests: fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html
3181                fast/table/overflow-table-collapsed-borders-cell-painting.html
3182                fast/table/overflow-table-collapsed-borders-section-layer-painting.html
3183                fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html
3184                fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html
3185                fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
3186                fast/table/table-overflow.html
3187
3188         * rendering/RenderBox.cpp:
3189         (WebCore::RenderBox::pushContentsClip):
3190         (WebCore::RenderBox::overflowClipRect):
3191         * rendering/RenderBox.h:
3192         (WebCore::RenderBox::overflowClipRectForChildLayers):
3193         * rendering/RenderLayer.cpp:
3194         (WebCore::RenderLayer::calculateClipRects):
3195         * rendering/RenderTable.cpp:
3196         (WebCore::RenderTable::overflowClipRect):
3197         * rendering/RenderTable.h:
3198         (WebCore::RenderTable::overflowClipRectForChildLayers):
3199
3200 2013-07-24  Frédéric Wang  <fred.wang@free.fr>
3201
3202         Graphical elements inside mphantom should not be visible.
3203         https://bugs.webkit.org/show_bug.cgi?id=116600.
3204
3205         Reviewed by Chris Fleizach.
3206
3207         Test: mathml/presentation/phantom.html
3208
3209         * rendering/mathml/RenderMathMLFraction.cpp:
3210         (WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
3211         * rendering/mathml/RenderMathMLRoot.cpp:
3212         (WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"
3213
3214 2013-07-24  Brendan Long  <b.long@cablelabs.com>
3215
3216         WebVTTParser's identifier buffering can ignore subsequent lines
3217         https://bugs.webkit.org/show_bug.cgi?id=118483
3218
3219         Reviewed by Eric Carlson.
3220
3221         No new tests since this bug can't be reproduced in layout tests.
3222
3223         * html/track/WebVTTParser.cpp:
3224         (WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.
3225
3226 2013-07-23  Andreas Kling  <akling@apple.com>
3227
3228         REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
3229         <rdar://problem/14324895>
3230         <http://webkit.org/b/119023>
3231
3232         Reviewed by Simon Fraser.
3233
3234         The bug happened when FrameView::autoSizeIfEnabled() was getting called below FrameLoader::checkCompleted()
3235         triggered by an incorrect loadDone() callback originating in SubresourceLoader::didCancel().
3236
3237         * css/StyleResolver.cpp:
3238         (WebCore::StyleResolver::loadPendingResources):
3239
3240             Add an assertion that this function is not getting re-entered. If a similar bug occurs
3241             in the future, this will help the lucky person debugging.
3242
3243         * loader/SubresourceLoader.cpp:
3244         (WebCore::SubresourceLoader::didCancel):
3245
3246             Don't notifyDone() if the SubresourceLoader is in Uninitialized state.
3247
3248 2013-07-23  Tim Horton  <timothy_horton@apple.com>
3249
3250         Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
3251         https://bugs.webkit.org/show_bug.cgi?id=119024
3252         <rdar://problem/14523331>
3253
3254         Reviewed by Anders Carlsson.
3255
3256         * rendering/RenderEmbeddedObject.cpp:
3257         (WebCore::addReplacementArrowPath):
3258         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
3259         Pixel-snap the unavailable plugin indicator arrow. Snapping directions
3260         were chosen by eye/symmetry to look best on 1x and 2x devices at
3261         1x and 2x page scale.
3262
3263 2013-07-19  Ryosuke Niwa  <rniwa@webkit.org>
3264
3265         The computed values of fix length padding should be subpixel precision like margin
3266         https://bugs.webkit.org/show_bug.cgi?id=118936
3267
3268         Reviewed by Simon Fraser.
3269
3270         The bug was caused by ComputedStyleExtractor::propertyValue always returning the used value
3271         for padding. Fixed the bug by returning the computed value when they're of fixed length.
3272
3273         This aligns the behaviors of getComputedStyle(~).padding~ with getComputedStyle(~).margin~,
3274         which had been fixed in r102149. While the current CSSOM specification says getComputedStyle
3275         should return the used values for margins when display property is set to anything but none,
3276         new behavior matches that of Chrome, Firefox, and Internet Explorer.
3277
3278         Also extracted zoomAdjustedPaddingOrMarginPixelValue to reduce the code duplication.
3279
3280         Test: fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html
3281
3282         * css/CSSComputedStyleDeclaration.cpp:
3283         (WebCore::zoomAdjustedPaddingOrMarginPixelValue): Extracted.
3284         (WebCore::ComputedStyleExtractor::propertyValue):
3285
3286 2013-07-23  Alex Christensen  <achristensen@apple.com>
3287
3288         Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
3289         https://bugs.webkit.org/show_bug.cgi?id=118550
3290
3291         Reviewed by Dean Jackson.
3292
3293         * CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
3294
3295 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3296
3297         Use Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
3298         https://bugs.webkit.org/show_bug.cgi?id=118988
3299
3300         Reviewed by Oliver Hunt.
3301
3302         Use the WTF's Checked class, with uint32_t as the numeric type and RecordOverflow as the overflow handler,
3303         instead of the CheckedInt class. This removes a layering violation that's occurring due to including the CheckedInt
3304         header that's currently located in the WebCore layer (alongside the HTML canvas code in Source/WebCore/html/canvas).
3305
3306         * platform/graphics/GraphicsContext3D.cpp:
3307         (WebCore::GraphicsContext3D::computeImageSizeInBytes):
3308
3309 2013-07-23  Zalan Bujtas  <zalan@apple.com>
3310
3311         REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
3312         https://bugs.webkit.org/show_bug.cgi?id=118435
3313
3314         Reviewed by David Hyatt.
3315
3316         When we find an empty inline in the middle of the word, prefer breaking it before 
3317         instead of after to match other browsers' rendering.
3318
3319         Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
3320
3321         * rendering/RenderBlockLineLayout.cpp:
3322         (WebCore::canBreakAtThisPosition):
3323
3324 2013-07-23  Alexey Proskuryakov  <ap@apple.com>
3325
3326         Dictionary hotkey does not work on vertical text
3327         https://bugs.webkit.org/show_bug.cgi?id=118993
3328         <rdar://problem/14478260>
3329
3330         Reviewed by Enrica Casucci.
3331
3332         Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html
3333
3334         * editing/Editor.cpp:
3335         (WebCore::collapseCaretWidth): A helper function.
3336         (WebCore::Editor::firstRectForRange): Many changes:
3337         - use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
3338         that's more direct that getting caret rects and computing bounding rect from those.
3339         - handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
3340         doesn't provide the needed result, and because it can be done faster.
3341         - wherever we use carets to compute the result, account for vertical text (in a hackish
3342         way, as we don't have layout information at Editor level).
3343
3344         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
3345         dead code.
3346
3347 2013-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
3348
3349         [CSS Shapes] New positioning model: Borders
3350         https://bugs.webkit.org/show_bug.cgi?id=118822
3351
3352         Reviewed by Dean Jackson.
3353
3354         Converting to the shape coordinate system was not properly accounting
3355         for borders and padding. This has been fixed and a new convienence
3356         method added because of the added complexity of the conversion.
3357
3358         Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
3359
3360         * rendering/RenderBlock.cpp:
3361         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
3362             computeSegmentsForContainingBlockLine to do the coordinate
3363             conversion.
3364         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
3365         * rendering/RenderBlockLineLayout.cpp:
3366         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
3367         * rendering/shapes/ShapeOutsideInfo.cpp:
3368         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
3369             Add new method to do the coordinate conversion from the containing
3370             block coordinate system to the coordinate system of the shape so
3371             that the segments can be correctly calculated.
3372
3373 2013-07-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3374
3375         Remove deprecated and unused compositing settings
3376         https://bugs.webkit.org/show_bug.cgi?id=119014
3377
3378         Reviewed by Andreas Kling.
3379
3380         * page/Settings.in:
3381
3382 2013-07-23  Tim Horton  <timothy_horton@apple.com>
3383
3384         Add a test for plug-in unavailability indicator obscurity detection
3385         https://bugs.webkit.org/show_bug.cgi?id=119007
3386
3387         Reviewed by Anders Carlsson.
3388
3389         Test: plugins/unavailable-plugin-indicator-obscurity.html
3390
3391         Expose the ability to test whether the unavailable plugin indicator
3392         is obscured via the internals object.
3393
3394         * testing/Internals.cpp:
3395         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
3396         * testing/Internals.h:
3397         * testing/Internals.idl:
3398         Expose RenderEmbeddedObject::isReplacementObscured as
3399         internals.isPluginUnavailabilityIndicatorObscured for testing purposes.
3400
3401 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3402
3403         [Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
3404         https://bugs.webkit.org/show_bug.cgi?id=118984
3405
3406         Reviewed by Darin Adler.
3407
3408         Execute a minor cleanup of the header inclusions in Soup-specific ResourceRequestSoup.cpp, ResourceRequest.h
3409         and SocketStreamHandle.h source files. The inclusions are sorted into proper order, with blank lines and unnecessary
3410         reinclusions removed.
3411
3412         * platform/network/soup/ResourceRequest.h:
3413         * platform/network/soup/ResourceRequestSoup.cpp:
3414         * platform/network/soup/SocketStreamHandle.h:
3415
3416 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3417
3418         [Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
3419         https://bugs.webkit.org/show_bug.cgi?id=118983
3420
3421         Reviewed by Martin Robinson.
3422
3423         Remove inclusions of the CachedResourceLoader, ChromeClient, Frame and Page headers. These are not
3424         necessary (anymore) and only prevent the source file to be built independently of WebCore, as it should be.
3425
3426         * platform/network/soup/ResourceHandleSoup.cpp:
3427
3428 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3429
3430         Remove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenGLCommon.cpp
3431         https://bugs.webkit.org/show_bug.cgi?id=118989
3432
3433         Reviewed by Darin Adler.
3434
3435         * platform/graphics/GraphicsContext3D.cpp: Remove the unnecessary DrawingBuffer header inclusion.
3436         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Remove the unnecessary
3437         CanvasRenderingContext and WebGLObject header inclusions.
3438
3439 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3440
3441         Remove the topDocumentURL member of the GraphicsContext3D::Attributes struct
3442         https://bugs.webkit.org/show_bug.cgi?id=118987
3443
3444         Reviewed by Darin Adler.
3445
3446         Remove the topDocumentURL member that currently resides in the GraphicsContext3D::Attributes struct.
3447         It's not used anywhere and only has one place where it is set, in WebGLRenderingContext::create.
3448
3449         * html/canvas/WebGLRenderingContext.cpp:
3450         (WebCore::WebGLRenderingContext::create):
3451         * platform/graphics/GraphicsContext3D.h:
3452
3453 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
3454
3455         Remove unused DrawingBuffer::paintRenderingResultsToImageData
3456         https://bugs.webkit.org/show_bug.cgi?id=118986
3457
3458         Reviewed by Darin Adler.
3459
3460         Remove the paintRenderingResultsToImageData method of the DrawingBuffer class. It is not used anywhere
3461         and also introduces a nasty layering violation by including and operating with the ImageData class.
3462
3463         * platform/graphics/gpu/DrawingBuffer.cpp:
3464         *&n