Apply FINAL to the RenderObject hierarchy.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-07-26  Andreas Kling  <akling@apple.com>
2
3         Apply FINAL to the RenderObject hierarchy.
4         <http://webkit.org/b/115977>
5
6         Mostly from Blink r148795 by <cevans@chromium.org>
7         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
8
9         * rendering/: Beat things with the FINAL stick.
10         * WebCore.exp.in: Export a now-needed symbol.
11
12 2013-07-26  Tim Horton  <timothy_horton@apple.com>
13
14         Add a mode where autosizing fixes the FrameView height to at least the WKView height
15         https://bugs.webkit.org/show_bug.cgi?id=119104
16         <rdar://problem/14549021>
17
18         Reviewed by Anders Carlsson.
19
20         * WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
21         * page/FrameView.cpp:
22         (WebCore::FrameView::FrameView):
23         Initialize m_autoSizeFixedMinimumHeight to 0.
24
25         (WebCore::FrameView::autoSizeIfEnabled):
26         Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
27         and do another layout. Store the computed intrinsic content size.
28
29         (WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.
30
31         * page/FrameView.h:
32         (WebCore::FrameView::autoSizingIntrinsicContentSize): Added.
33
34 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
35
36         [Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
37         https://bugs.webkit.org/show_bug.cgi?id=119150
38
39         Reviewed by Anders Carlsson.
40
41         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
42         (WebCore::AVFWrapper::createPlayer): Remove workaround to add legible output
43         after player is created.
44         (WebCore::AVFWrapper::createPlayerItem): Remove workaround to delay adding
45         legible output until player is created.
46         (WebCore::AVFWrapper::platformLayer): Get rid of unused temporary.
47
48 2013-07-26  Brent Fulgham  <bfulgham@apple.com>
49
50         [Windows] Unreviewed gardening.
51
52         * WebCore.vcxproj/WebCore.vcxproj: Add missing header file to ease code viewing.
53         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
54
55 2013-07-26  Arvid Nilsson  <anilsson@rim.com>
56
57         [BlackBerry] LayerTiler fails to render layer after waking up
58         https://bugs.webkit.org/show_bug.cgi?id=119146
59
60         Reviewed by George Staikos.
61
62         When the application is backgrounded, all tiles are freed up to
63         release memory back to the system. We also mark the contents as dirty
64         in LayerTiler::deleteTextures() so tiles will be repopulated when
65         waking up again.
66
67         The problem was caused by an optimization to avoid re-rendering tiles
68         repeatedly until the UI thread catches up with the fact that we have
69         indeed rendered those tiles (which will happen when the UI thread next
70         composites a frame).
71
72         When contents are dirty, we're not supposed to perform this
73         optimization (i.e. we're not supposed to skip rendering) because the
74         appearance of the layer has changed, so we do need to render those
75         tiles. Unfortunately, the code that was supposed to forget the list of
76         tiles rendered was in a conditional, "if (frontVisibility)", which
77         happened to be false sometimes when the app woke up again. So we ended
78         up perpetually skipping those render jobs, and the UI thread kept
79         yelling at us to render them.
80
81         Fixed by unconditionally dropping the list of tiles rendered when
82         contents are dirty.
83
84         This can't be detected without pixel tests, which BB DRT currently
85         doesn't support.
86
87         JIRA 452460
88
89         * platform/graphics/blackberry/LayerTiler.cpp:
90         (WebCore::LayerVisibility::clearTilesRendered):
91         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
92
93 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
94
95         Remove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
96         https://bugs.webkit.org/show_bug.cgi?id=119121
97
98         Reviewed by Andreas Kling.
99
100         Merge https://chromium.googlesource.com/chromium/blink/+/3255ce725711707fe1fd18be91a6d06789517220.
101
102         * html/HTMLTextFormControlElement.cpp:
103         * html/HTMLTextFormControlElement.h:
104
105 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
106
107         Fix document leak when selection is created inside the document
108         https://bugs.webkit.org/show_bug.cgi?id=119122
109
110         Reviewed by Andreas Kling.
111
112         Merge https://chromium.googlesource.com/chromium/blink/+/b908cb4c8da93316d787de31c93f2a43de332a10
113
114         The bug was caused by FrameSelection::m_previousCaretNode holding onto a Node, leaking its document.
115         Fixed the bug by explicitly clearing it in FrameSelection::prepareForDestruction.
116
117         Test: editing/selection/leak-document-with-selection-inside.html
118
119         * editing/FrameSelection.cpp:
120         (WebCore::FrameSelection::prepareForDestruction):
121
122 2013-07-25  Andreas Kling  <akling@apple.com>
123
124         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
125         <http://webkit.org/b/119110>
126
127         Reviewed by Anders Carlsson.
128
129         Because only Elements can be focused.
130
131         * dom/Document.cpp:
132         (WebCore::Document::setFocusedElement):
133         * loader/EmptyClients.h:
134         (WebCore::EmptyChromeClient::focusedElementChanged):
135         * page/Chrome.cpp:
136         (WebCore::Chrome::focusedElementChanged):
137         * page/Chrome.h:
138         * page/ChromeClient.h:
139
140 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
141
142         [WK2][Soup] Add private browsing support
143         https://bugs.webkit.org/show_bug.cgi?id=118657
144
145         Reviewed by Gustavo Noronha Silva.
146
147         Support private browsing by adding a method to create a private
148         browsing soup session. This private browsing session uses a
149         non-persistent cookie jar and does not use the disk cache feature.
150
151         No new tests. Covered by existing private browsing tests.
152
153         * platform/network/NetworkStorageSession.h:
154         (WebCore::NetworkStorageSession::isPrivateBrowsingSession):
155         Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.
156
157         * platform/network/ResourceHandle.h:
158         Add a factory method to create a private browsing session for soup.
159
160         * platform/network/soup/CookieJarSoup.cpp:
161         (WebCore::createPrivateBrowsingCookieJar):
162         * platform/network/soup/CookieJarSoup.h:
163         Add a method to create a non-persistent cookie jar for private browsing.
164
165         * platform/network/soup/NetworkStorageSessionSoup.cpp:
166         (WebCore::NetworkStorageSession::NetworkStorageSession):
167         Initialize m_isPrivate to false.
168         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
169         Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.
170
171         * platform/network/soup/ResourceHandleSoup.cpp:
172         (WebCore::createSoupSession):
173         Extract common soup session creation code so that both defaultSession
174         and createPrivateBrowsingSession can use this function to create a soup
175         session.
176         (WebCore::ResourceHandle::defaultSession):
177         Change to use createSoupSession.
178         (WebCore::ResourceHandle::createPrivateBrowsingSession):
179         Create a session which uses a non-persistent cookie jar.
180
181 2013-07-25  Tim Horton  <timothy_horton@apple.com>
182
183         Null check m_frame in maximum and minimumScrollPosition
184         https://bugs.webkit.org/show_bug.cgi?id=119109
185         <rdar://problem/14545393>
186
187         Reviewed by Darin Adler.
188
189         * page/FrameView.cpp:
190         (WebCore::FrameView::minimumScrollPosition):
191         (WebCore::FrameView::maximumScrollPosition):
192         Null-check m_frame (and move the early-return after the clamp-to-0
193         as the revert in r152911 should have).
194
195 2013-07-25  Anders Carlsson  <andersca@apple.com>
196
197         Localizable.strings generated by extract-localizable-strings should be UTF-8
198         https://bugs.webkit.org/show_bug.cgi?id=119106
199
200         Reviewed by Mark Rowe.
201
202         * English.lproj/Localizable.strings:
203         Re-encode this as UTF-8 and remove the BOM.
204
205         * WebCore.xcodeproj/project.pbxproj:
206         Set the file encoding of Localizable.strings to UTF-8.
207
208 2013-07-25  Ryosuke Niwa  <rniwa@webkit.org>
209
210         Don't force layout when querying a fixed or non-box margin/padding property
211         https://bugs.webkit.org/show_bug.cgi?id=118032
212
213         Reviewed by David Hyatt.
214
215         Merge https://chromium.googlesource.com/chromium/blink/+/66427d0825fcc2975bd50220cdcaa2504d6f36e5.
216
217         This patch avoids layout in ComputedStyleExtractor::propertyValue for margin and padding properties
218         when they are of fixed length. According to the Blink patch's author, this improves the page load
219         time of economist.com by 27%.
220
221         The actual code change is significantly different from the original Blink patch since we've done
222         some refactorins in r152938 and r153067 to make this change more self-contained.
223
224         Test: fast/css/computed-width-without-renderer.html
225
226         * css/CSSComputedStyleDeclaration.cpp:
227         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
228         (WebCore::paddingOrMarginIsRendererDependent):
229         (WebCore::isLayoutDependent):
230         (WebCore::ComputedStyleExtractor::propertyValue):
231
232 2013-07-25  Sam Weinig  <sam@webkit.org>
233
234         -[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
235         https://bugs.webkit.org/show_bug.cgi?id=119099
236         <rdar://problem/13439291>
237
238         Reviewed by Enrica Casucci.
239
240         Tests:
241             API Test: AttributedStringTest_Strikethrough
242
243         * platform/mac/HTMLConverter.mm:
244         (+[WebHTMLConverter editingAttributedStringFromRange:]):
245         Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.
246
247 2013-07-25  Pratik Solanki  <psolanki@apple.com>
248
249         Unreviewed build fix after r153333.
250
251         * platform/network/cf/ResourceResponseCFNet.cpp: Remove toTimeT since it is no longer called.
252
253 2013-07-25  Christophe Dumez  <ch.dumez@sisa.samsung.com>
254
255         Unreviewed EFL build fix after r153315.
256
257         Fix build error after we started compiling with c++0x support
258         in r153315.
259
260         * platform/efl/RenderThemeEfl.cpp:
261         (WebCore::toEdjeGroup):
262
263 2013-07-25  Anders Carlsson  <andersca@apple.com>
264
265         Remove lastModifiedDate from ResourceResponse
266         https://bugs.webkit.org/show_bug.cgi?id=119092
267
268         Reviewed by Andreas Kling.
269
270         Computing m_lastResponseDate is costly on some platforms and we already have a better way to
271         get the last response time, so convert the two call sites that used to call ResourceresponseBase::lastModifiedDate()
272         over to using lastModified() instead.
273
274         * platform/network/ResourceResponseBase.cpp:
275         (WebCore::ResourceResponseBase::ResourceResponseBase):
276         (WebCore::ResourceResponseBase::adopt):
277         (WebCore::ResourceResponseBase::copyData):
278         * platform/network/ResourceResponseBase.h:
279         * platform/network/cf/ResourceResponseCFNet.cpp:
280         (WebCore::ResourceResponse::platformLazyInit):
281         * plugins/PluginStream.cpp:
282         (WebCore::lastModifiedDate):
283         (WebCore::PluginStream::startStream):
284
285 2013-07-25  Yi Shen  <max.hong.shen@gmail.com>
286
287         Optimize the thread locks for API Shims
288         https://bugs.webkit.org/show_bug.cgi?id=118573
289
290         Reviewed by Geoffrey Garen.
291
292         Remove the thread lock from API Shims if the VM has an exclusive thread (e.g. the VM 
293         only used by WebCore's main thread).
294
295         No new tests required since no functionality changed.
296
297         * bindings/js/JSDOMWindowBase.cpp:
298         (WebCore::JSDOMWindowBase::commonVM):
299
300 2013-07-25  Bear Travis  <betravis@adobe.com>
301
302         [CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag
303         https://bugs.webkit.org/show_bug.cgi?id=117277
304
305         Reviewed by Alexandru Chiculita.
306
307         This patch adds some compile guards that were missing from the RenderStyle and
308         StyleRareNonInheritedData files. When the compile guard caused parameters to
309         not be used, the parameters were marked using UNUSED_PARAM.
310
311         * css/CSSPropertyNames.in: Inserting a line to trigger build.
312         * rendering/RenderBlock.cpp:
313         (WebCore::shapeInfoRequiresRelayout):
314         (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
315         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
316         * rendering/RenderBox.cpp:
317         (WebCore::isCandidateForOpaquenessTest):
318         * rendering/RenderBox.h:
319         * rendering/RenderObject.h:
320         * rendering/style/RenderStyle.cpp:
321         (WebCore::RenderStyle::changeRequiresLayout):
322         (WebCore::RenderStyle::changeRequiresRepaint):
323         * rendering/style/RenderStyle.h:
324         * rendering/style/StyleRareNonInheritedData.cpp:
325         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
326         (WebCore::StyleRareNonInheritedData::operator==):
327         * rendering/style/StyleRareNonInheritedData.h:
328
329 2013-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
330
331         Introduce toSVGPatternElement(), use it
332         https://bugs.webkit.org/show_bug.cgi?id=119013
333
334         Reviewed by Andreas Kling.
335
336         As a step to change static_cast with toSVGXXX, static_cast<SVGPatternElement*> can
337         be changed with toSVGPatternElement().
338
339         Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154734
340
341         * rendering/svg/RenderSVGResourcePattern.cpp:
342         (WebCore::RenderSVGResourcePattern::buildPattern):
343         * rendering/svg/SVGRenderTreeAsText.cpp:
344         (WebCore::writeSVGResourceContainer):
345         * rendering/svg/SVGResources.cpp:
346         (WebCore::targetReferenceFromResource):
347         * svg/SVGPatternElement.h:
348         (WebCore::toSVGPatternElement):
349
350 2013-06-21  Mark Lam  <mark.lam@apple.com>
351
352         Fixed broken build: updated to match SmallStrings changes in r151864.
353
354         Not reviewed.
355
356         No new tests.
357
358         * bindings/js/JSDOMBinding.h:
359         (WebCore::jsStringWithCache):
360
361 2013-06-15  Filip Pizlo  <fpizlo@apple.com>
362
363         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
364         https://bugs.webkit.org/show_bug.cgi?id=117676
365
366         Reviewed by Sam Weinig.
367
368         Remove the broken hack for the concurrent JIT, since now the concurrent JIT won't use this code anymore.
369
370         No new tests because no new behavior.
371
372         * loader/cache/CachedScript.cpp:
373         (WebCore::CachedScript::script):
374
375 2013-06-10  Mark Lam  <mark.lam@apple.com>
376
377         Introducing the StackIterator class.
378         https://bugs.webkit.org/show_bug.cgi?id=117390.
379
380         Reviewed by Geoffrey Garen.
381
382         No new tests.
383
384         * ForwardingHeaders/interpreter/StackIterator.h: Added.
385         * bindings/js/JSXMLHttpRequestCustom.cpp:
386         (WebCore::JSXMLHttpRequest::send):
387         * bindings/js/ScriptCallStackFactory.cpp:
388         (WebCore::createScriptCallStack):
389
390 2013-06-09  Filip Pizlo  <fpizlo@apple.com>
391
392         Unreviewed, fix build. Use at() instead of operator[] because of ambiguity on some compilers.
393
394         * page/CaptionUserPreferencesMac.mm:
395         (WebCore::languageIdentifier):
396
397 2013-05-27  Filip Pizlo  <fpizlo@apple.com>
398
399         testRunner should be able to tell you if a function is DFG compiled
400         https://bugs.webkit.org/show_bug.cgi?id=116847
401
402         Reviewed by Mark Hahnenberg.
403
404         Bail early if we're in the compilation thread. This is only relevant for
405         debug dumps.
406
407         No new tests becase no new behavior.
408
409         * loader/cache/CachedScript.cpp:
410         (WebCore::CachedScript::script):
411
412 2013-05-25  Mark Lam  <mark.lam@apple.com>
413
414         Remove Interpreter::retrieveLastCaller().
415         https://bugs.webkit.org/show_bug.cgi?id=116753.
416
417         Reviewed by Geoffrey Garen.
418
419         This is part of the refactoring effort to get rid of functions walking
420         the JS stack in their own way.
421
422         No new tests.
423
424         * bindings/js/JSXMLHttpRequestCustom.cpp:
425         (WebCore::JSXMLHttpRequest::send):
426         * bindings/js/ScriptCallStackFactory.cpp:
427         (WebCore::createScriptCallStack):
428
429 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
430
431         Rolled back in r149527 with crash fixed.
432
433         Reviewed by Oliver Hunt.
434
435             Rationalized 'this' value conversion
436             https://bugs.webkit.org/show_bug.cgi?id=115542
437
438 2013-04-29  Filip Pizlo  <fpizlo@apple.com>
439
440         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()
441         https://bugs.webkit.org/show_bug.cgi?id=115393
442
443         Reviewed by Geoffrey Garen.
444
445         No new tests because no new behavior.
446
447         * Modules/websockets/WebSocket.cpp:
448         (WebCore::WebSocket::close):
449         * Modules/websockets/WebSocketChannel.cpp:
450         (WebCore::WebSocketChannel::send):
451         * html/MediaFragmentURIParser.cpp:
452         (WebCore::MediaFragmentURIParser::parseFragments):
453
454 2013-07-24  Simon Fraser  <simon.fraser@apple.com>
455
456         [iOS] Captions are clipped in documents using pagination
457         https://bugs.webkit.org/show_bug.cgi?id=119072
458
459         Reviewed by Beth Dakin.
460
461         MediaControlTextTrackContainerElement::createTextTrackRepresentationImage() is called
462         to paint captions into a layer used for fullscreen video. It did the painting using
463         a subtree paint, but starting at the root RenderView's layer. This is problematic,
464         because the caption painting is subject to clipping for columns, and any enclosing
465         overflow:hidden container.
466         
467         Fix this by starting the paint at the MediaControlTextTrackContainerElement's
468         renderer's layer. By doing this we don't have to worry about an offset, so no
469         translation is required.
470         
471         Also make sure we update layer before grabbing the renderer (in case layout
472         destroys it).
473
474         * html/shadow/MediaControlElements.cpp:
475         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
476
477 2013-07-24  Simon Fraser  <simon.fraser@apple.com>
478
479         REGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
480         https://bugs.webkit.org/show_bug.cgi?id=119066
481         <rdar://problem/14499184>
482
483         Reviewed by Daniel Bates.
484
485         Following <http://trac.webkit.org/changeset/152335> (bug #118337) we set
486         the z-index to 0 on every element with CSS "overflow: scroll" and
487         "-webkit-overflow-scrolling: touch" regardless of whether the element has
488         non-auto z-index. Instead we should only set the z-index to 0 for such elements
489         that have an auto z-index.
490
491         * css/StyleResolver.cpp:
492         (WebCore::StyleResolver::adjustRenderStyle):
493
494 2013-07-24  Ryosuke Niwa  <rniwa@webkit.org>
495
496         Use-after-free in ApplyStyleCommand::removeInlineStyle
497         https://bugs.webkit.org/show_bug.cgi?id=118627
498
499         Reviewed by Oliver Hunt.
500         
501         Merge https://chromium.googlesource.com/chromium/blink/+/b6471d077e012b05ccba14d0ce8e6d616106c8e6
502
503         Unfortunately, there is no test case for this bug.
504
505         * editing/ApplyStyleCommand.cpp:
506         (WebCore::ApplyStyleCommand::removeInlineStyle):
507
508 2013-07-24  Zan Dobersek  <zdobersek@igalia.com>
509
510         Remove CheckedInt, use Checked<T, RecordOverflow> instead
511         https://bugs.webkit.org/show_bug.cgi?id=119022
512
513         Reviewed by Oliver Hunt.
514
515         Following the cleanup in r153062, the CheckedInt uses are replaced with
516         using the Checked<T, RecordOverflow> class. The CheckedInt header is not
517         used anywhere anymore and is thus removed.
518
519         * GNUmakefile.list.am:
520         * WebCore.xcodeproj/project.pbxproj:
521         * html/canvas/CheckedInt.h: Removed.
522         * html/canvas/DataView.cpp:
523         (WebCore::DataView::create):
524         * html/canvas/WebGLBuffer.cpp:
525         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
526         * html/canvas/WebGLRenderingContext.cpp:
527         (WebCore::WebGLRenderingContext::drawArrays):
528
529 2013-07-24  Andreas Kling  <akling@apple.com>
530
531         RenderMenuList computes the width of its longest option twice.
532         <http://webkit.org/b/119046>
533         <rdar://problem/14534679>
534
535         Reviewed by Darin Adler.
536
537         Rename the RenderMenuList::m_optionsChanged flag to m_needsOptionsWidthUpdate,
538         and make sure it gets cleared after we do a width computation in response to font changes.
539
540         * rendering/RenderMenuList.cpp:
541         (WebCore::RenderMenuList::styleDidChange):
542
543 2013-07-24  Zan Dobersek  <zdobersek@igalia.com>
544
545         Make KURL::hasPath private
546         https://bugs.webkit.org/show_bug.cgi?id=118279
547
548         Reviewed by Darin Adler.
549
550         * platform/KURL.h: The KURL::hasPath method is not used outside of the KURL class, so it is made private.
551
552 2013-07-24  Jessie Berlin  <jberlin@apple.com>
553
554         Remove WKPageGetPlugInInformation - it is not used anymore
555         https://bugs.webkit.org/show_bug.cgi?id=119047
556
557         Rubber-stamped by Alexey Proskuryakov.
558
559         Revert r152328, which added a key used only in the callback info for
560         WKPageGetPlugInInformation.
561
562         * WebCore.exp.in:
563
564 2013-07-24  Robert Hogan  <robert@webkit.org>
565
566         Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
567         https://bugs.webkit.org/show_bug.cgi?id=18305
568
569         Reviewed by David Hyatt.
570
571         overflowClipRect() clips out the table's half of a collapsed border when there is an overflow clip
572         on the table. This prevents the table's half of the border ever getting painted. 
573
574         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
575         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
576         painting we ensure that content gets clipped to cell's side of the collapsed border by ensuring the clip passed to child layers
577         from the table clips to the inside of the collapsed border. 
578
579         It's worth noting that a table's collapsed borders are painted by the table's layer using functions in 
580         RenderTableSection and RenderTableCell. So if a table section has a self-painting layer this patch still works, because
581         the borders aren't painted by the section's layer.
582
583         Tests: fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html
584                fast/table/overflow-table-collapsed-borders-cell-painting.html
585                fast/table/overflow-table-collapsed-borders-section-layer-painting.html
586                fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html
587                fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html
588                fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
589                fast/table/table-overflow.html
590
591         * rendering/RenderBox.cpp:
592         (WebCore::RenderBox::pushContentsClip):
593         (WebCore::RenderBox::overflowClipRect):
594         * rendering/RenderBox.h:
595         (WebCore::RenderBox::overflowClipRectForChildLayers):
596         * rendering/RenderLayer.cpp:
597         (WebCore::RenderLayer::calculateClipRects):
598         * rendering/RenderTable.cpp:
599         (WebCore::RenderTable::overflowClipRect):
600         * rendering/RenderTable.h:
601         (WebCore::RenderTable::overflowClipRectForChildLayers):
602
603 2013-07-24  Frédéric Wang  <fred.wang@free.fr>
604
605         Graphical elements inside mphantom should not be visible.
606         https://bugs.webkit.org/show_bug.cgi?id=116600.
607
608         Reviewed by Chris Fleizach.
609
610         Test: mathml/presentation/phantom.html
611
612         * rendering/mathml/RenderMathMLFraction.cpp:
613         (WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
614         * rendering/mathml/RenderMathMLRoot.cpp:
615         (WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"
616
617 2013-07-24  Brendan Long  <b.long@cablelabs.com>
618
619         WebVTTParser's identifier buffering can ignore subsequent lines
620         https://bugs.webkit.org/show_bug.cgi?id=118483
621
622         Reviewed by Eric Carlson.
623
624         No new tests since this bug can't be reproduced in layout tests.
625
626         * html/track/WebVTTParser.cpp:
627         (WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.
628
629 2013-07-23  Andreas Kling  <akling@apple.com>
630
631         REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
632         <rdar://problem/14324895>
633         <http://webkit.org/b/119023>
634
635         Reviewed by Simon Fraser.
636
637         The bug happened when FrameView::autoSizeIfEnabled() was getting called below FrameLoader::checkCompleted()
638         triggered by an incorrect loadDone() callback originating in SubresourceLoader::didCancel().
639
640         * css/StyleResolver.cpp:
641         (WebCore::StyleResolver::loadPendingResources):
642
643             Add an assertion that this function is not getting re-entered. If a similar bug occurs
644             in the future, this will help the lucky person debugging.
645
646         * loader/SubresourceLoader.cpp:
647         (WebCore::SubresourceLoader::didCancel):
648
649             Don't notifyDone() if the SubresourceLoader is in Uninitialized state.
650
651 2013-07-23  Tim Horton  <timothy_horton@apple.com>
652
653         Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
654         https://bugs.webkit.org/show_bug.cgi?id=119024
655         <rdar://problem/14523331>
656
657         Reviewed by Anders Carlsson.
658
659         * rendering/RenderEmbeddedObject.cpp:
660         (WebCore::addReplacementArrowPath):
661         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
662         Pixel-snap the unavailable plugin indicator arrow. Snapping directions
663         were chosen by eye/symmetry to look best on 1x and 2x devices at
664         1x and 2x page scale.
665
666 2013-07-19  Ryosuke Niwa  <rniwa@webkit.org>
667
668         The computed values of fix length padding should be subpixel precision like margin
669         https://bugs.webkit.org/show_bug.cgi?id=118936
670
671         Reviewed by Simon Fraser.
672
673         The bug was caused by ComputedStyleExtractor::propertyValue always returning the used value
674         for padding. Fixed the bug by returning the computed value when they're of fixed length.
675
676         This aligns the behaviors of getComputedStyle(~).padding~ with getComputedStyle(~).margin~,
677         which had been fixed in r102149. While the current CSSOM specification says getComputedStyle
678         should return the used values for margins when display property is set to anything but none,
679         new behavior matches that of Chrome, Firefox, and Internet Explorer.
680
681         Also extracted zoomAdjustedPaddingOrMarginPixelValue to reduce the code duplication.
682
683         Test: fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html
684
685         * css/CSSComputedStyleDeclaration.cpp:
686         (WebCore::zoomAdjustedPaddingOrMarginPixelValue): Extracted.
687         (WebCore::ComputedStyleExtractor::propertyValue):
688
689 2013-07-23  Alex Christensen  <achristensen@apple.com>
690
691         Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
692         https://bugs.webkit.org/show_bug.cgi?id=118550
693
694         Reviewed by Dean Jackson.
695
696         * CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
697
698 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
699
700         Use Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
701         https://bugs.webkit.org/show_bug.cgi?id=118988
702
703         Reviewed by Oliver Hunt.
704
705         Use the WTF's Checked class, with uint32_t as the numeric type and RecordOverflow as the overflow handler,
706         instead of the CheckedInt class. This removes a layering violation that's occurring due to including the CheckedInt
707         header that's currently located in the WebCore layer (alongside the HTML canvas code in Source/WebCore/html/canvas).
708
709         * platform/graphics/GraphicsContext3D.cpp:
710         (WebCore::GraphicsContext3D::computeImageSizeInBytes):
711
712 2013-07-23  Zalan Bujtas  <zalan@apple.com>
713
714         REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
715         https://bugs.webkit.org/show_bug.cgi?id=118435
716
717         Reviewed by David Hyatt.
718
719         When we find an empty inline in the middle of the word, prefer breaking it before 
720         instead of after to match other browsers' rendering.
721
722         Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
723
724         * rendering/RenderBlockLineLayout.cpp:
725         (WebCore::canBreakAtThisPosition):
726
727 2013-07-23  Alexey Proskuryakov  <ap@apple.com>
728
729         Dictionary hotkey does not work on vertical text
730         https://bugs.webkit.org/show_bug.cgi?id=118993
731         <rdar://problem/14478260>
732
733         Reviewed by Enrica Casucci.
734
735         Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html
736
737         * editing/Editor.cpp:
738         (WebCore::collapseCaretWidth): A helper function.
739         (WebCore::Editor::firstRectForRange): Many changes:
740         - use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
741         that's more direct that getting caret rects and computing bounding rect from those.
742         - handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
743         doesn't provide the needed result, and because it can be done faster.
744         - wherever we use carets to compute the result, account for vertical text (in a hackish
745         way, as we don't have layout information at Editor level).
746
747         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
748         dead code.
749
750 2013-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
751
752         [CSS Shapes] New positioning model: Borders
753         https://bugs.webkit.org/show_bug.cgi?id=118822
754
755         Reviewed by Dean Jackson.
756
757         Converting to the shape coordinate system was not properly accounting
758         for borders and padding. This has been fixed and a new convienence
759         method added because of the added complexity of the conversion.
760
761         Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
762
763         * rendering/RenderBlock.cpp:
764         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
765             computeSegmentsForContainingBlockLine to do the coordinate
766             conversion.
767         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
768         * rendering/RenderBlockLineLayout.cpp:
769         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
770         * rendering/shapes/ShapeOutsideInfo.cpp:
771         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
772             Add new method to do the coordinate conversion from the containing
773             block coordinate system to the coordinate system of the shape so
774             that the segments can be correctly calculated.
775
776 2013-07-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
777
778         Remove deprecated and unused compositing settings
779         https://bugs.webkit.org/show_bug.cgi?id=119014
780
781         Reviewed by Andreas Kling.
782
783         * page/Settings.in:
784
785 2013-07-23  Tim Horton  <timothy_horton@apple.com>
786
787         Add a test for plug-in unavailability indicator obscurity detection
788         https://bugs.webkit.org/show_bug.cgi?id=119007
789
790         Reviewed by Anders Carlsson.
791
792         Test: plugins/unavailable-plugin-indicator-obscurity.html
793
794         Expose the ability to test whether the unavailable plugin indicator
795         is obscured via the internals object.
796
797         * testing/Internals.cpp:
798         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
799         * testing/Internals.h:
800         * testing/Internals.idl:
801         Expose RenderEmbeddedObject::isReplacementObscured as
802         internals.isPluginUnavailabilityIndicatorObscured for testing purposes.
803
804 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
805
806         [Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
807         https://bugs.webkit.org/show_bug.cgi?id=118984
808
809         Reviewed by Darin Adler.
810
811         Execute a minor cleanup of the header inclusions in Soup-specific ResourceRequestSoup.cpp, ResourceRequest.h
812         and SocketStreamHandle.h source files. The inclusions are sorted into proper order, with blank lines and unnecessary
813         reinclusions removed.
814
815         * platform/network/soup/ResourceRequest.h:
816         * platform/network/soup/ResourceRequestSoup.cpp:
817         * platform/network/soup/SocketStreamHandle.h:
818
819 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
820
821         [Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
822         https://bugs.webkit.org/show_bug.cgi?id=118983
823
824         Reviewed by Martin Robinson.
825
826         Remove inclusions of the CachedResourceLoader, ChromeClient, Frame and Page headers. These are not
827         necessary (anymore) and only prevent the source file to be built independently of WebCore, as it should be.
828
829         * platform/network/soup/ResourceHandleSoup.cpp:
830
831 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
832
833         Remove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenGLCommon.cpp
834         https://bugs.webkit.org/show_bug.cgi?id=118989
835
836         Reviewed by Darin Adler.
837
838         * platform/graphics/GraphicsContext3D.cpp: Remove the unnecessary DrawingBuffer header inclusion.
839         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Remove the unnecessary
840         CanvasRenderingContext and WebGLObject header inclusions.
841
842 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
843
844         Remove the topDocumentURL member of the GraphicsContext3D::Attributes struct
845         https://bugs.webkit.org/show_bug.cgi?id=118987
846
847         Reviewed by Darin Adler.
848
849         Remove the topDocumentURL member that currently resides in the GraphicsContext3D::Attributes struct.
850         It's not used anywhere and only has one place where it is set, in WebGLRenderingContext::create.
851
852         * html/canvas/WebGLRenderingContext.cpp:
853         (WebCore::WebGLRenderingContext::create):
854         * platform/graphics/GraphicsContext3D.h:
855
856 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
857
858         Remove unused DrawingBuffer::paintRenderingResultsToImageData
859         https://bugs.webkit.org/show_bug.cgi?id=118986
860
861         Reviewed by Darin Adler.
862
863         Remove the paintRenderingResultsToImageData method of the DrawingBuffer class. It is not used anywhere
864         and also introduces a nasty layering violation by including and operating with the ImageData class.
865
866         * platform/graphics/gpu/DrawingBuffer.cpp:
867         * platform/graphics/gpu/DrawingBuffer.h:
868
869 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
870
871         Remove unnecessary includes in FormDataBuilder.cpp
872         https://bugs.webkit.org/show_bug.cgi?id=118991
873
874         Reviewed by Darin Adler.
875
876         * platform/network/FormDataBuilder.cpp: Remove the Frame and FrameLoader header inclusions,
877         nothing these two headers provide is used in this source file.
878
879 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
880
881         Fix the style of the ContentDispositionType enum definition
882         https://bugs.webkit.org/show_bug.cgi?id=118990
883
884         Reviewed by Darin Adler.
885
886         * platform/network/HTTPParsers.h: Align the style of the ContentDispositionType enumeration
887         definition with the other enumeration definitions in the HTTPParsers header, using the
888         'enum Name { ... }' style instead of a typedef.
889
890 2013-07-23  Zan Dobersek  <zdobersek@igalia.com>
891
892         [GTK] Mock GDK_IS_X11_DISPLAY macro can be redefined unnecessarily
893         https://bugs.webkit.org/show_bug.cgi?id=118980
894
895         Reviewed by Martin Robinson.
896
897         * platform/gtk/GtkVersioning.h: Only define the GDK_IS_X11_DISPLAY macro when using the GTK+ 2 API version
898         as that's the only supported configuration where the macro is not defined. Definining it only if it's not
899         yet defined at the time of inclusion of this header can cause redefinitions in GTK+ headers that are normally
900         included later.
901
902 2013-07-22  Beth Dakin  <bdakin@apple.com>
903
904         StickyPositionConstraints should store the constrainingRectAtLastLayout
905         https://bugs.webkit.org/show_bug.cgi?id=118999
906
907         Reviewed by Simon Fraser.
908
909         Much like how FixedPositionConstraints store a viewportRectAtLastLayout, 
910         StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to 
911         get sticky right in overflow areas once overflow areas scroll on the scrolling 
912         thread. 
913
914         * page/scrolling/ScrollingConstraints.h:
915         (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
916         (WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
917         (WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
918         * rendering/RenderBoxModelObject.cpp:
919         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
920
921 2013-07-22  Santosh Mahto  <santosh.ma@samsung.com>
922
923         DateInputType constructor initiate incorrect base class
924         https://bugs.webkit.org/show_bug.cgi?id=118962
925
926         Reviewed by Gyuyoung Kim.
927
928         No new test required since solving code error
929
930         * html/DateInputType.cpp:
931         (WebCore::DateInputType::DateInputType):
932         Corrected the base class instantiation in constructor.
933
934 2013-07-22  Tim Horton  <timothy_horton@apple.com>
935
936         Plug-in unavailability indicator should not be displayed if a blocked plugin's indicator is clipped
937         https://bugs.webkit.org/show_bug.cgi?id=118998
938         <rdar://problem/14511268>
939
940         Reviewed by Anders Carlsson.
941         
942         * html/HTMLEmbedElement.cpp:
943         (WebCore::HTMLEmbedElement::updateWidget):
944         * html/HTMLObjectElement.cpp:
945         (WebCore::HTMLObjectElement::updateWidget):
946         * html/HTMLPlugInElement.cpp:
947         (WebCore::HTMLPlugInElement::defaultEventHandler):
948         (WebCore::HTMLPlugInElement::supportsFocus):
949         * html/HTMLPlugInImageElement.cpp:
950         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
951         * loader/SubframeLoader.cpp:
952         (WebCore::SubframeLoader::createJavaAppletWidget):
953         (WebCore::SubframeLoader::loadPlugin):
954         * page/FrameView.cpp:
955         (WebCore::FrameView::updateWidget):
956         Rename showsUnavailablePluginIndicator to isPluginUnavailable, since being unavailable
957         and actually showing the indicator are two totally different things.
958
959         * WebCore.exp.in: Expose setUnavailablePluginIndicatorIsHidden.
960
961         * rendering/RenderEmbeddedObject.cpp:
962         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
963         Rename m_showsUnavailablePluginIndicator to m_isPluginUnavailable.
964         Add m_isUnavailablePluginIndicatorHidden, defaulting to false.
965
966         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
967         Set m_isPluginUnavailable when we get an unavailability reason.
968
969         (WebCore::RenderEmbeddedObject::paint):
970         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden): Added.
971
972         * rendering/RenderEmbeddedObject.h:
973         (WebCore::RenderEmbeddedObject::isPluginUnavailable): Added.
974
975         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
976         Repurpose "showsUnavailablePluginIndicator" to actually represent whether
977         the indicator is displayed (i.e. the plugin is unavailable, and the
978         indicator is not hidden).
979
980 2013-07-22  Tim Horton  <timothy_horton@apple.com>
981
982         RenderEmbeddedObject::isReplacementObscured should include the arrow in its area-of-interest
983         https://bugs.webkit.org/show_bug.cgi?id=118995
984         <rdar://problem/14516421>
985
986         Reviewed by Anders Carlsson.
987
988         * rendering/RenderEmbeddedObject.cpp:
989         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
990         Rename method from replacementTextRect to unavailablePluginIndicatorBounds for accuracy.
991         Use the bounding box of the indicator's path, which includes the rounded rect behind
992         the text as well as the arrow button.
993
994         (WebCore::RenderEmbeddedObject::isReplacementObscured):
995         * rendering/RenderEmbeddedObject.h:
996
997 2013-07-22  Tim Horton  <timothy_horton@apple.com>
998
999         <applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
1000         https://bugs.webkit.org/show_bug.cgi?id=118994
1001         <rdar://problem/14511232>
1002
1003         Reviewed by Anders Carlsson.
1004
1005         Make <applet> consistent with <object> and <embed>, deferring plugin
1006         instantiation to post-layout, so that layout is up-to-date if anything
1007         needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.
1008
1009         * html/HTMLAppletElement.cpp:
1010         (WebCore::HTMLAppletElement::updateWidget):
1011         Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
1012         creation until post-layout tasks. Java is always an NPAPI plugin, so
1013         we should always defer if requested.
1014
1015 2013-07-22  Benjamin Poulain  <benjamin@webkit.org>
1016
1017         Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
1018         https://bugs.webkit.org/show_bug.cgi?id=118941
1019
1020         Reviewed by Gavin Barraclough.
1021
1022         Currently, the only type of link relation supported by HTMLAnchorElement is RelationNoReferrer.
1023
1024         To find the value, we create a SpaceSplitString with the input value of the attribute (which
1025         create one or more AtomicString depending on the input). Then we create a new AtomicString for
1026         the literal "noreferrer". Finally, we compare the pointers and throw away all the AtomicStrings.
1027
1028         This causes a lot of memory operations for something really simple.
1029
1030         This patch adds a little helper method to SpaceSplitString to find a literal in the input. The only
1031         allocation happens if we need to foldCase(). The following operations are done without allocating
1032         new buffer and without hashing the input.
1033
1034         * dom/SpaceSplitString.cpp:
1035         (WebCore::tokenizeSpaceSplitString):
1036         (WebCore::AppendTokenToVectorTokenProcessor::AppendTokenToVectorTokenProcessor):
1037         (WebCore::AppendTokenToVectorTokenProcessor::processToken):
1038         (WebCore::SpaceSplitStringData::createVector):
1039         (WebCore::TokenIsEqualToCStringTokenProcessor::TokenIsEqualToCStringTokenProcessor):
1040         (WebCore::TokenIsEqualToCStringTokenProcessor::processToken):
1041         (WebCore::TokenIsEqualToCStringTokenProcessor::referenceStringWasFound):
1042         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
1043         * dom/SpaceSplitString.h:
1044         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
1045         * html/HTMLAnchorElement.cpp:
1046         (WebCore::HTMLAnchorElement::setRel):
1047
1048 2013-07-22  Zalan Bujtas  <zalan@apple.com>
1049
1050         segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
1051         https://bugs.webkit.org/show_bug.cgi?id=118965
1052
1053         Reviewed by Simon Fraser.
1054
1055         Do not change the composition state unless we can reliably figure out the iframe's size.
1056         If the renderer is not yet attached, its size is not computable.
1057
1058         Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
1059
1060         * rendering/RenderLayerCompositor.cpp:
1061         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
1062
1063 2013-07-22  Chris Fleizach  <cfleizach@apple.com>
1064
1065         AX: VoiceOver only read the first column in a safari table
1066         https://bugs.webkit.org/show_bug.cgi?id=118992
1067
1068         Reviewed by Tim Horton.
1069
1070         In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
1071         columns for the first section. We need to take the max number of columns out of all sections.
1072
1073         Test: accessibility/table-with-mismatch-column-count-in-initial-section.html
1074
1075         * accessibility/AccessibilityTable.cpp:
1076         (WebCore::AccessibilityTable::addChildren):
1077
1078 2013-07-22  Beth Dakin  <bdakin@apple.com>
1079
1080         StickyPositionContraints should not need to change to account for a RenderLayer's 
1081         scrollOffset
1082         https://bugs.webkit.org/show_bug.cgi?id=118958
1083         -and corresponding-
1084         <rdar://problem/12469203>
1085
1086         Reviewed by Simon Fraser.
1087
1088         Before this patch, to get sticky offsets right in overflow areas, the 
1089         StickyPositionConstraints changed on every scroll to factor it in. This will be a 
1090         problem once we can scroll overflow areas on the scrolling thread. The constraints 
1091         should never have to change to account for the scroll position. This patch fixes 
1092         that issue by changing the StickyPositionViewportConstraints’s containerBlockRect 
1093         and stickyBoxRect to be in a coordinate space that is relative to the scrolling 
1094         ancestor rather than being absolute. This patch also removes ‘absolute’ from those 
1095         variable names since they are no longer absolute.
1096
1097         A few re-names in the StickyPositionViewportConstraints class. The parameter to 
1098         computeStickyOffset() used to be called viewportRect, and is now called 
1099         constrainingRect. m_absoluteStickyBoxRect is now m_stickyBoxRect, and 
1100         m_absoluteContainingBlockRect is now m_containingBlockRect. And finally, 
1101         layerPositionForViewportRect() is now layerPositionForConstrainingRect()
1102         * page/scrolling/ScrollingConstraints.cpp:
1103         (WebCore::StickyPositionViewportConstraints::computeStickyOffset):
1104         (WebCore::StickyPositionViewportConstraints::layerPositionForConstrainingRect):
1105         * page/scrolling/ScrollingConstraints.h:
1106         (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
1107         (WebCore::StickyPositionViewportConstraints::containingBlockRect):
1108         (WebCore::StickyPositionViewportConstraints::setContainingBlockRect):
1109         (WebCore::StickyPositionViewportConstraints::stickyBoxRect):
1110         (WebCore::StickyPositionViewportConstraints::setStickyBoxRect):
1111         (WebCore::StickyPositionViewportConstraints::operator==):
1112
1113         Accounting for the re-names. 
1114         * page/scrolling/ScrollingStateStickyNode.cpp:
1115         (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
1116         (WebCore::ScrollingStateStickyNode::dumpProperties):
1117         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1118         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
1119
1120         Compute all values relative to the scrolling ancestor. This requires some juggling 
1121         in the overflow case to factor border and padding in or out.
1122         * rendering/RenderBoxModelObject.cpp:
1123         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1124
1125         This is where the scrollOffset should be factored in.
1126         (WebCore::RenderBoxModelObject::stickyPositionOffset):
1127
1128 2013-07-22  Dean Jackson  <dino@apple.com>
1129
1130         PlugIn content can disappear after restarting
1131         https://bugs.webkit.org/show_bug.cgi?id=118982
1132
1133         Reviewed by Simon Fraser.
1134
1135         When a snapshotted plug-in is restarted, we inserted its compositing
1136         layer back into the tree, but didn't recalculate style. This meant
1137         that a subsequent compositing tree operation (such as any hardware
1138         animation) could cause the content to disappear.
1139
1140         * html/HTMLPlugInImageElement.cpp:
1141         (WebCore::HTMLPlugInImageElement::setDisplayState): Force a style recalc.
1142         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Ditto.
1143
1144 2013-07-22  Zalan Bujtas  <zalan@apple.com>
1145
1146         REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
1147         https://bugs.webkit.org/show_bug.cgi?id=118951
1148
1149         Reviewed by Simon Fraser.
1150
1151         Ensure that the content rect is initialized when the image is set on the graphics layer.
1152
1153         RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
1154         the associated graphics layer has a content layer. Since the image gets committed 
1155         on the graphics layer after the update calls, the contents rect is left uninitialized.
1156
1157         Test: compositing/images/positioned-image-content-rect.html
1158
1159         * rendering/RenderLayerBacking.cpp:
1160         (WebCore::RenderLayerBacking::updateImageContents):
1161
1162 2013-07-22  Diego Pino Garcia  <dpino@igalia.com>
1163
1164         [Old Web Inspector] When right-clicking on a DataGrid column, show editing menu option as "Edit <columnName>" instead of just "Edit"
1165         https://bugs.webkit.org/show_bug.cgi?id=118971
1166
1167         Reviewed by Timothy Hatcher.
1168
1169         * English.lproj/localizedStrings.js: 
1170         * inspector/front-end/DataGrid.js: Change "Edit" for "Edit <columnTitle>"
1171         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
1172
1173 2013-07-22  Alex Christensen  <achristensen@apple.com>
1174
1175         Added assembly files to Windows 64-bit builds.
1176         https://bugs.webkit.org/show_bug.cgi?id=118931
1177
1178         Reviewed by Brent Fulgham.
1179
1180         * WebCore.vcxproj/WebCore.vcxproj: Added PaintHooks.asm for x64 and enabled MASM.
1181         * WebCore.vcxproj/WebCore.vcxproj.filters: Added PaintHooks.asm.
1182
1183 2013-07-22  Jakob Petsovits  <jpetsovits@blackberry.com>
1184
1185         [BlackBerry] Fix WebGL to a 2D canvas copies.
1186         https://bugs.webkit.org/show_bug.cgi?id=118921
1187         https://jira.bbqnx.net/browse/BRWSR-12714
1188         JIRA 449577
1189
1190         Reviewed by George Staikos.
1191
1192         The transform here was converted incorrectly when it
1193         replaced the pixel copy that was there before.
1194         As a true draw transformation, it doesn't need the "- 1"
1195         modification that pixel copies often require.
1196
1197         Fixes existing webgl/conformance/canvas tests.
1198
1199         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
1200         (WebCore::GraphicsContext3D::paintToCanvas):
1201
1202 2013-07-22  peavo@outlook.com  <peavo@outlook.com>
1203
1204         [Curl] Download fails for certain urls.
1205         https://bugs.webkit.org/show_bug.cgi?id=118468
1206
1207         Reviewed by Brent Fulgham.
1208
1209         The current Curl download implementation has a few shortcomings:
1210         1) Downloading from secure locations fails. We need to provide Curl with the path to a certificate file (.pem file).
1211         2) Cookies are not set in the download request. We need to give Curl the path to the cookie file.
1212         3) When a normal load is converted to a download, some of the headers from the original request is not sent (e.g. Referer, User agent).
1213
1214         * platform/network/curl/CurlDownload.cpp:
1215         (WebCore::CurlDownload::CurlDownload): Initialize custom headers member.
1216         (WebCore::CurlDownload::~CurlDownload): Free custom headers member.
1217         (WebCore::CurlDownload::init): Set certificate and cookie file path.
1218         (WebCore::CurlDownload::closeFile): Check file handle against value for invalid platform handle.
1219         (WebCore::CurlDownload::writeDataToFile): Added utility method to write download data to file.
1220         (WebCore::CurlDownload::addHeaders): Added utility method to add headers to request.
1221         (WebCore::CurlDownload::didReceiveData): Use writeDataToFile utility method.
1222         * platform/network/curl/CurlDownload.h:
1223         Put class in WebCore namespace.
1224         Added method to init download from resource handle, request, and response object.
1225         Added utility method to write download data to file.
1226         Added utility method to add headers to request.
1227         Added custom headers member.
1228
1229 2013-07-22  Eric Carlson  <eric.carlson@apple.com>
1230
1231         [iOS] captions sometimes positioned incorrectly after fullscreen state change
1232         https://bugs.webkit.org/show_bug.cgi?id=118912
1233
1234         Reviewed by Jer Noble.
1235
1236         * html/shadow/MediaControlElements.cpp:
1237         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Call clearTextTrackRepresentation.
1238         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Call updateDisplay so
1239             cues are re-rendered with the updated size.
1240         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Cleanup the
1241             text track representation.
1242         (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): New, force cues to be updated.
1243         (WebCore::MediaControlTextTrackContainerElement::exitedFullscreen): Ditto.
1244         * html/shadow/MediaControlElements.h:
1245
1246         * html/shadow/MediaControls.cpp:
1247         (WebCore::MediaControls::enteredFullscreen): Call MediaControlTextTrackContainerElement::enteredFullscreen.
1248         (WebCore::MediaControls::exitedFullscreen): Call MediaControlTextTrackContainerElement::exitedFullscreen.
1249
1250 2013-07-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1251
1252         [Qt][WK1] Support direct painting without GraphicsSurface
1253         https://bugs.webkit.org/show_bug.cgi?id=118302
1254
1255         Reviewed by Jocelyn Turcotte.
1256
1257         Configure the WebGL OpenGL context to share texture with
1258         the HostWindow OpenGL if available, and paint accelerated
1259         using the the now shared textures.
1260
1261         This should return the performance without GraphicsSurface
1262         on the WK1 code path to what it was before r135995 (28/11 2012).
1263
1264         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1265         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1266         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1267
1268 2013-07-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1269
1270         Introduce toSVGUseElement(), use it
1271         https://bugs.webkit.org/show_bug.cgi?id=118942
1272
1273         Reviewed by Allan Sandfeld Jensen.
1274
1275         As a step to change static_cast with toSVGXXX, static_cast<SVGUseElement*> can
1276         be changed with toSVGUseElement().
1277
1278         No new tests, no behavior change.
1279
1280         * dom/EventRetargeter.h:
1281         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1282         * page/EventHandler.cpp:
1283         (WebCore::instanceAssociatedWithShadowTreeElement):
1284         * rendering/svg/RenderSVGResourceClipper.cpp:
1285         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1286         * rendering/svg/RenderSVGTransformableContainer.cpp:
1287         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
1288         * svg/SVGStyledElement.cpp:
1289         (WebCore::SVGStyledElement::title):
1290         * svg/SVGUseElement.cpp:
1291         (WebCore::dumpInstanceTree):
1292         (WebCore::SVGUseElement::buildInstanceTree):
1293         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1294         * svg/SVGUseElement.h:
1295         (WebCore::toSVGUseElement):
1296
1297 2013-07-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1298
1299         Use toSVGPathElement() instead of static_cast<>
1300         https://bugs.webkit.org/show_bug.cgi?id=118960
1301
1302         Reviewed by Allan Sandfeld Jensen.
1303
1304         Though there is toSVGPathElement(), some files still use static_cast<SVGPathElement*>.
1305         To remove all static_cast<> use, we need to change argument from SVGElement to Element.
1306
1307         Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154621
1308
1309         No new tests, no behavior change.
1310
1311         * rendering/svg/RenderSVGTextPath.cpp:
1312         (WebCore::RenderSVGTextPath::layoutPath):
1313         * rendering/svg/SVGPathData.cpp:
1314         (WebCore::updatePathFromPathElement):
1315         * rendering/svg/SVGRenderTreeAsText.cpp:
1316         (WebCore::operator<<):
1317         * svg/SVGMPathElement.cpp:
1318         (WebCore::SVGMPathElement::pathElement):
1319         * svg/SVGPathElement.h:
1320         (WebCore::toSVGPathElement):
1321         * svg/SVGPathSegList.cpp:
1322         (WebCore::SVGPathSegList::commitChange):
1323         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1324         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1325         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1326         (WebCore::SVGPathSegListPropertyTearOff::contextElement):
1327
1328 2013-07-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1329
1330         [Qt] Implement more of DOM3 KeyEvent key-identifiers
1331         https://bugs.webkit.org/show_bug.cgi?id=118566
1332
1333         Reviewed by Jocelyn Turcotte.
1334
1335         Implemented as many of the key values from http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list
1336         as Qt keycodes support.
1337
1338         Also corrected the mapping of the Menu key, which was confused because MENU
1339         is also the ancient Microsoft speak for the Alt keys.
1340
1341         * platform/qt/PlatformKeyboardEventQt.cpp:
1342         (WebCore::keyIdentifierForQtKeyCode):
1343
1344 2013-07-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1345
1346         Introduce toSVGGradientElement(), use it
1347         https://bugs.webkit.org/show_bug.cgi?id=118943
1348
1349         Reviewed by Andreas Kling.
1350
1351         As a step to change static_cast with toSVGXXX, static_cast<SVGGradientElement*> can
1352         be changed with toSVGGradientElement().
1353
1354         No new tests, no behavior change.
1355
1356         * rendering/svg/RenderSVGGradientStop.cpp:
1357         (WebCore::RenderSVGGradientStop::gradientElement):
1358         * rendering/svg/RenderSVGResourceGradient.cpp:
1359         (WebCore::RenderSVGResourceGradient::applyResource):
1360         * rendering/svg/SVGResources.cpp:
1361         (WebCore::targetReferenceFromResource):
1362         * svg/SVGGradientElement.h:
1363         (WebCore::toSVGGradientElement):
1364         * svg/SVGLinearGradientElement.cpp:
1365         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1366         * svg/SVGRadialGradientElement.cpp:
1367         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1368
1369 2013-07-21  Andreas Kling  <akling@apple.com>
1370
1371         KURL creates duplicate strings when completing data: URIs.
1372         <http://webkit.org/b/118952>
1373         <rdar://problem/14504480>
1374
1375         Reviewed by Anders Carlsson.
1376
1377         When checking if the original URL input string can be reused, compare against the part
1378         of the parsing buffer that we would actually return, not the entire buffer.
1379
1380         632 kB progression on <http://www.nytimes.com/>
1381
1382         Test: KURLTest.KURLDataURIStringSharing
1383
1384         * platform/KURL.cpp:
1385         (WebCore::KURL::parse):
1386
1387 2013-07-20  Benjamin Poulain  <benjamin@webkit.org>
1388
1389         Add ASCIILiteral() on strings allocated often enough to appear in my Instruments
1390         https://bugs.webkit.org/show_bug.cgi?id=118937
1391
1392         Reviewed by Alexey Proskuryakov.
1393
1394         * html/BaseCheckableInputType.cpp:
1395         (WebCore::BaseCheckableInputType::saveFormControlState):
1396         (WebCore::BaseCheckableInputType::fallbackValue):
1397         * html/HTMLTextFormControlElement.cpp:
1398         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1399         * inspector/InspectorApplicationCacheAgent.cpp:
1400         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
1401         * loader/cache/CachedScript.cpp:
1402         (WebCore::CachedScript::CachedScript):
1403         * platform/network/ResourceRequestBase.h:
1404         (WebCore::ResourceRequestBase::ResourceRequestBase):
1405
1406 2013-07-20  Dean Jackson  <dino@apple.com>
1407
1408         Updated ANGLE is leaking like a sieve
1409         https://bugs.webkit.org/show_bug.cgi?id=118939
1410
1411         Rollout 152863, r152821, r152929 and r152755.
1412
1413         * CMakeLists.txt:
1414
1415 2013-07-19  Jer Noble  <jer.noble@apple.com>
1416
1417         Pagination: Do not paint the baseBackgroundColor if asked to skipRootBackground.
1418         https://bugs.webkit.org/show_bug.cgi?id=118933
1419
1420         Reviewed by Simon Fraser.
1421
1422         Captions rendered through TextTrackRepresentation are rendered with a background
1423         color when in paginated views. Do not fill the paint area with the
1424         baseBackgroundColor when the paint flags include SkipRootBackground.
1425
1426         * rendering/RenderView.cpp:
1427         (WebCore::RenderView::paint):
1428
1429 2013-07-19  Brady Eidson  <beidson@apple.com>
1430
1431         Pages should not be able to abuse users inside beforeunload handlers.
1432         <rdar://problem/14475779> and https://bugs.webkit.org/show_bug.cgi?id=118871.
1433
1434         Reviewed by Alexey Proskuryakov.
1435
1436         Tests: fast/loader/show-only-one-beforeunload-dialog.html
1437                http/tests/misc/iframe-beforeunload-dialog-matching-ancestor-securityorigin.html
1438                http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html
1439
1440         * loader/FrameLoader.cpp:
1441         (WebCore::FrameLoader::FrameLoader):
1442         (WebCore::FrameLoader::shouldClose):
1443         (WebCore::FrameLoader::handleBeforeUnloadEvent):
1444         (WebCore::FrameLoader::shouldCloseFiringBeforeUnloadEvent): Renamed from fireBeforeUnloadEvent.
1445           Add logic to enforce "1 beforeunload dialog per navigation" as well as "iframes can only show beforeunload 
1446           dialogs if their entire ancestry's security origins match the navigating frame."
1447         * loader/FrameLoader.h:
1448         * loader/FrameLoader.h:
1449
1450         Add the ability for Page to know when any frame is dispatching beforeunload:
1451         * page/Page.cpp:
1452         (WebCore::Page::Page):
1453         (WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount):
1454         (WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount):
1455         (WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent):
1456         * page/Page.h:
1457
1458         * page/DOMWindow.cpp:
1459         (WebCore::DOMWindow::print): Disallow if any frame is in beforeunload dispatch.
1460         (WebCore::DOMWindow::alert): Ditto.
1461         (WebCore::DOMWindow::confirm): Ditto.
1462         (WebCore::DOMWindow::prompt): Ditto.
1463         (WebCore::DOMWindow::showModalDialog): Ditto.
1464
1465 2013-07-19  Chris Fleizach  <cfleizach@apple.com>
1466
1467         AX: VoiceOver not detecting misspelled words don't work in all cases
1468         https://bugs.webkit.org/show_bug.cgi?id=118924
1469
1470         Reviewed by Tim Horton.
1471
1472         VoiceOver is now looking for a new misspelled attribute.
1473
1474         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1475         (AXAttributeStringSetSpelling):
1476         (AXAttributedStringAppendText):
1477
1478 2013-07-19  Ryosuke Niwa  <rniwa@webkit.org>
1479
1480         Extract computeRenderStyleForProperty and nodeOrItsAncestorNeedsStyleRecalc from ComputedStyleExtractor::propertyValue
1481         https://bugs.webkit.org/show_bug.cgi?id=118930
1482
1483         Reviewed by Andreas Kling.
1484
1485         Extracted two functions as a preparation to fix bugs 118032 and 118618.
1486
1487         * css/CSSComputedStyleDeclaration.cpp:
1488         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
1489         (WebCore::computeRenderStyleForProperty):
1490         (WebCore::ComputedStyleExtractor::propertyValue):
1491
1492 2013-07-19  Andreas Kling  <akling@apple.com>
1493
1494         Cache style declaration CSSOM wrappers directly on MutableStylePropertySet.
1495         <http://webkit.org/b/118883>
1496
1497         Reviewed by Gavin Barraclough
1498
1499         Merge https://chromium.googlesource.com/chromium/blink/+/183bcd51eb0e79cab930cf46695df05dc793630f
1500         From Blink r153700 by <ager@chromium.org>:
1501
1502         In my measurements the mapping is adding more overhead than just having a field
1503         in all MutableStylePropertySet objects. So this saves memory and makes access
1504         faster.
1505
1506         * css/StylePropertySet.cpp:
1507         (WebCore::MutableStylePropertySet::MutableStylePropertySet):
1508         (WebCore::MutableStylePropertySet::~MutableStylePropertySet):
1509         (WebCore::StylePropertySet::hasCSSOMWrapper):
1510         (WebCore::MutableStylePropertySet::cssStyleDeclaration):
1511         (WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
1512         (WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
1513         * css/StylePropertySet.h:
1514         (WebCore::StylePropertySet::StylePropertySet):
1515
1516 2013-07-19  Brent Fulgham  <bfulgham@apple.com>
1517
1518         [Windows] Avoid passing addresses of temporaries to Windows API.
1519         https://bugs.webkit.org/show_bug.cgi?id=118917
1520
1521         Reviewed by Anders Carlsson.
1522
1523         The temporary Vector returned by String::charactersWithNullTermination
1524         was going out of scope before its first use, causing Windows API to
1525         receive garbage memory.
1526
1527         * platform/win/ContextMenuWin.cpp:
1528         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1529         * platform/win/PasteboardWin.cpp:
1530         (WebCore::createGlobalHDropContent):
1531         * platform/win/SSLKeyGeneratorWin.cpp:
1532         (WebCore::WebCore::signedPublicKeyAndChallengeString):
1533
1534 2013-07-19  Zoltan Horvath  <zoltan@webkit.org>
1535
1536         [CSS Shapes] Remove lineWithinShapeBounds() from ShapeInfo since it's no longer used
1537         https://bugs.webkit.org/show_bug.cgi?id=118913
1538
1539         Reviewed by Andreas Kling.
1540
1541         No new tests, no behavior change.
1542
1543         * rendering/shapes/ShapeInfo.h: Remove lineWithinShapeBounds().
1544
1545 2013-07-19  Alex Christensen  <achristensen@apple.com>
1546
1547         Added x64 configuration to Visual Studio build.
1548         https://bugs.webkit.org/show_bug.cgi?id=118888
1549
1550         Reviewed by Brent Fulgham.
1551
1552         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
1553         * WebCore.vcxproj/WebCore.vcxproj:
1554         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
1555         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
1556
1557 2013-07-19  Abhijeet Kandalkar  <abhijeet.k@samsung.com>
1558
1559         Spatial Navigation handling of space key in <select> appears to confuse listIndex and optionIndex.
1560         https://bugs.webkit.org/show_bug.cgi?id=99525
1561
1562         HTMLSelect Element inherently contains the logic to focus option node and thus, implementing an explicit logic to find the focus index is not required.
1563
1564         Reviewed by Joseph Pecoraro.
1565
1566         Test: fast/spatial-navigation/snav-multiple-select-optgroup.html
1567
1568         * html/HTMLSelectElement.cpp:
1569         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1570         * page/SpatialNavigation.cpp:
1571         (WebCore::canScrollInDirection):
1572         * rendering/RenderListBox.cpp:
1573         (WebCore::RenderListBox::addFocusRingRects):
1574
1575 2013-07-19  David Hyatt  <hyatt@apple.com>
1576
1577         OSX: ePub: Unable to select text in vertical Japanese book
1578         https://bugs.webkit.org/show_bug.cgi?id=118864
1579         <rdar://problem/14109351>
1580
1581         Reviewed by Dan Bernstein and Sam Weinig.
1582
1583         This patch fixes all of the various writing-mode and pagination combinations
1584         so that the columns are painted in the correct location. The code that sets up
1585         the initial painting translation offset in the block direction and that advances
1586         that offset has been pulled into two helper functions, initialBlockOffsetForPainting
1587         and blockDeltaForPaintingNextColumn, and that code is now shared by the four call
1588         sites that need it (painting and hit testing in RenderBlock and painting and hit testing
1589         in RenderLayer).
1590         
1591         This patch also backs out the maximumScrollPosition change, since it only occurred because
1592         of incorrect sizing of the RenderView, and this sizing issue has now been corrected by
1593         ensuring that computeLogicalHeight() always makes sure you are the size of the viewport
1594         and does not shrink you to the column height.
1595         
1596         There was also a race condition that caused pagination to be incorrect if layout occurred
1597         before the html/body renderer that set the writing-mode were available. When this happened,
1598         the writing mode got propagated up to the view, but the column styles didn't get
1599         adjusted to compensate for the writing mode change.
1600
1601         Added tests for every pagination and writing-mode combination in fast/multicol/pagination.
1602
1603         * css/StyleResolver.cpp:
1604         (WebCore::StyleResolver::styleForDocument):
1605         (WebCore::StyleResolver::adjustRenderStyle):
1606         Move setStylesForPaginationMode into RenderStyle and make it a member function. This is
1607         necessary so that the style can be adjusted dynamically to fix the race condition mentioned
1608         above.
1609
1610         * page/FrameView.cpp:
1611         (WebCore::FrameView::maximumScrollPosition):
1612         Back out this change since the symptom it was fixing only occurred because the logical
1613         height of the view was being set incorrectly.
1614
1615         * rendering/RenderBlock.cpp:
1616         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
1617         Patch the column code that sets up the initial page height to use the pagination API's
1618         page height rather than the viewport logical height. This allows the view to still match
1619         the viewport in dimensions rather than being incorrectly sized to the column height.
1620         
1621         (WebCore::RenderBlock::initialBlockOffsetForPainting):
1622         (WebCore::RenderBlock::blockDeltaForPaintingNextColumn):
1623         Two new helper functions used to set up the block direction paint/hit testing translation.
1624         The major bug fix that occurred in this code is that the old block axis code didn't handle
1625         reversal correctly and it also used physical coordinates to try to determine the translation
1626         offset, when you really need to use logical coordinates in the original writing mode coordinate
1627         system to determine the offset.
1628
1629         (WebCore::RenderBlock::paintColumnContents):
1630         Patched to call the new helper functions.
1631
1632         (WebCore::ColumnRectIterator::ColumnRectIterator):
1633         (WebCore::ColumnRectIterator::adjust):
1634         (WebCore::ColumnRectIterator::update):
1635         Patched to call the new helper functions.
1636
1637         * rendering/RenderBlock.h:
1638         Add the two new helper functions to the RenderBlock header.
1639
1640         * rendering/RenderBox.cpp:
1641         (WebCore::RenderBox::styleDidChange):
1642         If the writing mode of the html/body propagates to the viewport and changes its writing mode,
1643         also change our column styles to match if we're in paginated mode.
1644
1645         (WebCore::RenderBox::computeLogicalHeight):
1646         (WebCore::RenderBox::computePercentageLogicalHeight):
1647         Call the new pageOrViewLogicalHeight function on RenderView instead of
1648         RenderBox::viewLogicalHeightForPercentages (which is now removed).
1649
1650         * rendering/RenderLayer.cpp:
1651         (WebCore::RenderLayer::paintChildLayerIntoColumns):
1652         (WebCore::RenderLayer::hitTestChildLayerColumns):
1653         Patched to use the two new helper functions for block direction paint offset setup and
1654         advancement.
1655
1656         * rendering/RenderView.cpp:
1657         (WebCore::RenderView::pageOrViewLogicalHeight):
1658         New helper function that does what viewLogicalHeightForPercentages used to do but also
1659         handles returning the page length for block axis column progression. Again, this is to
1660         allow the view to retain its correct size (matching the viewport).
1661
1662         (WebCore::RenderView::viewLogicalHeight):
1663         Back out the code that made the view grow or shrink to the size of the Pagination API page
1664         length when the progression was block axis. This was the source of most of the scroll origin
1665         and scrolling issues.
1666
1667         * rendering/RenderView.h:
1668         Add the new pageOrViewLogicalHeight() function.
1669
1670         * rendering/style/RenderStyle.cpp:
1671         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
1672         This is the old StyleResolver function for setting up the column styles. It's in RenderStyle
1673         now so that it can be called at any time to change a style rather than only at style resolution
1674         time.
1675
1676         * rendering/style/RenderStyle.h:
1677         Declaration of the setColumnStylesFromPaginationMode function.
1678
1679 2013-07-19  peavo@outlook.com  <peavo@outlook.com>
1680
1681         [Curl] Http response code 401 (Authentication required) is not handled.
1682         https://bugs.webkit.org/show_bug.cgi?id=118849
1683
1684         Reviewed by Brent Fulgham.
1685
1686         The current Curl implementation does not handle a 401 response.
1687         When receiving http code 401, we need to give a notification that authorization is required, by calling the appropriate notification method.
1688         This gives a WebKit client the possibility to present a password dialog to the user.
1689         In response to this, we should provide Curl with the given username and password, so another request can be sent with the given credentials.
1690
1691         * platform/network/ResourceHandle.h:
1692             Added method to check if credential storage should be used.
1693         * platform/network/ResourceHandleInternal.h:
1694             Added member to keep track of number of authentication failures.
1695         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1696         * platform/network/curl/ResourceHandleCurl.cpp:
1697         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1698             Added method to check if credential storage should be used.
1699         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1700             Implement method; notify client when authentication is required.
1701         (WebCore::ResourceHandle::receivedCredential):
1702             Implement method; provide Curl with password and username when available.
1703         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1704             Implement method; reset Curl username and password.
1705         (WebCore::ResourceHandle::receivedCancellation):
1706             Implement method; notify client that authorization has been cancelled.
1707         * platform/network/curl/ResourceHandleManager.cpp:
1708         (WebCore::isHttpAuthentication):
1709             Added function to check if http code is an 'Authorization required' code.
1710         (WebCore::getProtectionSpace):
1711             Added function to initialize a protection space object from a Curl handle and a response object. 
1712         (WebCore::headerCallback):
1713             Notify client when authorization is required.
1714         (WebCore::ResourceHandleManager::applyAuthenticationToRequest):
1715             Added method to set Curl username and password.
1716         (WebCore::ResourceHandleManager::initializeHandle):
1717             Use method to set Curl username and password.
1718         * platform/network/curl/ResourceHandleManager.h:
1719             Added method to set Curl username and password.
1720
1721 2013-07-19  Radu Stavila  <stavila@adobe.com>
1722
1723         Hover doesn't work for block elements inside a href element
1724         https://bugs.webkit.org/show_bug.cgi?id=118907
1725
1726         Reviewed by David Hyatt.
1727
1728         Added test for hovering block elements inside a href element.
1729
1730         Test: fast/css/hover-display-block.html
1731
1732         * rendering/RenderObject.cpp:
1733         (WebCore::RenderObject::hoverAncestor):
1734
1735 2013-07-19  Zoltan Horvath  <zoltan@webkit.org>
1736
1737         [CSS Shapes] Clear overflowing line's segments in pushShapeContentOverflowBelowTheContentBox
1738         https://bugs.webkit.org/show_bug.cgi?id=118002
1739
1740         Reviewed by David Hyatt.
1741
1742         When the last line in the shape overlaps with the shape bottom boundaries we need to clear the computed segments. (We need to compute
1743         the segments anyway, since shape-outside's code uses the same code path to determine its segments and the line containing is not a
1744         requirement in that case.) Rather then doing the job in RenderBlock::LineBreaker::nextLineBreak I moved the functionality to its correct
1745         place to pushShapeContentOverflowBelowTheContentBox. Now all the overflow related functionality is located in one function. I fixed the
1746         corresponding layout test.
1747
1748         Tests: I modified shape-inside-overflow.html.
1749
1750         * rendering/RenderBlockLineLayout.cpp:
1751         (WebCore::pushShapeContentOverflowBelowTheContentBox): Remove segments if line overlaps with the shape's boundaries.
1752         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Move segments clear logic to pushShapeContentOverflowBelowContentBox.
1753
1754 2013-07-19  Geoffrey Garen  <ggaren@apple.com>
1755
1756         TrailingObjects shouldn't shrink vector capacity in a loop
1757         https://bugs.webkit.org/show_bug.cgi?id=118322
1758
1759         Reviewed by Darin Adler.
1760
1761         This seems to take about 3% off the profile of loading a large text file.
1762
1763         * rendering/RenderBlockLineLayout.cpp:
1764         (WebCore::TrailingObjects::clear): clear() has the built-in side effect
1765         of throwing away existing capacity. Use shrink(0) to indicate that we
1766         want to keep our existing capacity.
1767
1768 2013-07-19  Diego Pino Garcia  <dpino@igalia.com>
1769
1770         [GTK] Merge decamelizations fix ups in the GObject DOM bindings code generator
1771         https://bugs.webkit.org/show_bug.cgi?id=117543
1772
1773         Reviewed by Carlos Garcia Campos.
1774
1775         Ensure that all the code that calls to decamelize() applies the same fix ups
1776
1777         Now all functions that need to decamelize a string should simply call
1778         to decamelize(). This function calls to FixUpDecamelize to apply some
1779         fix ups.
1780
1781         * bindings/scripts/CodeGeneratorGObject.pm:
1782         (decamelize): decamelizes a string and applies fix ups
1783         (FixUpDecamelize): applies a series of fix ups to a decamelized string
1784         (GetParentGObjType): moved fix ups to FixUpDecamelize()
1785         (GenerateProperties): simply call to decamelize
1786         (GenerateHeader): simply call to decamelize
1787         (GetGReturnMacro): simply call to decamelize
1788         (GenerateFunction): simply call to decamelize
1789         (GenerateCFile): simply call to decamelize
1790         (GenerateEventTargetIface): simply call to decamelize
1791
1792 2013-07-19  Kwang Yul Seo  <skyul@company100.net>
1793
1794         Unreviewed.
1795
1796         Fix an assertion failure which causes debug bots to fail.
1797
1798         * platform/network/NetworkStateNotifier.cpp:
1799         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
1800
1801 2013-07-19  Miguel Gomez  <magomez@igalia.com>
1802
1803         [GTK] media/video-seek-multiple.html is failing
1804         https://bugs.webkit.org/show_bug.cgi?id=117580
1805
1806         Reviewed by Philippe Normand.
1807
1808         When receiving several seek calls in a row, ensure that the final position
1809         is the one requested in the last call received.
1810
1811         Already covered in test media/video-seek-multiple.html
1812
1813         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1814         (WebCore::MediaPlayerPrivateGStreamer::seek):
1815
1816 2013-07-19  Kangil Han  <kangil.han@samsung.com>
1817
1818         Use explicit HTMLFrameElementBase cast and introduce toHTMLFrameElementBase
1819         https://bugs.webkit.org/show_bug.cgi?id=118873
1820
1821         Reviewed by Ryosuke Niwa.
1822
1823         It should be HTMLFrameElementBase that embraces both HTMLFrameElement and HTMLIFrameElement.
1824         This also makes correct toFooElement possible.
1825         Next, to avoid direct use of static_cast, this patch introduces toHTMLFrameElementBase for code cleanup.
1826
1827         * editing/FrameSelection.cpp:
1828         (WebCore::scanForForm):
1829         * html/HTMLBodyElement.cpp:
1830         (WebCore::HTMLBodyElement::didNotifySubtreeInsertions):
1831         * html/HTMLFrameElementBase.h:
1832         (WebCore::toHTMLFrameElementBase):
1833         * loader/SubframeLoader.cpp:
1834         (WebCore::SubframeLoader::loadSubframe):
1835         * page/EventHandler.cpp:
1836         (WebCore::targetIsFrame):
1837         * page/FrameView.cpp:
1838         (WebCore::FrameView::init):
1839         * rendering/RenderFrameBase.cpp:
1840         (WebCore::RenderFrameBase::layoutWithFlattening):
1841         * rendering/RenderLayer.cpp:
1842         (WebCore::frameElementAndViewPermitScroll):
1843         (WebCore::RenderLayer::scrollRectToVisible):
1844
1845 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1846
1847         Bindings generation tests are failing
1848         https://bugs.webkit.org/show_bug.cgi?id=118877
1849
1850         Reviewed by Kentaro Hara.
1851
1852         I inadvertently removed the wrong part of the if statement
1853         in r152845, causing hasAttribute() to be used unconditionally
1854         for reflected boolean attributes instead of fastHasAttribute().
1855         This patch fixes the issue.
1856
1857         No new tests, covered by bindings tests.
1858
1859         * bindings/scripts/CodeGenerator.pm:
1860         (GetterExpression):
1861
1862 2013-07-18  Kwang Yul Seo  <skyul@company100.net>
1863
1864         WorkerGlobalScope should support onoffline/ononline event handlers
1865         https://bugs.webkit.org/show_bug.cgi?id=118832
1866
1867         Reviewed by Alexey Proskuryakov.
1868
1869         HTML5 spec says that WorkerGlobalScope should support
1870         onoffline/ononline event handlers as stated in
1871         http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-offline
1872
1873         Modified NetworkStateNotifier to support multiple callbacks and added a
1874         callback to dispatch offline and online events to WorkerGlobalScope
1875         when network state is changed.
1876
1877         No new test because the current test infrastructure does not provide a
1878         mock network state notifier.
1879
1880         * page/Page.cpp:
1881         (WebCore::networkStateChanged):
1882         Change the function to take an additional argument, isOnLine so that we
1883         can remove a call to NetworkStateNotifier::onLine().
1884         (WebCore::Page::Page):
1885         Use NetworkStateNotifier::addNetworkStateChangeListener which
1886         allows us to add multiple callbacks.
1887
1888         * platform/network/NetworkStateNotifier.cpp:
1889         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
1890         Replace NetworkStateNotifier::setNetworkStateChangedFunction with
1891         NetworkStateNotifier::addNetworkStateChangeListener.
1892         (WebCore::NetworkStateNotifier::notifyNetworkStateChange):
1893         A helper method to notify all registered network state change
1894         callbacks.
1895         * platform/network/NetworkStateNotifier.h:
1896         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1897         * platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
1898         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1899         (WebCore::NetworkStateNotifier::networkStateChange):
1900         * platform/network/efl/NetworkStateNotifierEfl.cpp:
1901         (WebCore::NetworkStateNotifier::networkInterfaceChanged):
1902         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1903         * platform/network/mac/NetworkStateNotifierMac.cpp:
1904         (WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
1905         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1906         * platform/network/qt/NetworkStateNotifierQt.cpp:
1907         (WebCore::NetworkStateNotifier::updateState):
1908         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1909         * platform/network/win/NetworkStateNotifierWin.cpp:
1910         (WebCore::NetworkStateNotifier::addressChanged):
1911         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1912         Replace m_networkStateChangedFunction() with notifyNetworkStateChange().
1913
1914         * workers/Worker.cpp:
1915         (WebCore::networkStateChanged):
1916         Notify network state change by iterating all Workers.
1917         (WebCore::Worker::Worker):
1918         Initialize allWorkers and add networkStateChanged to
1919         NetworkStateNotifier in first invocation. Add this Worker to
1920         allWorkers.
1921         (WebCore::Worker::~Worker):
1922         Remove this Worker from allWorkers.
1923         (WebCore::Worker::notifyNetworkStateChange):
1924         * workers/Worker.h:
1925         * workers/WorkerGlobalScope.h:
1926         Add onoffline and ononline event handlers.
1927         * workers/WorkerGlobalScope.idl:
1928         Add onoffline and ononline event handlers
1929         * workers/WorkerGlobalScopeProxy.h:
1930
1931         * workers/WorkerMessagingProxy.cpp:
1932         (WebCore::NotifyNetworkStateChangeTask::create):
1933         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
1934         (WebCore::NotifyNetworkStateChangeTask::performTask):
1935         A subclass of ScriptExecutionContext::Task to dispatch offline and
1936         online events to WorkerGlobalScope.
1937         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1938         Notify network state change using ScriptExecutionContext::postTask to
1939         dispatch events across threads.
1940         * workers/WorkerMessagingProxy.h:
1941
1942 2013-07-18  Ryosuke Niwa  <rniwa@webkit.org>
1943
1944         Build fix after r152876.
1945
1946         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1947         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
1948
1949 2013-07-18  Brent Fulgham  <bfulgham@apple.com>
1950
1951         [Media] Share more code between Mac and Windows implementation files.
1952         https://bugs.webkit.org/show_bug.cgi?id=118801
1953
1954         Reviewed by Eric Carlson.
1955
1956         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1957         (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Move
1958         implementation from ObjC file to parent file.
1959         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
1960         Ditto.
1961         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1962         Remove duplicate implementation.
1963         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1964         Ditto.
1965         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1966         Ditto.
1967         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1968         Ditto.
1969         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1970         Ditto.
1971
1972 2013-07-18  Alex Christensen  <achristensen@apple.com>
1973
1974         Fixed compile errors for non-Cairo platforms using EGL.
1975         https://bugs.webkit.org/show_bug.cgi?id=118536
1976
1977         Reviewed by Brent Fulgham.
1978
1979         * platform/graphics/egl/GLContextEGL.cpp: Added #if USE(CAIRO) around cairo.h.
1980         (WebCore::GLContextEGL::~GLContextEGL): Added #if USE(CAIRO) around cairo_device_destroy call. 
1981
1982 2013-07-18  Jer Noble  <jer.noble@apple.com>
1983
1984         New PDFPlugin doesn't support WebKitOmitPDFSupport, acts as if Plug-ins are off
1985         https://bugs.webkit.org/show_bug.cgi?id=118858
1986
1987         Reviewed by Eric Carlson.
1988
1989         Expand the scope of rejecting non video/ or audio/ MIME types when
1990         filling the MIME type cache.
1991
1992         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1993         (WebCore::shouldRejectMIMEType): Added utility function.
1994
1995 2013-07-17  Brent Fulgham  <bfulgham@apple.com>
1996
1997         [Windows] Support in-band text tracks.
1998         https://bugs.webkit.org/show_bug.cgi?id=103770
1999
2000         Reviewed by Eric Carlson.
2001
2002         Existing media tests cover these features.
2003
2004         * WebCore.vcxproj/WebCore.vcxproj: Add new files for Windows captions
2005         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2006         * config.h: Make sure proper buid flags are turned on when building
2007         with AVCF_LEGIBLE_OUTPUT.
2008         * page/CaptionUserPreferencesMediaAF.cpp: Revise to reduce soft linking
2009         duplication between Mac and Windows.
2010         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Update
2011         to support Windows platform by removing compiler guards and adding
2012         Windows declarations for soft-link functions.
2013         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
2014         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2015         Remove build guards preventing Windows from using LegibleOutput
2016         features.
2017         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2018         (WebCore::MediaPlayerPrivateAVFoundation::seek):
2019         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
2020         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2021         (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged):
2022         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2023         (WebCore::MediaPlayerPrivateAVFoundation::contentsNeedsDisplay): Ditto
2024         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
2025         Add new LegibleOutput support functions, and try to reduce duplication
2026         between Windows and Mac soft link declarations.
2027         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Ditto.
2028         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: Added.
2029         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
2030         (WebCore::InbandTextTrackPrivateAVCF::disconnect):
2031         (WebCore::InbandTextTrackPrivateAVCF::kind):
2032         (WebCore::InbandTextTrackPrivateAVCF::isClosedCaptions):
2033         (WebCore::InbandTextTrackPrivateAVCF::isSDH):
2034         (WebCore::InbandTextTrackPrivateAVCF::containsOnlyForcedSubtitles):
2035         (WebCore::InbandTextTrackPrivateAVCF::isMainProgramContent):
2036         (WebCore::InbandTextTrackPrivateAVCF::isEasyToRead):
2037         (WebCore::InbandTextTrackPrivateAVCF::label):
2038         (WebCore::InbandTextTrackPrivateAVCF::language):
2039         (WebCore::InbandTextTrackPrivateAVCF::isDefault):
2040         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Added.
2041         (WebCore::InbandTextTrackPrivateAVCF::create):
2042         (WebCore::InbandTextTrackPrivateAVCF::~InbandTextTrackPrivateAVCF):
2043         (WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
2044         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp: Added.
2045         (WebCore::InbandTextTrackPrivateLegacyAVCF::InbandTextTrackPrivateLegacyAVCF):
2046         (WebCore::InbandTextTrackPrivateLegacyAVCF::disconnect):
2047         (WebCore::InbandTextTrackPrivateLegacyAVCF::kind):
2048         (WebCore::InbandTextTrackPrivateLegacyAVCF::isClosedCaptions):
2049         (WebCore::InbandTextTrackPrivateLegacyAVCF::containsOnlyForcedSubtitles):
2050         (WebCore::InbandTextTrackPrivateLegacyAVCF::isMainProgramContent):
2051         (WebCore::InbandTextTrackPrivateLegacyAVCF::isEasyToRead):
2052         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
2053         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
2054         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h: Added.
2055         (WebCore::InbandTextTrackPrivateLegacyAVCF::create):
2056         (WebCore::InbandTextTrackPrivateLegacyAVCF::~InbandTextTrackPrivateLegacyAVCF):
2057         (WebCore::InbandTextTrackPrivateLegacyAVCF::avPlayerItemTrack):
2058         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2059         Update to support LegibleOutput features for the Windows port.
2060         (WebCore::AVFWrapper::currentTrack): Added.
2061         (WebCore::AVFWrapper::legibleOutput): Added.
2062         (WebCore::createMetadataKeyNames): Added missing key names.
2063         (WebCore::avLegibleOutput): Added.
2064         (WebCore::safeMediaSelectionGroupForLegibleMedia): Added.
2065         (WebCore::MediaPlayerPrivateAVFoundationCF::cancelLoad): Clear text
2066         tracks when cancelling.
2067         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Added.
2068         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Added.
2069         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Revised
2070         to match logic in Objective C implementation.
2071         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Revised
2072         to match logic in Objective C implementation.
2073         (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
2074         Check presence of metadata before proceeding. Revised to match logic
2075         in Objective C implementation.
2076         (WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
2077         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Update for
2078         in-band text tracks.
2079         (WebCore::MediaPlayerPrivateAVFoundationCF::clearTextTracks): Added.
2080         (WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
2081         Added.
2082         (WebCore::MediaPlayerPrivateAVFoundationCF::processNewAndRemovedTextTracks):
2083         Added.
2084         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
2085         Added.
2086         (WebCore::AVFWrapper::setCurrentTrack): Added.
2087         (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack):
2088         Added.
2089         (WebCore::AVFWrapper::AVFWrapper): Add new initializers.
2090         (WebCore::AVFWrapper::~AVFWrapper): Clean up text track information.
2091         (WebCore::AVFWrapper::createPlayer): Add Legible Output support.
2092         (WebCore::AVFWrapper::createPlayerItem): Ditto.
2093         (WebCore::LegibleOutputData::LegibleOutputData): Added.
2094         (WebCore::AVFWrapper::processCue): Added.
2095         (WebCore::AVFWrapper::legibleOutputCallback): Added.
2096         (WebCore::AVFWrapper::safeMediaSelectionGroupForLegibleMedia): Added.
2097         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2098         Update to support LegibleOutput features for the Windows port.
2099         * platform/win/SoftLinking.h: Change signature of variable accessor
2100         to match Mac so reduce duplicate code.
2101
2102 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2103
2104         Make atob() / btoa() argument non optional
2105         https://bugs.webkit.org/show_bug.cgi?id=118844
2106
2107         Reviewed by Kentaro Hara.
2108
2109         According to the latest specification, the argument to atob() / btoa()
2110         should not be optional:
2111         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#windowbase64
2112
2113         This patch makes WebKit behave according to the specification. The argument
2114         is also mandatory in Firefox, IE10 and Blink.
2115
2116         atob() / btoa() are also moved to their own WindowBase64 interface which
2117         the Window interface implements. This does not change the behavior but
2118         this is closer to the specification and it will make exposing those
2119         methods to workers easier later on.
2120
2121         No new tests, already covered by:
2122         fast/dom/Window/atob-btoa.html
2123
2124         * CMakeLists.txt:
2125         * DerivedSources.make:
2126         * DerivedSources.pri:
2127         * GNUmakefile.list.am:
2128         * page/DOMWindow.idl:
2129         * page/WindowBase64.idl: Added.
2130
2131 2013-07-18  Antoine Quint  <graouts@apple.com>
2132
2133         Crash in WebCore::createMarkup()
2134         https://bugs.webkit.org/show_bug.cgi?id=118847
2135
2136         Reviewed by Ryosuke Niwa.
2137
2138         Also check that we have a containingBlock() for the renderer() so that we
2139         may safely call node() on it.
2140
2141         * editing/markup.cpp:
2142         (WebCore::highestAncestorToWrapMarkup):
2143
2144 2013-07-18  Praveen R Jadhav  <praveen.j@samsung.com>
2145
2146         Only the first call to 'stop' method of AudioBufferSourceNode must be entertained.
2147         https://bugs.webkit.org/show_bug.cgi?id=118776
2148
2149         Reviewed by Jer Noble.
2150
2151         Subsequent calls to 'stop' for a AudioSourceBufferNode throws an exception.
2152         End time set by first 'stop' method is used for processing.
2153
2154         No new tests. audiobuffersource-exception.html is updated.
2155
2156         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2157         (WebCore::AudioScheduledSourceNode::stop):
2158
2159 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2160
2161         Simplify SVG animated type handling in the JSC bindings generator
2162         https://bugs.webkit.org/show_bug.cgi?id=118845
2163
2164         Reviewed by Kentaro Hara.
2165
2166         Simplify IsSVGAnimatedType subroutine in the bindings generator so that
2167         we no longer need to hardcode SVG animated types. Also remove the
2168         CanUseFastAttribute subroutine as it is equivalent to IsSVGAnimatedType.
2169         This allows us to simplify the GetterExpression subroutine so that
2170         we can use fastHasAttribute() unconditionally for boolean type.
2171
2172         No new tests, no behavior change.
2173
2174         * bindings/scripts/CodeGenerator.pm:
2175         (IsSVGAnimatedType):
2176         (GetterExpression):
2177
2178 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2179
2180         Use [ImplementedAs] instead of special casing in the bindings generators
2181         https://bugs.webkit.org/show_bug.cgi?id=118848
2182
2183         Reviewed by Kentaro Hara.
2184
2185         In several instances, special casing were used in the bindings generator to avoid
2186         name clashes in the implementation. The [ImplementedBy] IDL extended attribute is
2187         meant to solve this issue so we now use it instead.
2188
2189         No new tests, no behavior change.
2190
2191         * bindings/scripts/CodeGenerator.pm:
2192         (WK_ucfirst):
2193         (AttributeNameForGetterAndSetter):
2194         * bindings/scripts/CodeGeneratorJS.pm:
2195         (GenerateImplementation):
2196         (NativeToJSValue):
2197         * bindings/scripts/CodeGeneratorObjC.pm:
2198         (GenerateHeader):
2199         (GenerateImplementation):
2200         * svg/SVGAElement.idl:
2201         * svg/SVGFECompositeElement.cpp:
2202         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2203         (WebCore::SVGFECompositeElement::parseAttribute):
2204         (WebCore::SVGFECompositeElement::setFilterEffectAttribute):
2205         (WebCore::SVGFECompositeElement::build):
2206         * svg/SVGFECompositeElement.h:
2207         * svg/SVGFECompositeElement.idl:
2208         * svg/SVGFEMorphologyElement.cpp:
2209         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
2210         (WebCore::SVGFEMorphologyElement::parseAttribute):
2211         (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
2212         (WebCore::SVGFEMorphologyElement::build):
2213         * svg/SVGFEMorphologyElement.h:
2214         * svg/SVGFEMorphologyElement.idl:
2215         * svg/SVGTransform.cpp:
2216         (WebCore::SVGTransform::updateSVGMatrix):
2217         * svg/SVGTransform.h:
2218         * svg/SVGTransform.idl:
2219
2220 2013-07-18  Zalan Bujtas  <zalan@apple.com>
2221
2222         Incorrect calculated width for mspace.
2223         https://bugs.webkit.org/show_bug.cgi?id=118601
2224
2225         Reviewed by Chris Fleizach.
2226
2227         Use intrinsic logical widths to size <mspace> properly.
2228         This patch also fixes an assert on isPreferredLogicalHeightDirty() which occurs
2229         while layouting <mspace>. The assert fix is required, so that the sizing can be
2230         fixed.
2231
2232         Test: mathml/presentation/mspace-prefered-width.html
2233
2234         * rendering/mathml/RenderMathMLBlock.cpp:
2235         (WebCore::parseMathMLLength): switch to LayoutUnits.
2236         (WebCore::parseMathMLNamedSpace): switch to LayoutUnits.
2237         * rendering/mathml/RenderMathMLBlock.h:
2238         * rendering/mathml/RenderMathMLFraction.cpp:
2239         (WebCore::RenderMathMLFraction::updateFromElement):
2240         * rendering/mathml/RenderMathMLFraction.h:
2241         * rendering/mathml/RenderMathMLSpace.cpp:
2242         (WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths):
2243         * rendering/mathml/RenderMathMLSpace.h:
2244
2245 2013-07-18  Ryosuke Niwa  <rniwa@webkit.org>
2246
2247         willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
2248         https://bugs.webkit.org/show_bug.cgi?id=118828
2249
2250         Reviewed by Gavin Barraclough.
2251
2252         Call these two callbacks when we start a drag and drop.
2253
2254         No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
2255
2256         * page/DragController.cpp:
2257         (WebCore::DragController::startDrag):
2258
2259 2013-07-18  Santosh Mahto  <santosh.ma@samsung.com>
2260
2261         ASSERTION FAILED: !listItems().size() || m_activeSelectionAnchorIndex >= 0 in WebCore::HTMLSelectElement::updateListBoxSelection
2262         https://bugs.webkit.org/show_bug.cgi?id=118591
2263
2264         Reviewed by Kent Tamura.
2265
2266         Test: fast/forms/select/selectall-command-crash.html
2267
2268         * html/HTMLSelectElement.cpp:
2269         (WebCore::HTMLSelectElement::selectAll):
2270         We should return this function if activeSelectionAnchorIndex is not valid index
2271
2272 2013-07-18  Ryuan Choi  <ryuan.choi@samsung.com>
2273
2274         [EFL] Refactor spin.edc not to use offset
2275         https://bugs.webkit.org/show_bug.cgi?id=118830
2276
2277         Reviewed by Gyuyoung Kim.
2278
2279         EDJE allows offset to specify the pixel based position,
2280         but it's not good way if you want to locate object like arrow top or bottom.
2281
2282         Instead, this patch uses align property.
2283
2284         * platform/efl/DefaultTheme/widget/spinner/spinner.edc:
2285
2286 2013-07-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
2287
2288         [gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
2289         https://bugs.webkit.org/show_bug.cgi?id=118827
2290
2291         Reviewed by Philippe Normand.
2292
2293         webKitWebAudioSrcLoop() currently calls g_slist_index for each element 
2294         to get its index in a list it's iterating over. g_list_index function uses
2295         a sequential search to find that element, which is clearly unecessary.
2296         This patch adds a local variable to store the current index and use it 
2297         instead of calling g_slist_index function.
2298
2299         No new tests, no behavior changes.
2300
2301         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2302         (webKitWebAudioSrcLoop):
2303
2304 2013-07-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2305
2306         Introduce toSVGInlineFlowBox() and use it
2307         https://bugs.webkit.org/show_bug.cgi?id=118794
2308
2309         Reviewed by Andreas Kling.
2310
2311         As a step to change static_cast with toSVGXXX, static_cast<SVGInlineFlowBox*> can
2312         be changed with toSVGInlineFlowBox().
2313
2314         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154385
2315
2316         No new tests, no behavior change.
2317
2318         * rendering/svg/SVGInlineFlowBox.cpp:
2319         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
2320         * rendering/svg/SVGInlineFlowBox.h:
2321         (WebCore::toSVGInlineFlowBox):
2322         * rendering/svg/SVGRootInlineBox.cpp:
2323         (WebCore::SVGRootInlineBox::paint):
2324         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
2325         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2326
2327 2013-07-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2328
2329         Use toSVGMarkerElement() instead of static_cast<>
2330         https://bugs.webkit.org/show_bug.cgi?id=118800
2331
2332         Reviewed by Andreas Kling.
2333
2334         Though there is toSVGMarkerElement(), some files still use static_cast<SVGMarkerElement*>.
2335         To remove all static_cast<> use, we need to change argument from SVGElement to Node.
2336
2337         No new tests, no behavior changes.
2338
2339         * rendering/svg/RenderSVGResourceMarker.cpp:
2340         (WebCore::RenderSVGResourceMarker::referencePoint):
2341         (WebCore::RenderSVGResourceMarker::angle):
2342         (WebCore::RenderSVGResourceMarker::markerTransformation):
2343         (WebCore::RenderSVGResourceMarker::viewportTransform):
2344         (WebCore::RenderSVGResourceMarker::calcViewport):
2345         * rendering/svg/RenderSVGResourceMarker.h:
2346         (WebCore::RenderSVGResourceMarker::markerUnits):
2347         * svg/SVGMarkerElement.h:
2348         (WebCore::toSVGMarkerElement):
2349
2350 2013-07-17  Jacky Jiang  <zhajiang@blackberry.com>
2351
2352         Dereference null pointer crash in Length::decrementCalculatedRef()
2353         https://bugs.webkit.org/show_bug.cgi?id=118686
2354
2355         Reviewed by Simon Fraser.
2356
2357         Length(Calculated) won't insert any CalculationValue to CalculationValueHandleMap;
2358         therefore, we dereference null CalculationValue pointer when the temporary
2359         Length object goes out of the scope.
2360         Length(Calculated) is not allowed as it doesn't make sense that we construct
2361         a Calculated Length object with uninitialized calc expression.
2362         The code just wants to blend with zero. To fix the bug, we can just blend
2363         with Length(0, Fixed) here as we currently can blend different type units
2364         and zero has the same behavior regardless of unit.
2365
2366         Test: transitions/transition-transform-translate-calculated-length-crash.html
2367
2368         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2369         (WebCore::TranslateTransformOperation::blend):
2370
2371 2013-07-17  Tim Horton  <timothy_horton@apple.com>
2372
2373         Update blocked/missing plug-in UI
2374         https://bugs.webkit.org/show_bug.cgi?id=118347
2375         <rdar://problem/14209318>
2376
2377         Reviewed by Sam Weinig.
2378
2379         * WebCore.exp.in:
2380         Export RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription.
2381
2382         * rendering/RenderEmbeddedObject.cpp:
2383         (WebCore::replacementTextRoundedRectPressedColor):
2384         (WebCore::replacementTextRoundedRectColor):
2385         (WebCore::replacementTextColor):
2386         Change colors to new design and add some more constants.
2387
2388         (WebCore::shouldUnavailablePluginMessageBeButton): Added.
2389
2390         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Added.
2391         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
2392         Call through to the -WithDescription variant.
2393
2394         (WebCore::RenderEmbeddedObject::paintReplaced):
2395         Fill the background, and otherwise match the new design.
2396
2397         (WebCore::addReplacementArrowPath):
2398         Add an arrow to the given path, inside the given rect.
2399
2400         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2401         Add a 1px padding to the bottom of the text.
2402         Add a circle and an arrow into the indicator as per the new design.
2403
2404         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2405         Hit-test the indicator arrow as well; otherwise, the fact that the arrow
2406         is a hole in the path means it won't be hit.
2407
2408         * rendering/RenderEmbeddedObject.h:
2409
2410 2013-07-17  Commit Queue  <commit-queue@webkit.org>
2411
2412         Unreviewed, rolling out r152701, r152703, r152739, r152754,
2413         and r152756.
2414         http://trac.webkit.org/changeset/152701
2415         http://trac.webkit.org/changeset/152703
2416         http://trac.webkit.org/changeset/152739
2417         http://trac.webkit.org/changeset/152754
2418         http://trac.webkit.org/changeset/152756
2419         https://bugs.webkit.org/show_bug.cgi?id=118821
2420
2421         this was a buggy fix and we're going to try something
2422         different (Requested by thorton on #webkit).
2423
2424         * CMakeLists.txt:
2425         * DerivedSources.make:
2426         * DerivedSources.pri:
2427         * GNUmakefile.am:
2428         * WebCore.exp.in:
2429         * WebCore.vcxproj/WebCore.vcxproj:
2430         * WebCore.vcxproj/WebCore.vcxproj.filters:
2431         * WebCore.xcodeproj/project.pbxproj:
2432         * css/CSSDefaultStyleSheets.cpp:
2433         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2434         * css/unavailablePlugIns.css: Removed.
2435         * dom/EventListener.h:
2436         * html/HTMLAppletElement.cpp:
2437         (WebCore::HTMLAppletElement::updateWidget):
2438         * html/HTMLPlugInElement.cpp:
2439         (WebCore::HTMLPlugInElement::defaultEventHandler):
2440         * html/HTMLPlugInImageElement.cpp:
2441         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2442         * loader/SubframeLoader.cpp:
2443         (WebCore::SubframeLoader::createJavaAppletWidget):
2444         * page/ChromeClient.h:
2445         (WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
2446         * rendering/RenderEmbeddedObject.cpp:
2447         (WebCore::replacementTextRoundedRectPressedColor):
2448         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
2449         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
2450         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
2451         (WebCore::RenderEmbeddedObject::paint):
2452         (WebCore::RenderEmbeddedObject::paintReplaced):
2453         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2454         (WebCore::RenderEmbeddedObject::replacementTextRect):
2455         (WebCore::RenderEmbeddedObject::isReplacementObscured):
2456         (WebCore::RenderEmbeddedObject::layout):
2457         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2458         (WebCore::shouldUnavailablePluginMessageBeButton):
2459         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2460         (WebCore::RenderEmbeddedObject::getCursor):
2461         (WebCore::RenderEmbeddedObject::canHaveChildren):
2462         * rendering/RenderEmbeddedObject.h:
2463         * rendering/RenderWidget.h:
2464
2465 2013-07-17  Simon Fraser  <simon.fraser@apple.com>
2466
2467         Optimize RenderLayerCompositor's OverlapMap
2468         https://bugs.webkit.org/show_bug.cgi?id=118764
2469
2470         Reviewed by Tim Horton.
2471
2472         Overlap stack items can have RectLists with hundreds of rectangles.
2473         This makes the linear search in OverlapMap::overlapsLayers() very slow.
2474         
2475         Optimize by storing the bounding rect of the list of rects, and doing an early
2476         check on that. This reduces time spent in RenderLayer::scrollTo() by 13% in some
2477         content with lots of layers inside an overflow:scroll.
2478
2479         * rendering/RenderLayerCompositor.cpp:
2480         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
2481         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
2482         (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
2483         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2484
2485 2013-07-17  Bem Jones-Bey  <bjonesbe@adobe.com>
2486
2487         [CSS Shapes] Port refactoring of shape-outside code from Blink
2488         https://bugs.webkit.org/show_bug.cgi?id=118757
2489
2490         Reviewed by Dean Jackson.
2491
2492         Refactor the left and right offset methods to reduce the number of
2493         arguments by splitting the methods into smaller methods. This
2494         refactoring was requested as part of porting support for stacked
2495         floats with shape-outside to Blink.
2496
2497         Also add a variable when calling computeSegmentsForLine to make it
2498         more readable and easier to follow the coordinate system change.
2499
2500         No new tests, no behavior change.
2501
2502         * rendering/RenderBlock.cpp:
2503         (WebCore::RenderBlock::computeLogicalLocationForFloat): Update to use
2504             the refactored IgnoringShapeOutside methods.
2505         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): New method to
2506             compute the offset contributed by left floats.
2507         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine): New method to
2508             compute misc adjustments to the left offset.
2509         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): New method to
2510             compute the offset contributed by right floats.
2511         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine): New method to
2512             compute misc adjustments to the right offset.
2513         * rendering/RenderBlock.h:
2514         (WebCore::RenderBlock::logicalRightOffsetForLine): Implement original
2515             method in terms of the float offset computation method and the
2516             offset adjustment method. This method takes into account the
2517             shape-outside on any floats when computing the offset.
2518         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
2519         (WebCore::RenderBlock::logicalRightOffsetForLineIgnoringShapeOutside):
2520             Compute the right offset as if there was no shape-outside on any
2521             of the floats.
2522         (WebCore::RenderBlock::logicalLeftOffsetForLineIgnoringShapeOutside):
2523             Compute the left offset as if there was no shape-outside on any
2524             of the floats.
2525         * rendering/RenderBlockLineLayout.cpp:
2526         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update
2527             to use a variable to make the calls to computeSegmentsForLine more
2528             explicit about the coordinate system conversion.
2529
2530 2013-07-17  Zalan Bujtas  <zalan@apple.com>
2531
2532         Wrong linebox height, when block element parent has vertical-align property defined.
2533         https://bugs.webkit.org/show_bug.cgi?id=118245
2534
2535         Reviewed by David Hyatt.
2536
2537         Do not push the current element to the next, when it is still considered empty, even with
2538         some object(s) in front. Behave as if it was actually empty.
2539         Inline elements like <span></span> generate such lines.
2540
2541         Test: fast/css/empty-span-with-parent-div-and-vertical-align.html
2542
2543         * rendering/RenderBlockLineLayout.cpp:
2544         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2545
2546 2013-07-17  Andreas Kling  <akling@apple.com>
2547
2548         CSS selector list splitting should be by component, not by selector.
2549         <http://webkit.org/b/118761>
2550         <rdar://problem/14421609>
2551
2552         Reviewed by Antti Koivisto.
2553
2554         Test (amended): fast/css/rule-selector-overflow.html
2555
2556         * css/CSSSelectorList.h:
2557         * css/CSSSelectorList.cpp:
2558         (WebCore::CSSSelectorList::CSSSelectorList):
2559         (WebCore::CSSSelectorList::componentCount):
2560         * css/CSSStyleRule.cpp:
2561         (WebCore::CSSStyleRule::setSelectorText):
2562
2563             Renamed CSSSelectorList::length() to componentCount() and made it public.
2564
2565         * css/RuleSet.h:
2566
2567             maximumSelectorCount => maximumSelectorComponentCount
2568
2569         * css/StyleRule.cpp:
2570         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
2571
2572             Make the splits after accumulating 'maximumSelectorComponentCount' components.
2573
2574         * css/StyleRule.h:
2575         * css/StyleSheetContents.cpp:
2576         (WebCore::StyleSheetContents::parserAppendRule):
2577
2578             splitIntoMultipleRulesWithMaximumSelectorCount => splitIntoMultipleRulesWithMaximumSelectorComponentCount
2579
2580 2013-07-17  Rob Buis  <rwlbuis@webkit.org>
2581
2582         [Mac] REGRESSION(r152685): svg/custom/xlink-prefix-in-attributes.html failed unexpectedly
2583         https://bugs.webkit.org/show_bug.cgi?id=118701
2584
2585         Reviewed by Ryosuke Niwa.
2586
2587         Use the computed attribute prefix, otherwise href being in xlink namespace but not having any prefix
2588         will cause outputting the xlink namespace in appendNamespace.
2589
2590         Patch fixes svg/custom/xlink-prefix-in-attributes.html.
2591
2592         * editing/MarkupAccumulator.cpp:
2593         (WebCore::MarkupAccumulator::appendAttribute):
2594
2595 2013-07-17  Chris Fleizach  <cfleizach@apple.com>
2596
2597         Regression: columnheader/rowheader roles not exposed correctly
2598         https://bugs.webkit.org/show_bug.cgi?id=113628
2599
2600         Reviewed by Tim Horton.
2601
2602         When we determine the row and column headers we look at the ARIA role being returned, but
2603         since TableCell overrides the determineAccessibilityRole method, the ARIA role is never set.
2604
2605         Test: platform/mac/accessibility/aria-columnrowheaders.html
2606
2607         * accessibility/AccessibilityTableCell.cpp:
2608         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
2609
2610 2013-07-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2611
2612         Get rid of SVGPoint special case from the bindings generator
2613         https://bugs.webkit.org/show_bug.cgi?id=118783
2614
2615         Reviewed by Kentaro Hara.
2616
2617         Get rid of SVGPoint special case from the bindings generator by adding a
2618         new SVGPoint.h header that contains a typedef to FloatPoint.
2619
2620         Also use SVGPoint type in the implementation API for consistency with
2621         the IDL.
2622
2623         No new tests, no behavior change.
2624
2625         * bindings/scripts/CodeGenerator.pm:
2626         (SkipIncludeHeader):
2627         * bindings/scripts/test/JS/JSTestObj.cpp:
2628         (WebCore::jsTestObjMutablePoint):
2629         (WebCore::jsTestObjImmutablePoint):
2630         (WebCore::setJSTestObjMutablePoint):
2631         (WebCore::setJSTestObjImmutablePoint):
2632         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
2633         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
2634         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2635         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
2636         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2637         (-[DOMTestObj mutablePoint]):
2638         (-[DOMTestObj immutablePoint]):
2639         (-[DOMTestObj mutablePointFunction]):
2640         (-[DOMTestObj immutablePointFunction]):
2641         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
2642         (-[DOMTestTypedefs immutablePointFunction]):
2643         * rendering/svg/RenderSVGRoot.cpp:
2644         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
2645         * rendering/svg/SVGTextQuery.cpp:
2646         (WebCore::SVGTextQuery::startPositionOfCharacter):
2647         (WebCore::SVGTextQuery::endPositionOfCharacter):
2648         (WebCore::SVGTextQuery::characterNumberAtPosition):
2649         * rendering/svg/SVGTextQuery.h:
2650         * svg/SVGPathElement.cpp:
2651         (WebCore::SVGPathElement::getPointAtLength):
2652         * svg/SVGPathElement.h:
2653         * svg/SVGPathTraversalStateBuilder.cpp:
2654         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
2655         * svg/SVGPathTraversalStateBuilder.h:
2656         * svg/SVGPathUtilities.cpp:
2657         (WebCore::getPointAtLengthOfSVGPathByteStream):
2658         * svg/SVGPathUtilities.h:
2659         * svg/SVGPoint.h: Added.
2660         * svg/SVGPointList.cpp:
2661         (WebCore::SVGPointList::valueAsString):
2662         * svg/SVGPointList.h:
2663         * svg/SVGSVGElement.cpp:
2664         (WebCore::SVGSVGElement::createSVGPoint):
2665         * svg/SVGSVGElement.h:
2666         * svg/SVGTextContentElement.cpp:
2667         (WebCore::SVGTextContentElement::getStartPositionOfChar):
2668         (WebCore::SVGTextContentElement::getEndPositionOfChar):
2669         (WebCore::SVGTextContentElement::getCharNumAtPosition):
2670         * svg/SVGTextContentElement.h:
2671         * svg/SVGZoomEvent.cpp:
2672         (WebCore::SVGZoomEvent::previousTranslate):
2673         (WebCore::SVGZoomEvent::newTranslate):
2674         * svg/SVGZoomEvent.h:
2675
2676 2013-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2677
2678         [GStreamer] webkitwebsrc: use SubResourceLoader
2679         https://bugs.webkit.org/show_bug.cgi?id=73743
2680
2681         Reviewed by Philippe Normand.
2682
2683         * GNUmakefile.list.am: Add new files to compilation.
2684         * PlatformEfl.cmake: Ditto.
2685         * PlatformGTK.cmake: Ditto.
2686         * loader/SubresourceLoader.h: Add getOrCreateReadBuffer() when
2687         using SOUP.
2688         * loader/cache/CachedRawResource.h:
2689         * loader/cache/CachedRawResourceClient.h:
2690         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer): Added
2691         to allow the client to allocate the read buffer.
2692         * loader/cache/CachedResource.h:
2693         (WebCore::CachedResource::getOrCreateReadBuffer):
2694         * loader/soup/CachedRawResourceSoup.cpp: Added.
2695         (WebCore::CachedRawResource::getOrCreateReadBuffer): Iterate the
2696         clients until one returns a valid read buffer or return NULL to
2697         fallback to the default read buffer.
2698         * loader/soup/SubresourceLoaderSoup.cpp: Added.
2699         (WebCore::SubresourceLoader::getOrCreateReadBuffer): Call
2700         CachedResource::getOrCreateReadBuffer().
2701         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2702         (StreamingClient): Make this a CachedRawResourceClient.
2703         (_WebKitWebSrcPrivate): Remove frame and resourceHandle and add a
2704         cached resource handle.
2705         (webKitWebSrcDispose): Clear the player pointer.
2706         (webKitWebSrcStop): Remove the client from the cached resource.
2707         (webKitWebSrcStart): Use CachedResourceLoader to schedule a
2708         CachedRawResource load for the media without buffering the data.
2709         (webKitWebSrcNeedDataMainCb): Call CachedResource::setDefersLoading.
2710         (webKitWebSrcEnoughDataMainCb): Ditto.
2711         (webKitWebSrcSetMediaPlayer): Simply update the player pointer.
2712         (StreamingClient::responseReceived): Update to the
2713         CachedRawResourceClient API.
2714         (StreamingClient::dataReceived): Ditto.
2715         (StreamingClient::getOrCreateReadBuffer): Ditto.
2716         (StreamingClient::notifyFinished): Ditto.
2717
2718 2013-07-17  Kwang Yul Seo  <skyul@company100.net>
2719
2720         Remove unused member variable m_domURL from WorkerGlobalScope
2721         https://bugs.webkit.org/show_bug.cgi?id=118784
2722
2723         Reviewed by Christophe Dumez.
2724
2725         WorkerContext::webkitURL() was removed in r107082, and this was the
2726         only place where the member variable |m_domURL| in WorkerContext was
2727         mutated. This variable is no longer needed and so it should be removed.
2728
2729         No behavior change.
2730
2731         * workers/WorkerGlobalScope.h:
2732
2733 2013-07-17  Mihai Maerean  <mmaerean@adobe.com>
2734
2735         ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
2736         https://bugs.webkit.org/show_bug.cgi?id=118587
2737
2738         Reviewed by David Hyatt.
2739
2740         The fix consists in not calling containingBlockLogicalHeightForPositioned for flow threads (in
2741         RenderBox::availableLogicalHeightUsing) as it gets to handle the RenderView as it would have been flowed into
2742         the flow thread.
2743
2744         Test: fast/regions/crash-div-outside-body-vertical-rl.html
2745
2746         * rendering/RenderBox.cpp:
2747         (WebCore::RenderBox::availableLogicalHeightUsing):
2748
2749 2013-07-17  Kangil Han  <kangil.han@samsung.com>
2750
2751         Use toHTMLMediaElement
2752         https://bugs.webkit.org/show_bug.cgi?id=118727
2753
2754         Reviewed by Ryosuke Niwa.
2755
2756         To avoid direct use of static_cast, this patch uses toHTMLMediaElement for code cleanup.
2757
2758         * bindings/js/JSHTMLMediaElementCustom.cpp:
2759         (WebCore::JSHTMLMediaElement::setController):
2760         * html/HTMLMediaElement.h:
2761         (WebCore::toHTMLMediaElement):
2762         * html/HTMLSourceElement.cpp:
2763         (WebCore::HTMLSourceElement::insertedInto):
2764         (WebCore::HTMLSourceElement::removedFrom):
2765         * html/HTMLTrackElement.cpp:
2766         (WebCore::HTMLTrackElement::removedFrom):
2767         (WebCore::HTMLTrackElement::mediaElement):
2768         * html/shadow/MediaControlElementTypes.cpp:
2769         (WebCore::toParentMediaElement):
2770         * loader/SubframeLoader.cpp:
2771         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
2772         * page/FrameView.cpp:
2773         (WebCore::FrameView::updateWidget):
2774         * platform/efl/RenderThemeEfl.cpp:
2775         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
2776         (WebCore::RenderThemeEfl::paintMediaMuteButton):
2777         (WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
2778         * platform/graphics/wince/MediaPlayerProxy.cpp:
2779         (WebCore::WebMediaPlayerProxy::initEngine):
2780         (WebCore::WebMediaPlayerProxy::element):
2781         * platform/gtk/RenderThemeGtk.cpp:
2782         (WebCore::getMediaElementFromRenderObject):
2783         * rendering/HitTestResult.cpp:
2784         (WebCore::HitTestResult::mediaElement):
2785         * rendering/RenderLayerBacking.cpp:
2786         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2787         * rendering/RenderLayerCompositor.cpp:
2788         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
2789         * rendering/RenderMedia.cpp:
2790         (WebCore::RenderMedia::mediaElement):
2791         * rendering/RenderThemeMac.mm:
2792         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2793         * rendering/RenderThemeWinCE.cpp:
2794         (WebCore::mediaElementParent):
2795         * testing/Internals.cpp:
2796         (WebCore::Internals::simulateAudioInterruption):
2797
2798 2013-07-16  Ryuan Choi  <ryuan.choi@samsung.com>
2799
2800         Remove Platform(EFL) guard from Widget::frameRectsChanged
2801         https://bugs.webkit.org/show_bug.cgi?id=118782
2802
2803         Reviewed by Christophe Dumez.
2804
2805         Since r58487, Widget::frameRectsChanged was moved to cpp and guarded.
2806         But we can move back to header because WebKit/Efl refactored related code in r145710.
2807
2808         No new tests, refactoring.
2809
2810         * platform/Widget.cpp: Removed platform guard and move frameRectsChangd() back to header.
2811         * platform/Widget.h:
2812         (WebCore::Widget::frameRectsChanged):
2813         * platform/efl/WidgetEfl.cpp:
2814
2815 2013-07-16  Alex Christensen  <achristensen@apple.com>
2816
2817         Update ANGLE to r2426.
2818         https://bugs.webkit.org/show_bug.cgi?id=118550
2819
2820         Reviewed by Dean Jackson.
2821
2822         * CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added builtin_symbol_table.
2823
2824 2013-07-16  Tim Horton  <timothy_horton@apple.com>
2825
2826         Many crashes loading Java applets after r152701
2827         https://bugs.webkit.org/show_bug.cgi?id=118760
2828         <rdar://problem/14462836>
2829
2830         Reviewed by Dean Jackson.
2831
2832         * html/HTMLAppletElement.cpp:
2833         (WebCore::HTMLAppletElement::updateWidget):
2834         Re-acquire the renderer after calling createJavaAppletWidget,
2835         because it can cause reattach, leaving our renderer pointer stale.
2836
2837         * loader/SubframeLoader.cpp:
2838         (WebCore::SubframeLoader::createJavaAppletWidget):
2839         Null-check renderer, as element->renderEmbeddedObject() can very clearly
2840         return null in some cases.
2841
2842 2013-07-16  Pratik Solanki  <psolanki@apple.com>
2843
2844         Missing break in WebGLRenderingContext::validateCompressedTexFuncData()
2845         https://bugs.webkit.org/show_bug.cgi?id=118742
2846
2847         Reviewed by Ryosuke Niwa.
2848
2849         * html/canvas/WebGLRenderingContext.cpp:
2850         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2851
2852 2013-07-16  Andreas Kling  <akling@apple.com>
2853
2854         Atomicize HTMLAnchorElement.hash before passing it to JS.
2855         <http://webkit.org/b/118748>
2856         <rdar://problem/14459780>
2857
2858         Reviewed by Sam Weinig.
2859
2860         Instead of generating a unique string from '#' + the URL hash every time HTMLAnchorElement.hash
2861         is queried, turn it into an AtomicString. This prevents massive memory usage in scripts that
2862         fetch .hash a lot.
2863
2864         Reduces memory consumption by 4.65 MB when viewing the full HTML5 spec at <http://whatwg.org/c>
2865
2866         * html/HTMLAnchorElement.cpp:
2867         (WebCore::HTMLAnchorElement::hash):
2868
2869 2013-07-16  Brendan Long  <b.long@cablelabs.com>
2870
2871         Make WebVTTParser return cue data instead of cue DOM objects
2872         https://bugs.webkit.org/show_bug.cgi?id=118687
2873
2874         Reviewed by Eric Carlson.
2875
2876         No new tests because this doesn't change functionality.
2877
2878         * html/track/InbandTextTrack.cpp:
2879         Make TextTrackCueMap handle WebVTTCues instead of just generic cues.
2880         m_dataToCueMap and m_cueToDataMap were renamed m_genericDataToCueMap
2881         and m_genericCueToDataMap. The cue maps were turned into pointers so we
2882         only allocate the ones we need.
2883         (WebCore::TextTrackCueMap::TextTrackCueMap): Initialize maps to 0.
2884         (WebCore::TextTrackCueMap::~TextTrackCueMap): Delete allocated maps.
2885         (WebCore::TextTrackCueMap::add): Changed to allocate cue maps as needed, and added WebVTT version.
2886         (WebCore::TextTrackCueMap::find): Checked to check if cue maps are allocated, and added WebVTT version.
2887         (WebCore::TextTrackCueMap::findGenericData): Changed to accept TextTrackCue instead of TextTrackCueGeneric.
2888         (WebCore::TextTrackCueMap::findWebVTTData): Same as findGenericData, except for WebVTTCueData.
2889         (WebCore::TextTrackCueMap::remove): Accept TextTrackCue instead of TextTrackCueGeneric, and look in both maps.
2890         (WebCore::InbandTextTrack::addWebVTTCue): Added, based on addGenericCue.
2891         (WebCore::InbandTextTrack::removeWebVTTCue): Added, almost identical to removeGenericCue.
2892         (WebCore::InbandTextTrack::removeCue): m_cueMap.remove() takes a TextTrackCue now so it can remove both types of cue.
2893         (WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Use ASSERT_UNUSED instead of UNUSED_PARAM + ASSERT.
2894         * html/track/InbandTextTrack.h: Add new functions above, change maps to pointers and add maps for holding WebVTT cues.
2895         * html/track/WebVTTParser.cpp:
2896         (WebCore::WebVTTParser::getNewCues): Return WebVTTCueData instead of TextTrackCue.
2897         (WebCore::WebVTTParser::createNewCue): Create WebVTTCueData instead of TextTrackCue.
2898         * html/track/WebVTTParser.h: Add WebVTTCueData class, based on GenericCueData.
2899         The following functions are just constructors, destructors, getters, or setters.
2900         (WebCore::WebVTTCueData::create):
2901         (WebCore::WebVTTCueData::~WebVTTCueData):
2902         (WebCore::WebVTTCueData::startTime):
2903         (WebCore::WebVTTCueData::setStartTime):
2904         (WebCore::WebVTTCueData::endTime):
2905         (WebCore::WebVTTCueData::setEndTime):
2906         (WebCore::WebVTTCueData::id):
2907         (WebCore::WebVTTCueData::setId):
2908         (WebCore::WebVTTCueData::content):
2909         (WebCore::WebVTTCueData::setContent):
2910         (WebCore::WebVTTCueData::settings):
2911         (WebCore::WebVTTCueData::setSettings):
2912         (WebCore::WebVTTCueData::WebVTTCueData):
2913         * loader/TextTrackLoader.cpp:
2914         (WebCore::TextTrackLoader::getNewCues): Convert WebVTTCueData to TextTrackCue when we get them.
2915         * platform/graphics/InbandTextTrackPrivateClient.h: Add addWebVTTCue and removeWebVTTCue functions to the interface.
2916
2917 2013-07-16  Tim Horton  <timothy_horton@apple.com>
2918
2919         Use the correct cursor value for the unavailable plugin indicator
2920         https://bugs.webkit.org/show_bug.cgi?id=118747
2921         <rdar://problem/14456498>
2922
2923         Reviewed by Dean Jackson.
2924
2925         CSS says "pointer" is the hand cursor, not "hand".
2926
2927         * css/unavailablePlugIns.css:
2928         (object::-webkit-unavailable-plugin-content > div):
2929         (object::-webkit-unavailable-plugin-content > div > span):
2930
2931 2013-07-16  Simon Fraser  <simon.fraser@apple.com>
2932
2933         Protect against the LayerFlushController being deleted inside its flushLayers() callback
2934         https://bugs.webkit.org/show_bug.cgi?id=118741
2935
2936         Reviewed by Tim Horton.
2937
2938         It's possible (especially on iOS) for the LayerFlushController to be destroyed
2939         inside its callback, via -[WebView _close]. Protect against this by making
2940         it refcounted, and holding a ref across the callback.
2941         
2942         Due to the odd relationship in which LayerFlushController owns its LayerFlushScheduler
2943         by value, we achieve this by allowing subclasses of LayerFlushScheduler
2944         to override runLoopObserverCallback(). WebViewLayerFlushScheduler uses the
2945         override to protect the owner of the LayerFlushScheduler, which is the
2946         LayerFlushController, when the callback is firing.
2947
2948         * WebCore.exp.in:
2949         * platform/graphics/ca/LayerFlushScheduler.h: Make runLoopObserverCallback() and the dtor virtual.
2950
2951 2013-07-16  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2952
2953         Get rid of multiple inheritance support from the bindings generators
2954         https://bugs.webkit.org/show_bug.cgi?id=118353
2955
2956         Reviewed by Kentaro Hara.
2957
2958         Remove multiple inheritance support from the bindings generators (except
2959         the ObjC one which still needs it for now). Multiple inheritance is no
2960         longer supported in Web IDL and it makes the scripts more complex than
2961         they needs to be.
2962
2963         Multiple inheritance support is no longer needed now that our SVG
2964         interfaces have been updated to use the simpler SVG2 inheritance model
2965         and use Web IDL 'implements' statements.
2966
2967         Note that the IDL parser still support multiple inheritance for now in
2968         order not to break the ObjC bindings generator.
2969
2970         No new tests, no behavior change.
2971
2972         * bindings/scripts/CodeGenerator.pm:
2973         * bindings/scripts/CodeGeneratorCPP.pm:
2974         (GetParentImplClassName):
2975         (GetParent):
2976         (GenerateImplementation):
2977         * bindings/scripts/CodeGeneratorGObject.pm:
2978         (GetParentClassName):
2979         (GetParentImplClassName):
2980         (GetParentGObjType):
2981         * bindings/scripts/CodeGeneratorJS.pm:
2982         (GetParentClassName):
2983         (GenerateHeader):
2984         (GenerateImplementation):
2985         (GenerateConstructorDefinition):
2986         * bindings/scripts/CodeGeneratorObjC.pm:
2987         (AddMethodsConstantsAndAttributesFromParentInterfaces):
2988         (GenerateImplementation):
2989         * bindings/scripts/IDLParser.pm:
2990         (parseInterface):
2991         (parseException):
2992         (parseInheritance):
2993
2994 2013-07-16  Eric Carlson  <eric.carlson@apple.com>
2995
2996         HTMLMediaElement should not add cues for disabled text tracks
2997         https://bugs.webkit.org/show_bug.cgi?id=118682
2998
2999         Reviewed by Ryosuke Niwa.
3000
3001         Merge https://src.chromium.org/viewvc/blink?view=rev&revision=153810
3002
3003         Tests: media/track/track-disabled-addcue.html
3004                media/track/track-disabled.html
3005
3006         * html/HTMLMediaElement.cpp:
3007         (WebCore::HTMLMediaElement::textTrackAddCues): Do nothing if the track is disabled.
3008         (WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
3009
3010 2013-07-16  Krzysztof Czech  <k.czech@ymail.com>
3011
3012         [ATK] Adds support for aria-haspopup property.
3013         https://bugs.webkit.org/show_bug.cgi?id=117834
3014
3015         Reviewed by Christophe Dumez.
3016
3017         Adds support for aria-haspopup property.
3018
3019         Tests: accessibility/element-haspopup.html
3020                accessibility/popup-button-title.html
3021
3022         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3023         (webkitAccessibleGetAttributes):
3024
3025 2013-07-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3026
3027         [texmap][GStreamer] upload onto the texture only the buffer to be painted
3028         https://bugs.webkit.org/show_bug.cgi?id=118471
3029
3030         Reviewed by Philippe Normand.
3031
3032         Right now all the buffers are uploaded onto the texture. With this
3033         logic pose situations where buffers that will not be painted are
3034         uploaded.
3035
3036         This patch uploads only the buffers that are going to be shown.
3037
3038         With this approach, the buffers may arrive before a GraphicsLayer is
3039         set, so we should be more cautious with GraphicsLayerTextureMapper's
3040         client.
3041
3042         No new tests, covered by existing tests.
3043
3044         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3045         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
3046         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3047         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3048         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3049         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
3050         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3051         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3052         (WebCore::GraphicsLayerTextureMapper::~GraphicsLayerTextureMapper):
3053         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
3054
3055 2013-07-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3056
3057         [GStreamer] verify and log the received caps in the video sink
3058         https://bugs.webkit.org/show_bug.cgi?id=118559
3059
3060         Reviewed by Philippe Normand.
3061
3062         Verify the correctness of the received caps in the video sink, and
3063         also log them for debugging purposes.
3064
3065         No new tests, no behavior change.
3066
3067         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3068         (webkitVideoSinkSetCaps):
3069
3070 2013-07-16  Kangil Han  <kangil.han@samsung.com>
3071
3072         Use toHTMLSelectElement and dismiss isHTMLSelectElement
3073         https://bugs.webkit.org/show_bug.cgi?id=118714
3074
3075         Reviewed by Ryosuke Niwa.
3076
3077         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
3078         Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
3079
3080         * html/HTMLSelectElement.h:
3081         (WebCore::toHTMLSelectElement):
3082         * testing/Internals.cpp:
3083         (WebCore::Internals::isSelectPopupVisible):
3084
3085 2013-07-15  Yuta Kitamura  <yutak@chromium.org>
3086
3087         Fix a crash in Range::processContents().
3088
3089         NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
3090         https://bugs.webkit.org/show_bug.cgi?id=77614
3091
3092         Reviewed by Ryosuke Niwa.
3093
3094         This change is ported from Blink revision 153483:
3095         https://src.chromium.org/viewvc/blink?revision=153483&view=revision
3096
3097         This crash can be initiated by calling Range.detach() while deleteContents()
3098         is processing the same range. Range::processContents() should save the state
3099         of the range since mutation events can change the state of the range.
3100
3101         Test: fast/dom/Range/detach-range-during-deletecontents.html
3102
3103         * dom/Range.cpp:
3104         (WebCore::Range::processContents):
3105         * dom/RangeBoundaryPoint.h:
3106         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
3107
3108 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3109
3110         Input element that becomes visible during a simulated click event from an associated label element doesn't get focused
3111         https://bugs.webkit.org/show_bug.cgi?id=118700
3112
3113         Reviewed by Kent Tamura.
3114
3115         Inspired by https://chromium.googlesource.com/chromium/blink/+/6435f70d53403b250e261a914f30d55142f81476.
3116
3117         The bug was caused by isMouseFocusable() check in HTMLLabelElement::defaultEventHandler not updating the layout even
3118         though the call to dispatchSimulatedClick may have dirtied the render tree.
3119
3120         Explicitly update the layout so that we have up-to-date render tree.
3121
3122         Test: fast/forms/label/label-becomes-visible-while-clicking-on-label.html
3123
3124         * html/HTMLLabelElement.cpp:
3125         (WebCore::HTMLLabelElement::defaultEventHandler):
3126
3127 2013-07-15  Kangil Han  <kangil.han@samsung.com>
3128
3129         Introduce toHTMLIFrameElement
3130         https://bugs.webkit.org/show_bug.cgi?id=118672
3131
3132         Reviewed by Ryosuke Niwa.
3133
3134         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
3135
3136         * bindings/js/JSHTMLDocumentCustom.cpp:
3137         (WebCore::JSHTMLDocument::nameGetter):
3138         * css/StyleResolver.cpp:
3139         (WebCore::StyleResolver::adjustRenderStyle):
3140         * dom/Document.cpp:
3141         (WebCore::Document::seamlessParentIFrame):
3142         * html/HTMLIFrameElement.h:
3143         (WebCore::toHTMLIFrameElement):
3144         * rendering/RenderEmbeddedObject.cpp:
3145         (WebCore::RenderEmbeddedObject::viewCleared):
3146         * rendering/RenderIFrame.cpp:
3147         (WebCore::RenderIFrame::isSeamless):
3148         (WebCore::RenderIFrame::flattenFrame):
3149
3150 2013-07-15  Chris Rogers  <crogers@google.com>
3151
3152         Add support for WaveShaperNode.oversample
3153         https://bugs.webkit.org/show_bug.cgi?id=117435
3154
3155         Reviewed by Kenneth Russell.
3156
3157         Adapted from Blink:
3158         https://codereview.chromium.org/15619003/
3159
3160         Please see specification for details:
3161         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveShaperNode
3162
3163         .oversample specifies what type of oversampling (if any) should be used when applying the shaping curve.
3164         The default value is "none", meaning the curve will be applied directly to the input samples.
3165         A value of "2x" or "4x" can improve the quality of the processing by avoiding some aliasing,
3166         with the "4x" value yielding the highest quality.
3167
3168         Tests: webaudio/waveshaper-oversample-2x.html
3169                webaudio/waveshaper-oversample-4x.html
3170
3171         * CMakeLists.txt:
3172         * GNUmakefile.list.am:
3173         * Modules/webaudio/WaveShaperDSPKernel.cpp:
3174         (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
3175         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
3176         (WebCore::WaveShaperDSPKernel::process):
3177         (WebCore::WaveShaperDSPKernel::processCurve):
3178         (WebCore::WaveShaperDSPKernel::processCurve2x):
3179         (WebCore::WaveShaperDSPKernel::processCurve4x):
3180         (WebCore::WaveShaperDSPKernel::reset):
3181         (WebCore::WaveShaperDSPKernel::latencyTime):
3182         * Modules/webaudio/WaveShaperDSPKernel.h:
3183         * Modules/webaudio/WaveShaperNode.cpp:
3184         (WebCore::WaveShaperNode::WaveShaperNode):
3185         (WebCore::WaveShaperNode::setOversample):
3186         (WebCore::WaveShaperNode::oversample):
3187         * Modules/webaudio/WaveShaperNode.h:
3188         (WebCore::WaveShaperNode::latency):
3189         * Modules/webaudio/WaveShaperNode.idl:
3190         * Modules/webaudio/WaveShaperProcessor.cpp:
3191         (WebCore::WaveShaperProcessor::WaveShaperProcessor):
3192         (WebCore::WaveShaperProcessor::setOversample):
3193         * Modules/webaudio/WaveShaperProcessor.h:
3194         (WebCore::WaveShaperProcessor::oversample):
3195         * WebCore.xcodeproj/project.pbxproj:
3196         * platform/audio/DownSampler.cpp: Added.
3197         (WebCore::DownSampler::DownSampler):
3198         (WebCore::DownSampler::initializeKernel):
3199         (WebCore::DownSampler::process):
3200         (WebCore::DownSampler::reset):
3201         (WebCore::DownSampler::latencyFrames):
3202         * platform/audio/DownSampler.h: Added.
3203         * platform/audio/UpSampler.cpp: Added.
3204         (WebCore::UpSampler::UpSampler):
3205         (WebCore::UpSampler::initializeKernel):
3206         (WebCore::UpSampler::process):
3207         (WebCore::UpSampler::reset):
3208         (WebCore::UpSampler::latencyFrames):
3209         * platform/audio/UpSampler.h: Added.
3210
3211 2013-07-15  Tim Horton  <timothy_horton@apple.com>
3212
3213         Update blocked/missing plug-in UI
3214         https://bugs.webkit.org/show_bug.cgi?id=118347
3215         <rdar://problem/14209318>
3216
3217         Reviewed by Sam Weinig.
3218         Patch by Anders Carlsson, Antoine Quint, Sam Weinig, and myself.
3219
3220         * CMakeLists.txt:
3221         * DerivedSources.make:
3222         * DerivedSources.pri:
3223         * GNUmakefile.am:
3224         * WebCore.exp.in:
3225         * WebCore.vcxproj/WebCore.vcxproj:
3226         * WebCore.vcxproj/WebCore.vcxproj.filters:
3227         * WebCore.xcodeproj/project.pbxproj:
3228         * css/CSSDefaultStyleSheets.cpp:
3229         * css/unavailablePlugIns.css: Added.
3230         Add new Source/WebCore/css/unavailablePlugIns.css stylesheet.
3231
3232         * dom/EventListener.h:
3233         New event listener type to support the creation of an event listener
3234         for the label and icon for missing / blocked plug-in UI.
3235
3236         * html/HTMLPlugInElement.cpp:
3237         (WebCore::HTMLPlugInElement::defaultEventHandler):
3238         Remove explicit event handling since we're now using a DOM event handler
3239         on the label and icon in the shadow root.
3240
3241         * html/HTMLPlugInImageElement.cpp:
3242         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3243         Don't populate the shadow root with plugin snapshotting elements
3244         if we're not planning on showing a snapshot, because this means that
3245         the shadow root was created for the unavailable plugin indicator instead.
3246
3247         * page/ChromeClient.h:
3248         (WebCore::ChromeClient::shouldUnavailablePluginMessageIncludeButton):
3249         * rendering/RenderEmbeddedObject.cpp:
3250         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
3251         (WebCore::shouldUnavailablePluginMessageIncludeButton):
3252         Rename from shouldUnavailablePluginMessageBeButton to
3253         shouldUnavailablePluginMessageIncludeButton for accuracy.
3254
3255         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonDescription):
3256         Set custom text to be displayed in the unavailability indicator.
3257
3258         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
3259         (WebCore::RenderEmbeddedObject::handleUnavailablePluginButtonClickEvent):
3260         (WebCore::RenderEmbeddedObject::willBeDestroyed):
3261         (WebCore::RenderEmbeddedObject::isReplacementObscured):
3262         (WebCore::RenderEmbeddedObjectEventListener::handleEvent):
3263         (WebCore::RenderEmbeddedObjectEventListener::operator==):
3264         Remove the old code used to render the missing / blocked plug-in UI in C++ in favor
3265         of populating a shadow root in setPluginUnavailabilityReason(). We add a DOM event
3266         listener in the shadow root to eventually call into unavailablePluginButtonClicked()
3267         on the ChromeClient.
3268
3269         (WebCore::RenderEmbeddedObject::paint):
3270         (WebCore::RenderEmbeddedObject::layout):
3271         Paint and lay out UA shadow root children.
3272
3273         (WebCore::RenderEmbeddedObject::canHaveChildren):
3274         canHaveChildren can use the existence of a UA shadow root to decide
3275         whether a RenderEmbeddedObject can have children.
3276
3277         * rendering/RenderEmbeddedObject.h:
3278         (WebCore::RenderEmbeddedObjectEventListener::create):
3279         (WebCore::RenderEmbeddedObjectEventListener::cast):
3280         (WebCore::RenderEmbeddedObjectEventListener::RenderEmbeddedObjectEventListener):
3281         Create the new event listener class necessary to handle events in the shadow root.
3282
3283         (WebCore::RenderEmbeddedObject::pluginUnavailabilityReasonDescription): Added.
3284
3285         * rendering/RenderWidget.h:
3286         Promote willBeDestroyed() to be public so we may override it in the RenderEmbeddedObject subclass.
3287
3288 2013-07-15  Andreas Kling  <akling@apple.com>
3289
3290         Pack WebCore::Font slightly better.
3291         <http://webkit.org/b/118681>
3292         <rdar://problem/14446014>
3293
3294         Reviewed by Sam Weinig.
3295
3296         Knock 8 bytes off of Font by packing the members better. Reduces memory consumption by 429 kB when
3297         viewing the full HTML5 spec at <http://whatwg.org/c>
3298
3299         * platform/graphics/Font.h:
3300         (WebCore::Font::typesettingFeatures):
3301
3302 2013-07-15  Rob Buis  <rwlbuis@webkit.org>
3303
3304         XMLSerializer doesn't include namespaces on nodes in HTML documents
3305         https://bugs.webkit.org/show_bug.cgi?id=16496
3306
3307         Reviewed by Ryosuke Niwa.
3308
3309         Introduce a xml fragment serialization mode as indicated by
3310         http://html5.org/specs/dom-parsing.html#xmlserializer (commit 00b84d2). In this mode
3311         the XML fragment serialization algorithm is respected, the changes in this patch do the following:
3312
3313         - elements are self-closing if otherwise this would lead to invalid xml syntax.
3314         - the resulting xml is XML namespace-well-formed (http://www.w3.org/TR/xml-names11/#Conformance).
3315         This is achieved by always, when in xml fragment serialization mode, attempting to write out the element/attribute namespace,
3316         preventing using the XML namespace as a default namespace and special casing the use of element's in XML namespace by using the xml prefix.
3317
3318         The chosen approach matches FireFox 25 behavior.
3319
3320         Test: fast/dom/dom-serialize-namespace.html
3321
3322         * WebCore.order: Adapt to changed createMarkup signature.
3323         * editing/MarkupAccumulator.cpp:
3324         (WebCore::MarkupAccumulator::MarkupAccumulator):
3325         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): makes sure xml namespace/prefix is known so it is never used in namespace declarations.
3326         (WebCore::MarkupAccumulator::appendNamespace): Avoid adding namespace declarations that do not differ from current default namespace.
3327         (WebCore::MarkupAccumulator::appendOpenTag): Print xml prefix if the element's namespace is XML to avoid conflicts.
3328         (WebCore::MarkupAccumulator::appendAttribute):
3329         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Also take into account xmlns attributes with no namespace.
3330         (WebCore::MarkupAccumulator::shouldSelfClose): Force self-closing to create well-formed XML elements.
3331         * editing/MarkupAccumulator.h: Use EFragmentSerialization.
3332         (WebCore::MarkupAccumulator::inXMLFragmentSerialization):
3333         * editing/markup.cpp:
3334         (WebCore::createMarkup):
3335         * editing/markup.h: Add EFragmentSerialization enum.
3336         * xml/XMLSerializer.cpp:
3337         (WebCore::XMLSerializer::serializeToString):
3338
3339 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3340
3341         MediaFragmentURIParser::parseFragments shouldn't upconvert 8-bit string
3342         https://bugs.webkit.org/show_bug.cgi?id=118692
3343
3344         Reviewed by Michael Saboff.
3345
3346         Merge https://chromium.googlesource.com/chromium/blink/+/2aa17cc56a807f7e05d386d6eb66cda25e6b0542.
3347
3348         * html/MediaFragmentURIParser.cpp:
3349         (WebCore::MediaFragmentURIParser::parseFragments):
3350
3351 2013-07-15  Kwang Yul Seo  <skyul@company100.net>
3352
3353         NetworkStorageSession::createDefaultSession is only implemented by Soup
3354         https://bugs.webkit.org/show_bug.cgi?id=118679
3355
3356         Reviewed by Alexey Proskuryakov.
3357
3358         Remove NetworkStorageSession::createDefaultSession() because
3359         NetworkStorageSession::defaultStorageSession() returns the default
3360         session.
3361
3362         No new tests, no behavior change.
3363
3364         * platform/network/NetworkStorageSession.h:
3365         * platform/network/soup/NetworkStorageSessionSoup.cpp:
3366
3367 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3368
3369         compositionstart event should contain the text to be replaced
3370         https://bugs.webkit.org/show_bug.cgi?id=118684
3371
3372         Reviewed by Alexey Proskuryakov.
3373
3374         Merge https://chromium.googlesource.com/chromium/blink/+/9e04f728a95ad7d4783b1d31c3cdc1412dd6cc4d.
3375
3376         DOM3 level 3 specifies compositionstart event's data to be the text to be replaced.
3377         http://www.w3.org/TR/DOM-Level-3-Events/#event-type-compositionstart
3378
3379         According to the author of the Blink change, IE10 on Windows and Firefox22 on Linux confirms
3380         to the specified behavior.
3381
3382         Test: fast/events/ime-composition-events-001.html
3383
3384         * editing/Editor.cpp:
3385         (WebCore::Editor::setComposition):
3386
3387 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3388
3389         xmlDocPtrForString shouldn't upconvert 8-bit string
3390         https://bugs.webkit.org/show_bug.cgi?id=118693
3391
3392         Reviewed by Michael Saboff.
3393
3394         Merge https://chromium.googlesource.com/chromium/blink/+/5d9b240db74591c3689415c7b7c5180fadb379e9
3395
3396         Prior to this changeset, we were upconverting the entire XML document.
3397         Let xmllib2 parse a document as iso-8859-1 when it's a 8-bit string.
3398
3399         * xml/parser/XMLDocumentParserLibxml2.cpp:
3400         (WebCore::nativeEndianUTF16Encoding):
3401         (WebCore::xmlDocPtrForString):
3402
3403 2013-07-15  Roger Fong  <roger_fong@apple.com>
3404
3405         Replace WKCACFTypes include with d3d9 include.
3406
3407         Rubberstamped by Eric Carlson.
3408
3409         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3410
3411 2013-07-15  Antoine Quint  <graouts@apple.com>
3412
3413         Text with "text-overflow:ellipsis" and an SVG font do not render correctly
3414         https://bugs.webkit.org/show_bug.cgi?id=118669
3415
3416         Reviewed by David Kilzer.
3417
3418         Partial runs may be routed through the complex path in several Font functions. While incomplete,
3419         we can check for a non-NULL run.renderingContext() and exempt runs that have it from being forced
3420         down the complex path. A more thorough fix is already tracked by http://webkit.org/b/100050.
3421
3422         Adding a new testcase which is a copy of svg/text/text-overflow-ellipsis-svgfont.html with kerning
3423         and ligatures turned on explicitly since DRT runs with those off by default and this option is required
3424         to be on for the issue to reproduce.
3425
3426         Fix courtesy of Dan Bernstein.
3427
3428         Test: svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
3429
3430         * platform/graphics/Font.cpp:
3431         (WebCore::Font::drawText):
3432         (WebCore::Font::drawEmphasisMarks):
3433         (WebCore::Font::selectionRectForText):
3434
3435 2013-07-15  peavo@outlook.com  <peavo@outlook.com>
3436
3437         [Curl] Download does not replace existing file.
3438         https://bugs.webkit.org/show_bug.cgi?id=118356
3439
3440         Reviewed by Brent Fulgham.
3441
3442         If the download target file already exists, it is not replaced after the download has finished.
3443         At this point, the user would have already approved to replace the file, so it should be replaced.
3444
3445         * platform/network/curl/CurlDownload.cpp:
3446         (CurlDownload::moveFileToDestination): Move file and replace it if it already exists.
3447         If the new file is on a different volume, do a copy/delete operation.
3448
3449 2013-07-15  Luciano Wolf  <luciano.wolf@openbossa.org>
3450
3451         [CoordinatedGraphics] Crash at CoordinatedGraphicsScene::updateImageBacking
3452         https://bugs.webkit.org/show_bug.cgi?id=118613
3453
3454         The operations of creating/removing/updating/clearing weren't in the
3455         right sequence. Changing the order solves the issue because when an image is
3456         replaced the old one is deleted before the new one is created, and IDs are
3457         not unique in cairo (they're based on the image pointer).
3458
3459         Reviewed by Noam Rosenthal.
3460
3461         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3462         (WebCore::CoordinatedGraphicsScene::syncImageBackings):
3463
3464 2013-07-15  Brian Holt  <brian.holt@samsung.com>
3465
3466         [ATK] Leak: Leak in WebKitAccessibleTextGetText
3467         https://bugs.webkit.org/show_bug.cgi?id=118596