[EFL][WebGL] Refactor GLPlatformSurface.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-23  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2
3         [EFL][WebGL] Refactor GLPlatformSurface.
4         https://bugs.webkit.org/show_bug.cgi?id=110616
5
6         Reviewed by Kenneth Rohde Christiansen.
7
8         Covered by existing WebGL tests.
9  
10         With recent changes, there is a clear separation between 
11         transport surface and off-screen surface. PlatformSurface 
12         has the logic to render content to transport surface. 
13         We currently rely on EXT_framebuffer_blit for this. This 
14         extension is not exposed on GLES2.0. PlatformSurface was 
15         supposed to be an abstraction layer without any knowledge 
16         of the type of surface. This patch addresses the issues 
17         in PlatformSurface class. We use shaders to draw texture 
18         content to the surface. Any transport surface related 
19         code in PlatformSurface is moved to GLTransportSurface class.
20
21         * PlatformEfl.cmake:
22         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
23         (WebCore::GraphicsContext3DPrivate::didResizeCanvas):
24         * platform/graphics/surfaces/GLTransportSurface.cpp: Added.
25         (WebCore):
26         (WebCore::GLTransportSurface::GLTransportSurface):
27         (WebCore::GLTransportSurface::~GLTransportSurface):
28         (WebCore::GLTransportSurface::updateContents):
29         (WebCore::GLTransportSurface::setGeometry):
30         (WebCore::GLTransportSurface::destroy):
31         (WebCore::GLTransportSurface::draw):
32         (WebCore::GLTransportSurface::bindArrayBuffer):
33         (WebCore::GLTransportSurface::updateTransformationMatrix):
34         (WebCore::GLTransportSurface::initializeShaderProgram):
35         * platform/graphics/surfaces/GLTransportSurface.h:
36         (WebCore):
37         (GLTransportSurface):
38         * platform/graphics/surfaces/egl/EGLSurface.cpp:
39         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
40         (WebCore::EGLWindowTransportSurface::destroy):
41         (WebCore::EGLWindowTransportSurface::setGeometry):
42         * platform/graphics/surfaces/egl/EGLSurface.h:
43         * platform/graphics/surfaces/glx/GLXSurface.cpp:
44         (WebCore::GLXTransportSurface::GLXTransportSurface):
45         (WebCore::GLXTransportSurface::setGeometry):
46         (WebCore::GLXTransportSurface::destroy):
47         (WebCore::GLXOffScreenSurface::freeResources):
48         * platform/graphics/surfaces/glx/GLXSurface.h:
49
50 2013-02-23  Hajime Morrita  <morrita@google.com>
51
52         ShadowRoot needs guardRef() and guardDeref()
53         https://bugs.webkit.org/show_bug.cgi?id=109777
54
55         Reviewed by Dimitri Glazkov.
56
57         This change moves m_guardRefCount from Document to TreeScope,
58         which allows ShadowRoot to be guarded by guardRef() mechanism as
59         Document. After r137524, Node referes TreeScope instead of
60         Document. This is natural consequence of the change: It no longer
61         makes sense to guardRef() Document pointer from Node.
62
63         Detail:
64
65         - Document::m_guardRefCount and related funcdtions are moved to TreeScope
66         - Document::removedLastRef is factored out into TreeScope::removedLastRefToScope(),
67           TreeScope::dispose() and Docuent::dispose(). ShadowRoot also got its own dispose() implementation.
68         - Moved guardRef() and guardDeref() calls to TreeScope and Node.
69           Note that there are two "guarded" TreeScope references. One is
70           Node::m_treeScope and another is TreeScope::m_parentTreeScope.
71           The guarded-ref management is now encapsulated in these two classes.
72
73         No new tests. Covered by existing tests.
74
75         * WebCore.exp.in:
76         * dom/Document.cpp:
77         (WebCore::Document::Document):
78         (WebCore::Document::~Document):
79         (WebCore::Document::dispose): Extracted from removedLastRef()
80         * dom/Document.h:
81         (WebCore::Node::isTreeScope):
82         (WebCore::Node::Node):
83         * dom/DocumentFragment.cpp:
84         (WebCore::DocumentFragment::DocumentFragment): Remove ASSERT() and move it to ...
85         (WebCore::DocumentFragment::create): ... here, to allow NULL document from ShadowRoot.
86         * dom/Node.cpp:
87         (WebCore::Node::~Node):
88         (WebCore::Node::removedLastRef):
89         * dom/Node.h:
90         (WebCore::Node::setTreeScope):
91         * dom/ShadowRoot.cpp:
92         (WebCore::ShadowRoot::ShadowRoot): Passed NULL document to superclass. This aligns what Document is doing.
93         (WebCore::ShadowRoot::dispose): Added.
94         * dom/ShadowRoot.h:
95         (ShadowRoot):
96         * dom/TreeScope.cpp:
97         (SameSizeAsTreeScope):
98         (WebCore::TreeScope::TreeScope):
99         (WebCore::TreeScope::~TreeScope):
100         (WebCore::TreeScope::dispose): Added.
101         (WebCore::TreeScope::setParentTreeScope):
102         (WebCore::TreeScope::deletionHasBegun):
103         (WebCore::TreeScope::beginDeletion):
104         (WebCore::TreeScope::refCount): Added.
105         * dom/TreeScope.h: Turned m_rootNode to Node* from ContainerNode* for Node::isTreeScope to be inlined.
106         (WebCore::TreeScope::guardRef): Pulled up from Document.
107         (WebCore::TreeScope::guardDeref): Ditto.
108         (WebCore::TreeScope::hasGuardRefCount): Added to hide m_guardRefCount.
109         (WebCore::TreeScope::deletionHasBegun): Added.
110         (WebCore::TreeScope::beginDeletion): Added.
111         (WebCore::TreeScope::removedLastRefToScope): Pulled up from Document.
112         * dom/TreeScopeAdopter.cpp:
113         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
114         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
115
116 2013-02-23  Alexey Proskuryakov  <ap@apple.com>
117
118         Don't include ResourceHandle.h in ResourceLoaderOptions.h
119         https://bugs.webkit.org/show_bug.cgi?id=110662
120
121         Reviewed by Tim Horton.
122
123         * loader/ResourceLoaderOptions.h: Include ResourceHandleTypes.h instead.
124
125 2013-02-23  Jason Anderssen  <janderssen@gmail.com>
126
127         Move setAutofilled from TestRunner to WebCore
128         https://bugs.webkit.org/show_bug.cgi?id=110521
129
130         Reviewed by Benjamin Poulain.
131
132         * testing/Internals.cpp:
133         (WebCore):
134         (WebCore::Internals::setAutofilled):
135         * testing/Internals.h:
136         (Internals):
137         * testing/Internals.idl:
138
139 2013-02-22  Andreas Kling  <akling@apple.com>
140
141         Attr: Simplify modification callbacks.
142         <http://webkit.org/b/110598>
143
144         Reviewed by Antti Koivisto.
145
146         Instead of Attr being a friend of Element and grabbing at various internal storage and callbacks,
147         let Attr simply call Element::setAttribute() when its value is changed, and do all that business
148         from Element.
149
150         * dom/Element.h:
151         * dom/Element.cpp:
152         (WebCore::Element::setAttributeInternal):
153
154             Call Attr::recreateTextChildAfterAttributeValueChanged() after modifying an attribute value instead
155             of doing the modification through the Attr node.
156
157         * dom/Attr.h:
158         * dom/Attr.cpp:
159         (WebCore::Attr::Attr):
160         (WebCore::Attr::childrenChanged):
161
162             Added an m_inChildrenChanged flag so we can prevent infinite callback recursion in childrenChanged().
163
164         (WebCore::Attr::setValue):
165
166             Call Element::setAttribute() instead of modifying the attribute storage directly.
167
168         (WebCore::Attr::recreateTextChildAfterAttributeValueChanged):
169
170             Factored out the "remove all children / create a new text child with attribute value" logic into
171             a separate function.
172
173 2013-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
174
175         [EFL] Use EINA_LOG instead of fprintf 
176         https://bugs.webkit.org/show_bug.cgi?id=110313
177
178         Reviewed by Laszlo Gombos.
179
180         Replace fprintf with EINA_LOG.
181
182         * platform/efl/NetworkInfoProviderEfl.cpp:
183         (WebCore::NetworkInfoProviderEfl::startUpdating):
184         * platform/graphics/efl/CairoUtilitiesEfl.cpp:
185         (WebCore::evasObjectFromCairoImageSurface):
186
187 2013-02-22  Tony Gentilcore  <tonyg@chromium.org>
188
189         Threaded HTML parser fails resources/plain-text-unsafe.dat
190         https://bugs.webkit.org/show_bug.cgi?id=110538
191
192         Reviewed by Eric Seidel.
193
194         With this patch, the background HTML parser passes all tests in plain-text-unsafe.dat.
195
196         No new tests because covered by existing tests.
197
198         * html/parser/BackgroundHTMLParser.cpp:
199         (WebCore::tokenExitsSVG):
200         (WebCore):
201         (WebCore::tokenExitsMath):
202         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
203
204 2013-02-22  Tony Gentilcore  <tonyg@chromium.org>
205
206         Correct InspectorInstrumentation for background HTML parser
207         https://bugs.webkit.org/show_bug.cgi?id=110678
208
209         Reviewed by Adam Barth.
210
211         resumeParsingAfterScriptExecution potentially calls processParsedChunkFromBackgroundParser multiple times
212         without yielding. So it is not correct to count each of those as a separate ParseHTML event.
213
214         This patch moves the instrumentation outside of the loop.
215
216         No new tests because no new functionality.
217
218         * html/parser/HTMLDocumentParser.cpp:
219         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
220         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
221         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
222
223 2013-02-22  Aaron Colwell  <acolwell@chromium.org>
224
225         Factor MediaSource methods out of MediaPlayer & MediaPlayerPrivate and into a new MediaSourcePrivate interface.
226         https://bugs.webkit.org/show_bug.cgi?id=109857
227
228         Reviewed by Adam Barth.
229
230         This is a simple refactor that moves MediaSource related methods out of MediaPlayer & MediaPlayerPrivate
231         so that the MediaSource implementation can be updated without further polluting these interfaces.
232         MediaSourcePrivate is the new WebCore interface that ports must implement to support the MediaSource API.
233
234         No new tests. No user visible behavior has changed.
235
236         * Modules/mediasource/MediaSource.cpp:
237         (WebCore::MediaSource::MediaSource):
238         (WebCore::MediaSource::duration):
239         (WebCore::MediaSource::setDuration):
240         (WebCore::MediaSource::addSourceBuffer):
241         (WebCore::MediaSource::removeSourceBuffer):
242         (WebCore::MediaSource::setReadyState):
243         (WebCore::MediaSource::endOfStream):
244         (WebCore::MediaSource::buffered):
245         (WebCore::MediaSource::append):
246         (WebCore::MediaSource::abort):
247         (WebCore::MediaSource::setTimestampOffset):
248         (WebCore::MediaSource::setPrivateAndOpen):
249         (WebCore):
250         (WebCore::MediaSource::hasPendingActivity):
251         (WebCore::MediaSource::stop):
252         * Modules/mediasource/MediaSource.h:
253         (MediaSource):
254         * html/HTMLMediaElement.cpp:
255         (WebCore::HTMLMediaElement::HTMLMediaElement):
256         (WebCore::HTMLMediaElement::loadResource):
257         (WebCore::HTMLMediaElement::createMediaPlayer):
258         (WebCore::HTMLMediaElement::reportMemoryUsage):
259         * html/HTMLMediaElement.h:
260         (HTMLMediaElement):
261         * platform/graphics/MediaPlayer.cpp:
262         (NullMediaPlayerPrivate):
263         (WebCore::NullMediaPlayerPrivate::load):
264         (WebCore::MediaPlayer::load):
265         (WebCore):
266         (WebCore::MediaPlayer::loadWithNextMediaEngine):
267         * platform/graphics/MediaPlayer.h:
268         (WebCore):
269         (MediaPlayerClient):
270         (MediaPlayer):
271         * platform/graphics/MediaPlayerPrivate.h:
272         (MediaPlayerPrivateInterface):
273         * platform/graphics/MediaSourcePrivate.h: Added.
274         (WebCore):
275         (MediaSourcePrivate): Contains the MediaSource methods extracted from MediaPlayer.
276         (WebCore::MediaSourcePrivate::MediaSourcePrivate):
277         (WebCore::MediaSourcePrivate::~MediaSourcePrivate):
278
279 2013-02-22  Beth Dakin  <bdakin@apple.com>
280
281         RenderLayer::scrollTo() should call FrameLoaderClient::didChangeScrollOffset()
282         https://bugs.webkit.org/show_bug.cgi?id=110673
283         -and corresponding-
284         <rdar://problem/13258596>
285
286         Reviewed by Sam Weinig.
287
288         FrameLoaderClient::didChangeScrollOffset() doesn't get called for web pages that
289         have overflow on the body. We can easily address this by calling it at the 
290         end of RenderLayer::scrollTo().
291
292         * rendering/RenderLayer.cpp:
293         (WebCore::RenderLayer::scrollTo):
294
295 2013-02-22  Ryosuke Niwa  <rniwa@webkit.org>
296
297         WebKit can erroneously strip font-size CSS property from font element with size attribute
298         https://bugs.webkit.org/show_bug.cgi?id=110657
299
300         Reviewed by Justin Garcia.
301
302         The bug was caused by ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
303         erroneously removing style attributes even on an element such as font that implicitly adds
304         editing style.
305
306         Fixed the bug by removing these elements or attributes when they conflict with the inline
307         style of the element. This is always safe because implicit style of an element is always
308         overridden by that of inline style.
309
310         Note that when the font element becomes "empty" (i.e. doesn't have any attributes), then
311         we also want to delete this font element as it doesn't contribute anything to the style.
312
313         Test: editing/pasteboard/insert-u-with-text-decoration-none.html
314               editing/pasteboard/insert-font-with-size-and-css.html
315
316         * editing/ApplyStyleCommand.cpp:
317         (WebCore::isEmptyFontTag): Added ShouldStyleAttributeBeEmpty as an argument. This will
318         allow removeRedundantStylesAndKeepStyleSpanInline to ignore style attribute when we know
319         the attribute can be removed.
320
321         * editing/ApplyStyleCommand.h: Expose isEmptyFontTag and ShouldStyleAttributeBeEmpty.
322
323         * editing/ReplaceSelectionCommand.cpp:
324         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Added.
325         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): See above.
326         * editing/ReplaceSelectionCommand.h:
327         (InsertedNodes): Added a declaration of didReplaceNode.
328
329 2013-02-22  Laszlo Gombos  <l.gombos@samsung.com>
330
331         Remove unused make variable from DerivedSources.make
332         https://bugs.webkit.org/show_bug.cgi?id=110306
333
334         Reviewed by Alexey Proskuryakov.
335
336         r107026 removed the last piece of logic that was guarded with
337         ENABLE_DASHBOARD_SUPPORT, so now it can be removed from
338         DerivedSources.make. 
339
340         Also combined the way ENABLE_ORIENTATION_EVENTS is set to 0
341         to make it more readable.
342
343         No new tests, no new functionality.
344
345         * DerivedSources.make:
346
347 2013-02-22  Dimitri Glazkov  <dglazkov@chromium.org>
348
349         REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover
350         https://bugs.webkit.org/show_bug.cgi?id=109230
351
352         In r130089, I accidentally removed the extra check that made scrollbar
353         parts styles sad. I put it back and made them happy.
354
355         Reviewed by Eric Seidel.
356
357         Test: fast/css/pseudo-element-selector-scrollbar-hover.html
358
359         * css/SelectorChecker.cpp:
360         (WebCore::SelectorChecker::match): Added the check back.
361
362 2013-02-22  Tim Horton  <timothy_horton@apple.com>
363
364         [WK2] The root and page overlay layers should be the size of the view, not the content
365         https://bugs.webkit.org/show_bug.cgi?id=110660
366         <rdar://problem/13096456>
367
368         Reviewed by Simon Fraser.
369
370         * WebCore.exp.in:
371
372 2013-02-22  Anders Carlsson  <andersca@apple.com>
373
374         pluginLoadStrategy should take a WKDictionaryRef for extensibility
375         https://bugs.webkit.org/show_bug.cgi?id=110656
376         <rdar://problem/13265303>
377
378         Reviewed by Jessie Berlin.
379
380         Export a symbol needed by WebKit2.
381
382         * WebCore.exp.in:
383
384 2013-02-22  Levi Weintraub  <leviw@chromium.org>
385
386         Add descriptive names for different addMidpoint use cases
387         https://bugs.webkit.org/show_bug.cgi?id=110644
388
389         Reviewed by Ryosuke Niwa.
390
391         Midpoints are used to delineate ranges where we don't add line boxes for contents (collapsed spaces),
392         and to explicitly split a RenderText into multiple text runs so that text paragraph seperators get
393         their own line boxes. This patch encapsulates the different cases where midpoints are added to
394         lineMidpointState into 4 helper functions to make it clearer what's going on in each case.
395
396         No new tests. No change in functionality.
397
398         * rendering/RenderBlockLineLayout.cpp:
399         (WebCore::deprecatedAddMidpoint): Original function simply adds a midpoint to the lineMidpointState.
400         Renaming to deprecated to discourage callers.
401         (WebCore::startIgnoringSpaces): Adds a midpoint to start collapsing subsequent spaces. Asserts that
402         we have an even number of midpoints.
403         (WebCore::stopIgnoringSpaces): Adds the corresponding midpoint from startIgnoringSpaces and asserts
404         that it's an odd number.
405         (WebCore::ensureLineBoxInsideIgnoredSpaces): When ignoring spaces and we come across a RenderInline
406         that needs a line box, this function adds a pair of midpoints which ensures we'll later add a line
407         box for it.
408         (WebCore::ensureCharacterGetsLineBox): Adds a pair of midpoints in a text renderer to mark that
409         the current character needs its own line box. This is used by svg for absolutely positioned
410         characters, or for text paragraph seperators.
411
412 2013-02-22  Justin Schuh  <jschuh@chromium.org>
413
414         RenderArena masking has low entropy
415         https://bugs.webkit.org/show_bug.cgi?id=110394
416
417         Reviewed by Oliver Hunt.
418
419         No new tests. This is a hardening measure.
420
421         * rendering/RenderArena.cpp:
422         (WebCore::RenderArena::RenderArena):
423
424 2013-02-22  Min Qin  <qinmin@chromium.org>
425
426         Fix the overlay play button position on android
427         https://bugs.webkit.org/show_bug.cgi?id=110638
428
429         Reviewed by Ojan Vafai.
430
431         Because we are using flex box, specifying the height is not necessary.
432         Setting height to 100% will make the enclosure go outside the control panel.
433         There are no media layout test expecations for android, will do that in another patch.
434
435         * css/mediaControlsChromiumAndroid.css:
436         (video::-webkit-media-controls-overlay-enclosure):
437
438 2013-02-22  Kentaro Hara  <haraken@chromium.org>
439
440         Unreviewed build fix. Added missing #if PLATFORM(CHROMIUM).
441
442         * dom/Document.cpp:
443         (WebCore::Document::recalcStyle):
444         * page/FrameView.cpp:
445         (WebCore::FrameView::layout):
446
447 2013-02-22  Kentaro Hara  <haraken@chromium.org>
448
449         Document::styleRecalc() and FrameView::layout() should be traced
450         https://bugs.webkit.org/show_bug.cgi?id=110646
451
452         Reviewed by Ojan Vafai.
453
454         Document::styleRecalc() and FrameView::layout() are key factors
455         for web page rendering performance. We should add TRACE_EVENT()
456         macros to these functions.
457
458         * dom/Document.cpp:
459         (WebCore::Document::recalcStyle):
460         * page/FrameView.cpp:
461         (WebCore::FrameView::layout):
462
463 2013-02-22  Eric Seidel  <eric@webkit.org>
464
465         Teach the html5lib tests how to test the threaded HTML parser
466         https://bugs.webkit.org/show_bug.cgi?id=110643
467
468         Reviewed by Adam Barth.
469
470         This adds a way to force data: url parsing to go through
471         the threaded parser, to enable us to test the threaded parser
472         using the html5lib test harness.
473
474         * html/parser/HTMLParserOptions.cpp:
475         (WebCore::HTMLParserOptions::HTMLParserOptions):
476         * page/Settings.in:
477
478 2013-02-21  Ojan Vafai  <ojan@chromium.org>
479
480         Increase the max preferred width of tables to 1000000
481         https://bugs.webkit.org/show_bug.cgi?id=110545
482
483         Reviewed by Emil A Eklund.
484
485         Test: fast/table/large-shrink-wrapped-width.html
486
487         The old limit of 15000 was picked arbitrarily to avoid overflow.
488         No need to pick such a small number.
489
490         * rendering/AutoTableLayout.cpp:
491         (WebCore::AutoTableLayout::computeInstrinsicLogicalWidths):
492         As best I can tell, this code is just wrong. Removing this makes the
493         new test pass and doesn't cause any test failure. While we have many
494         tests that hit this codepath, this code would only
495         show a difference in the cases where the available container width is
496         greater then 15000, and I don't think we have any tests that hit that case
497         other than this new one.
498         * rendering/TableLayout.h:
499
500 2013-02-22  Adam Barth  <abarth@webkit.org>
501
502         Threaded HTML parser should pass fast/parser/iframe-sets-parent-to-javascript-url.html
503         https://bugs.webkit.org/show_bug.cgi?id=110637
504
505         Reviewed by Eric Seidel.
506
507         With the main thread parser, we always parse the first chunk of content
508         returned as the result of evaluating a JavaScript URL synchronously. In
509         particular, if the first chunk has an inline script, we'll execute it
510         synchronously.
511
512         Previous to this patch, the threaded parser would always parse this
513         content asynchronously. It's conceivable that there could be some
514         content relying on the synchronous behavior, so this patch introduces
515         the notion of "pinning" a parser to the main thread and uses that
516         concept to force the result of JavaScript URLs to be parsed on the main
517         thread (which is probably desirable anyway because they're likely to be
518         quite short).
519
520         This patch fixes fast/parser/iframe-sets-parent-to-javascript-url.html
521         and fast/dom/javascript-url-crash-function.html with the threaded
522         parser with --enable-threaded-html-parser.
523
524         * dom/DocumentParser.h:
525         (WebCore::DocumentParser::pinToMainThread):
526         (DocumentParser):
527         * html/parser/HTMLDocumentParser.cpp:
528         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
529         (WebCore):
530         (WebCore::HTMLDocumentParser::pinToMainThread):
531         * html/parser/HTMLDocumentParser.h:
532         (HTMLDocumentParser):
533         (WebCore::HTMLDocumentParser::shouldUseThreading):
534         * loader/DocumentWriter.cpp:
535         (WebCore::DocumentWriter::replaceDocument):
536
537 2013-02-22  Joe Mason  <jmason@rim.com>
538
539         [BlackBerry] Reread cookies when retrying a request with new auth credentials
540         https://bugs.webkit.org/show_bug.cgi?id=110628
541
542         Reviewed by George Staikos.
543
544         Internal PR: 298805
545         Internally Reviewed By: Leo Yang
546
547         The "isRedirect" parameter of initializePlatformRequest is only used to decide whether to
548         reread cookies. Since we must reread cookies when resending a request with new auth
549         credentials as well, rename this to "rereadCookies".
550
551         The only caller which sets this parameter rather than using the default value is
552         NetworkManager::startJob, which also has other processing on redirect. So add a new
553         "rereadCookies" parameter to startJob and ensure it is always set to true on a redirect, but
554         can also be set to true on a non-redirect. And when startJob is called due to new auth
555         credentials, set it to true.
556
557         * platform/network/blackberry/NetworkJob.cpp:
558         (WebCore::NetworkJob::startNewJobWithRequest): Add rereadCookies parameter, pass it to
559         startJob.
560         (WebCore::NetworkJob::handleRedirect): Set new rereadCookies param of startNewJob to true.
561         (WebCore::NetworkJob::notifyChallengeResult): Set new rereadCookies param of startNewJob to
562         true.
563         * platform/network/blackberry/NetworkJob.h:
564         (NetworkJob): Add rereadCookies parameter to startNewJobWithRequest.
565         * platform/network/blackberry/NetworkManager.cpp:
566         (WebCore::NetworkManager::startJob): Add rereadCookies parameter, pass it instead of
567         redirectCount to initializePlatformRequest.
568         * platform/network/blackberry/NetworkManager.h:
569         (NetworkManager): Add rereadCookies parameter to startJob.
570         * platform/network/blackberry/ResourceRequest.h:
571         (ResourceRequest): Rename isRedirect parameter to rereadCookies.
572         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
573         (WebCore::ResourceRequest::initializePlatformRequest): Rename isRedirect to rereadCookies.
574
575 2013-02-22  Benjamin Poulain  <bpoulain@apple.com>
576
577         Use CFNotificationCenter instead of NSNotificationCenter for SharedTimerIOS
578         https://bugs.webkit.org/show_bug.cgi?id=110544
579
580         Reviewed by Daniel Bates.
581
582         Previously, we were instantiating the Obj-C object WebCoreResumeNotifierIOS
583         with the only purpose of forwarding one notification to a C function.
584
585         This patch updates the code to use CFNotificationCenter to dispatch the notification
586         without the intermediary object.
587
588         * platform/ios/SharedTimerIOS.mm:
589         (WebCore::applicationDidBecomeActive):
590         (WebCore::setSharedTimerFireInterval):
591
592 2013-02-22  Kenneth Russell  <kbr@google.com>
593
594         Uint8ClampedArray constructor is wrong in WorkerContext.idl
595         https://bugs.webkit.org/show_bug.cgi?id=110634
596
597         Reviewed by Adam Barth.
598
599         Tests: fast/canvas/webgl/typed-arrays-in-workers.html
600                webgl/conformance/typedarrays/typed-arrays-in-workers.html
601
602         * workers/WorkerContext.idl:
603
604 2013-02-21  Mark Lam  <mark.lam@apple.com>
605
606         Add some checks to DatabaseTracker::getMaxSizeForDatabase() to ensure
607         that it returns a sane value.
608         https://bugs.webkit.org/show_bug.cgi?id=110557.
609
610         Reviewed by Geoffrey Garen.
611
612         No layout test, but there is a quota-test.html attached to bugzilla.
613         The test is a webpage that can be loaded into multiple tabs to
614         consuming storage space. Once the test webpages are loaded, you will
615         need to monitor the database directory and its files to confirm that
616         growth is bounded. Also try reloading the test in the tabs. At no
617         time should any database file ever exceed the quota.
618
619         * Modules/webdatabase/DatabaseTracker.cpp:
620         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
621
622 2013-02-22  James Simonsen  <simonjam@chromium.org>
623
624         Preloads should be cleared when JavaScript cancels loading prematurely.
625         https://bugs.webkit.org/show_bug.cgi?id=110388
626
627         Reviewed by Antti Koivisto.
628
629         If a page preloads a resource, but JavaScript aborts parsing for any reason (for example, a
630         redirect or document.write()), the resource is forever marked a preload and won't be reloaded
631         even if it's explicitly marked no-cache and the page is reloaded.
632
633         Test: http/tests/cache/preload-cleared-after-parrsing-canceled-by-js.html
634
635         * dom/Document.cpp:
636         (WebCore::Document::implicitClose):
637         (WebCore::Document::finishedParsing):
638
639 2013-02-22  Antoine Quint  <graouts@apple.com>
640
641         Expose a list of all reasons that qualify a RenderLayer to be composited
642         https://bugs.webkit.org/show_bug.cgi?id=110505
643
644         Expose the various reasons that can qualify a RenderLayer to be composited
645         via a new bitmask returned by the reasonForCompositing() method on
646         RenderLayerCompositor. This method already existed and was used for logging
647         purposes, but the previous functionality is now accessed via the
648         logReasonForCompositing() method.
649
650         This will allow the the InspectorLayerTreeAgent to provide this information
651         to the front-end on a per-layer basis as requested by the front-end.
652
653         Reviewed by Simon Fraser.
654
655         No new tests.
656
657         * rendering/RenderLayerCompositor.cpp:
658         (WebCore::RenderLayerCompositor::logLayerInfo):
659         (WebCore::RenderLayerCompositor::reasonsForCompositing):
660         (WebCore):
661         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
662         * rendering/RenderLayerCompositor.h:
663         (RenderLayerCompositor):
664
665 2013-02-22  Beth Dakin  <bdakin@apple.com>
666
667         ScrollingStateTree::rootStateNode() should be null-checked since it can be null
668         https://bugs.webkit.org/show_bug.cgi?id=110631
669
670         Reviewed by Simon Fraser.
671
672         This is a speculative fix for <rdar://problem/13233090> and 
673         <rdar://problem/12519348>. It is totally possible for rootStateNode() to be null, 
674         so we should null-check it.
675
676         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
677         (WebCore::ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread):
678         (WebCore::ScrollingCoordinatorMac::syncChildPositions):
679
680 2013-02-22  Mike Reed  <reed@google.com>
681
682         Check for null-device when calling createCompatibleDevice
683         https://bugs.webkit.org/show_bug.cgi?id=107981
684
685         Reviewed by James Robinson.
686
687         No new tests. Current tests provided coverage. Site in the wild triggered the failure
688         (cairo failed to allocate a huge surface).
689
690         * platform/graphics/skia/ImageBufferSkia.cpp:
691         (WebCore::ImageBuffer::ImageBuffer):
692
693 2013-02-22  Chris Rogers  <crogers@google.com>
694
695         AudioDestination::create() needs extra device identification information for live/local input streams
696         https://bugs.webkit.org/show_bug.cgi?id=109494
697
698         Reviewed by James Robinson.
699
700         AudioDestination::create() supports live/local audio input.  But, since there may be multiple
701         audio input devices available, an identifier for the requested input device needs to be
702         passed in.  The embedder may then use this information so that the proper audio hardware is
703         accessed.
704
705         * Modules/webaudio/AudioContext.cpp:
706         (WebCore::AudioContext::createMediaStreamSource):
707         * Modules/webaudio/AudioDestinationNode.h:
708         (AudioDestinationNode):
709         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
710         (WebCore::DefaultAudioDestinationNode::initialize):
711         (WebCore::DefaultAudioDestinationNode::createDestination):
712         (WebCore::DefaultAudioDestinationNode::enableInput):
713         * Modules/webaudio/DefaultAudioDestinationNode.h:
714         (DefaultAudioDestinationNode):
715         * Modules/webaudio/OfflineAudioDestinationNode.h:
716         * platform/audio/AudioDestination.h:
717         (AudioDestination):
718         * platform/audio/chromium/AudioDestinationChromium.cpp:
719         (WebCore::AudioDestination::create):
720         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
721         * platform/audio/chromium/AudioDestinationChromium.h:
722         (AudioDestinationChromium):
723         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
724         (WebCore::AudioDestination::create):
725         * platform/audio/mac/AudioDestinationMac.cpp:
726         (WebCore::AudioDestination::create):
727         * platform/chromium/support/WebMediaStreamSource.cpp:
728         (WebKit::WebMediaStreamSource::deviceId):
729         (WebKit):
730         (WebKit::WebMediaStreamSource::setDeviceId):
731         * platform/mediastream/MediaStreamSource.h:
732         (WebCore::MediaStreamSource::deviceId):
733         (WebCore::MediaStreamSource::setDeviceId):
734         (MediaStreamSource):
735
736 2013-02-22  Ryosuke Niwa  <rniwa@webkit.org>
737
738         Binding tests rebaseline after r143737.
739
740         * bindings/scripts/test/V8/V8Float64Array.cpp:
741         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
742         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
743         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
744         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
745         * bindings/scripts/test/V8/V8TestException.cpp:
746         * bindings/scripts/test/V8/V8TestInterface.cpp:
747         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
748         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
749         * bindings/scripts/test/V8/V8TestNode.cpp:
750         * bindings/scripts/test/V8/V8TestObj.cpp:
751         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
752         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
753         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
754
755 2013-02-22  Kunihiko Sakamoto  <ksakamoto@chromium.org>
756
757         INPUT_MULTIPLE_FIELDS_UI: Unable to enter "24" to hour field
758         https://bugs.webkit.org/show_bug.cgi?id=110431
759
760         Reviewed by Kent Tamura.
761
762         Fixed a bug that hour-field does not accept "24" as a valid input when hour format is 1-24.
763         To test <input> against different time formats, added "pattern" attribute to DateTimeEditElement.
764
765         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
766
767         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
768         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Overwrites layoutParameters.dateTimeFormat by pattern attribute of DateTimeEditElement (if exists).
769         * html/shadow/DateTimeFieldElements.cpp:
770         (WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState): Fixed a bug where AM/PM value was passed to setHour().
771         (WebCore::DateTimeHourFieldElement::setValueAsInteger): Clamps the given value to 0-24 when the range of the field is 1-12 or 1-24. Renamed the parameter as it may not be an hour23 value (0-23).
772
773 2013-02-21  Zoltan Horvath  <zoltan@webkit.org>
774
775         [CSS Regions] Region boxes should respect -shape-inside CSS property
776         https://bugs.webkit.org/show_bug.cgi?id=107880
777
778         Reviewed by David Hyatt.
779
780         The shape-inside CSS property modifies the shape of the inner inline flow content from rectangular content box
781         to an arbitrary geometry. The detailed documentation is located in the CSS-Exclusions specification:
782         http://dev.w3.org/csswg/css3-exclusions/#shape-inside-property. This change adds support for the shape-inside property
783         on CSS Regions.
784
785         Test: fast/regions/shape-inside-on-regions.html
786
787         * rendering/ExclusionShapeInfo.cpp:
788         (WebCore):
789         (WebCore::::logicalTopOffset): Shape dimension should be relative to the current region.
790         * rendering/ExclusionShapeInfo.h:
791         (ExclusionShapeInfo):
792         (WebCore::::logicalTopOffset): Move the implementation to ExclusionShapeInfo.cpp.
793         * rendering/RenderBlockLineLayout.cpp:
794         (WebCore::logicalHeightForLine): Move the function prior to layoutExclusionShapeInsideInfo, since we need to use it there.
795         (WebCore):
796         (WebCore::layoutExclusionShapeInsideInfo): Add support for cases when shape-inside is a region-block property.
797         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the exclusion shape information for every line, since the content
798         could flow through several region containers which can have different shape-inside properties.
799
800 2013-02-21  Ojan Vafai  <ojan@chromium.org>
801
802         Add computeInstrinsicLogicalWidths functions to TableLayout subclasses
803         https://bugs.webkit.org/show_bug.cgi?id=110520
804
805         Reviewed by Tony Chang.
806
807         This is just a refactor in preparation for adding RenderTable::computeIntinsicLogicalWidths.
808         No change in behavior.
809
810         Split the computePreferredLogicalWidths functions into a computeIntinsicLogicalWidths
811         and a applyPreferredLogicalWidthQuirks. Also, move the addition of bordersPaddingAndSpacing
812         into RenderTable since both TableLayout subclasses need this.
813
814         This has the added readability benefit of better isolating the quirks that each table layout
815         mode requires.
816
817         * rendering/AutoTableLayout.cpp:
818         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
819         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
820         * rendering/AutoTableLayout.h:
821         (AutoTableLayout):
822         * rendering/FixedTableLayout.cpp:
823         (WebCore::FixedTableLayout::computeIntrinsicLogicalWidths):
824         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
825         * rendering/FixedTableLayout.h:
826         (FixedTableLayout):
827         * rendering/RenderTable.cpp:
828         (WebCore::RenderTable::computePreferredLogicalWidths):
829         * rendering/TableLayout.h:
830         (TableLayout):
831
832 2013-02-22  David Hyatt  <hyatt@apple.com>
833
834         [New Multicolumn] Correctly track whether or not a layer is paginated.
835         https://bugs.webkit.org/show_bug.cgi?id=110625.
836
837         Taking the first step towards implementing the correct spec-compliant painting
838         model for the new multi-column layout. Add code to make sure the paginated
839         bits in RenderLayer get propagated correctly for the new layout.
840         
841         The main difference in bit propagation between the old multicolumn layout and
842         the new multicolumn layout is that the old layout only tracked pagination "roots",
843         since it has a broken layer painting model. It incorrectly treats a pagination
844         "root" inside a multi-column block as establishing a stacking context in each
845         column. This is incorrect.
846         
847         The new multicolumn code is going to paint each paginated layer individually,
848         and this means the bits can't just be about roots. Instead they have to be set
849         on every layer that may be split across columns, without regard for whether parent
850         layers are also split or not. This is actually a simpler bit propagation model
851         than the old code.
852
853         Reviewed by Beth Dakin.
854
855         * rendering/RenderLayer.cpp:
856         (WebCore::RenderLayer::updateLayerPositions):
857         Add code to set the m_isPaginated bit for in-flow RenderFlowThreads. This includes
858         only RenderMultiColumnFlowThread for now, but eventually it will also include
859         RenderPageFlowThread.
860
861         (WebCore::RenderLayer::useRegionBasedColumns):
862         Add a helper method to check if region-based columns are turned on, since we're
863         not attempting to alter the old column pagination model.
864
865         (WebCore::RenderLayer::updatePagination):
866         Added the code to propagate bits under the new model. Whether or not you're paginated
867         just depends on whether or not your enclosing layer along the containing block chain
868         is paginated.
869
870         (WebCore::RenderLayer::paintList):
871         (WebCore::RenderLayer::hitTestList):
872         Add code that avoids the old multi-column pagination model when the new column model
873         is enabled. For now there is no code in the new model that does anything with the bits,
874         but we're avoiding calling the old code, since it is broken for the new columns.
875
876         * rendering/RenderLayer.h:
877         (RenderLayer):
878         Added the useRegionBasedColumns method to check the Setting.
879
880         * rendering/RenderMultiColumnFlowThread.h:
881         * rendering/RenderObject.h:
882         (WebCore::RenderObject::isInFlowRenderFlowThread):
883         (RenderObject):
884         Implement isInFlowRenderFlowThread, a virtual function for asking if a renderer is
885         an in-flow RenderFlowThread, which means that it is going to need paginated layers
886         because the flow thread has to split across "pages" that do not establish stacking
887         contexts.
888
889 2013-02-22  Bem Jones-Bey  <bjonesbe@adobe.com>
890
891         text-overflow:ellipsis is not applied when the block contains nested blocks
892         https://bugs.webkit.org/show_bug.cgi?id=101879
893
894         Reviewed by Eric Seidel.
895
896         Since text-overflow is not an inherited property, the anonymous blocks
897         don't know they should ellipse. This causes the anonymous blocks
898         created in the nested block situation to check their parent to find
899         out if they should ellipse.
900
901         Test: fast/css/text-overflow-ellipsis-anonymous-blocks.html
902
903         * rendering/RenderBlockLineLayout.cpp:
904         (WebCore::RenderBlock::layoutInlineChildren):
905
906 2013-02-22  Eric Seidel  <eric@webkit.org>
907
908         REGRESSION(r143664, r143681): http/tests/security/feed-urls-from-remote.html fails
909         https://bugs.webkit.org/show_bug.cgi?id=110554
910
911         Reviewed by Adam Barth.
912
913         Will fix http/tests/security/feed-urls-from-remote.html for Mac WK1.
914
915         * loader/DocumentLoader.cpp:
916         (WebCore::DocumentLoader::isLoading):
917
918 2013-02-22  Mark Rowe  <mrowe@apple.com>
919
920         Build fix after r143637.
921
922         * WebCore.exp.in: Unconditionally export ScriptController::javaScriptContext.
923         * bindings/js/ScriptController.h: Unconditionally define javaScriptContext for Mac builds.
924         * bindings/js/ScriptControllerMac.mm:
925         (WebCore::ScriptController::javaScriptContext): Move the #if inside the function, and return 0 when false.
926
927 2013-02-22  Anton Vayvod  <avayvod@chromium.org>
928
929         [TextAutosizing] Refactoring to eliminate boolean parameter.
930         https://bugs.webkit.org/show_bug.cgi?id=110490
931
932         Reviewed by Julien Chaffraix.
933
934         A follow-up to the recent change that introduced a boolean parameter to
935         processClusterInternal method of TextAutosizer. Boolean parameters are discouraged by the
936         WebKit style guide. See http://trac.webkit.org/changeset/142866
937
938         Refactoring so no new tests.
939
940         * rendering/TextAutosizer.cpp:
941         (WebCore::TextAutosizer::clusterMultiplier):
942
943                 Calculates the font size multiplier for the specified cluster.
944
945         (WebCore::TextAutosizer::processClusterInternal):
946
947                 Accepts the font size multiplier instead of |shouldBeAutosized|.
948
949         (WebCore::TextAutosizer::processCluster):
950         (WebCore::TextAutosizer::processCompositeCluster):
951
952                 Both methods above now calculate the multiplier and then pass it to
953                 processClusterInternal.
954
955         * rendering/TextAutosizer.h:
956
957                 Updated method declarations.
958
959 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
960
961         [BlackBerry] Use KURL::protocolIsInHTTPFamily instead of KURL::protocolInHTTPFamily
962         https://bugs.webkit.org/show_bug.cgi?id=110581
963
964         Reviewed by Rob Buis.
965
966         KURL::protocolInHTTPFamily() was removed in r109670.
967
968         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
969         (WebCore::ResourceRequest::clearHTTPContentLength):
970         (WebCore::ResourceRequest::clearHTTPContentType):
971
972 2013-02-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
973
974         Unreviewed build-fix after r143744.
975
976         * dom/Document.cpp:
977         (WebCore::Document::updateHoverActiveState):
978
979 2013-02-22  Andrey Adaikin  <aandrey@chromium.org>
980
981         Web Inspector: [Canvas] throttle replayTraceLog messages to backend
982         https://bugs.webkit.org/show_bug.cgi?id=110591
983
984         Reviewed by Pavel Feldman.
985
986         The replayTraceLog message may be quite expensive. So, while such a request is processed by the
987         backend, user may well generate a dozen of new ones simply by walking through the DataGrid.
988         We should actually send to the backend only the last event from the queue.
989
990         * inspector/front-end/CanvasProfileView.js:
991         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
992         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
993
994 2013-02-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
995
996         Multiple Layout Test crashes (ASSERT) on chromium linux debug after r143727
997         https://bugs.webkit.org/show_bug.cgi?id=110609
998
999         Reviewed by Antonio Gomes.
1000
1001         Revert r128869. InnerNode may now again be from a child document, 
1002         and should be handled and not asserted against.
1003
1004         * dom/Document.cpp:
1005         (WebCore::Document::updateHoverActiveState):
1006
1007 2013-02-22  Andreas Kling  <akling@apple.com>
1008
1009         Element: Make updateName/updateId/updateLabel private.
1010         <http://webkit.org/b/110603>
1011
1012         Reviewed by Antti Koivisto.
1013
1014         These methods are only called from inside Element so make them private and
1015         move them to the .cpp file.
1016
1017         * dom/Element.cpp:
1018         (WebCore::Element::updateName):
1019         (WebCore::Element::updateId):
1020         * dom/Element.h:
1021
1022 2013-02-21  Zhenyao Mo  <zmo@google.com>
1023
1024         Roll ANGLE to r1833
1025         https://bugs.webkit.org/show_bug.cgi?id=110513
1026
1027         Reviewed by Kenneth Russell.
1028
1029         * CMakeLists.txt:
1030         * GNUmakefile.list.am:
1031
1032 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
1033
1034         [BlackBerry] Rename first/second to key/value in HashMap iterators
1035         https://bugs.webkit.org/show_bug.cgi?id=110577
1036
1037         Reviewed by Rob Buis.
1038
1039         Iterators were renamed to key/value in r130612.
1040
1041         * platform/blackberry/AuthenticationChallengeManager.cpp:
1042         (WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
1043         * platform/network/blackberry/NetworkJob.cpp:
1044         (WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):
1045
1046 2013-02-22  Kentaro Hara  <haraken@chromium.org>
1047
1048         [V8] Add comments to checkTypeOrDieTrying()
1049         https://bugs.webkit.org/show_bug.cgi?id=110553
1050
1051         Reviewed by Adam Barth.
1052
1053         It is mysterious how the check is helpful. We need comments.
1054
1055         No tests. Just added comments.
1056
1057         * bindings/scripts/CodeGeneratorV8.pm:
1058         (GenerateImplementation):
1059         * bindings/v8/ScriptWrappable.h:
1060         (ScriptWrappable):
1061
1062 2013-02-22  Jessie Berlin  <jberlin@apple.com>
1063
1064         32-bit build fix after r143706
1065
1066         * fileapi/FileReaderLoader.cpp:
1067         (WebCore::FileReaderLoader::didReceiveData):
1068
1069 2013-02-22  Andrey Adaikin  <aandrey@chromium.org>
1070
1071         Web Inspector: [Canvas] do no show a single frame node in data grid
1072         https://bugs.webkit.org/show_bug.cgi?id=110473
1073
1074         Reviewed by Pavel Feldman.
1075
1076         In a single canvas frame capture mode do not show the single "Frame #1" node.
1077         Drive-by: Fix a wrong "this" pointer.
1078
1079         * inspector/front-end/CanvasProfileView.js:
1080         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
1081         (WebInspector.CanvasProfileView.prototype.appendDrawCallGroup):
1082         (WebInspector.CanvasProfileView.prototype._flattenSingleFrameNode):
1083
1084 2013-02-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1085
1086         Multiple Layout Test crashes (ASSERT) on chromium linux debug after r143727
1087         https://bugs.webkit.org/show_bug.cgi?id=110609
1088
1089         Reviewed by Antonio Gomes.
1090
1091         Point based hit tests should not append but assign HitTestResults.
1092
1093         * rendering/RenderFrameBase.cpp:
1094         (WebCore::RenderFrameBase::nodeAtPoint):
1095
1096 2013-02-22  Andrey Lushnikov  <lushnikov@chromium.org>
1097
1098         Web Inspector: show source location after drawer views
1099         https://bugs.webkit.org/show_bug.cgi?id=110156
1100
1101         Reviewed by Pavel Feldman.
1102
1103         - Add statusBarText method
1104         - Add #drawer-view-anchor, which determines layout position of
1105         drawerView
1106         - Fix layout in #panel-status-bar to avoid floating elements.
1107
1108         No new tests.
1109
1110         * inspector/front-end/Panel.js:
1111         (WebInspector.Panel.prototype.wasShown): Add statusBarItems before
1112         drawer-view-anchor and statusBarText after.
1113         (WebInspector.Panel.prototype.willHide): Remove statusBarText from DOM in the
1114         way it's done for statusBarItems
1115         * inspector/front-end/ScriptsPanel.js:
1116         (WebInspector.ScriptsPanel.prototype.statusBarText): Added.
1117         * inspector/front-end/SourceFrame.js:
1118         (WebInspector.SourceFrame.prototype.statusBarText): Added.
1119         (WebInspector.SourceFrame.prototype.statusBarItems):
1120         * inspector/front-end/TimelinePanel.js:
1121         (WebInspector.TimelinePanel.prototype.get statusBarItems):
1122         * inspector/front-end/View.js:
1123         (WebInspector.View.prototype.statusBarText):
1124         * inspector/front-end/inspector.css:
1125         (#drawer-view-anchor):
1126         (.source-frame-cursor-position):
1127         * inspector/front-end/inspector.html:
1128         * inspector/front-end/inspector.js:
1129         (WebInspector.showViewInDrawer):
1130         * inspector/front-end/timelinePanel.css:
1131         (.timeline-records-stats):
1132         (.timeline-records-stats-container):
1133
1134 2013-02-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1135
1136         Allow child-frame content in hit-tests.
1137         https://bugs.webkit.org/show_bug.cgi?id=95204
1138
1139         Reviewed by Julien Chaffraix.
1140
1141         Refactors how EventHandler::hitTestResultAtPoint handles child-frame content,
1142         it is now handled by the hit test itself controlled by the AllowChildFrameContent
1143         flag in HitTestRequest.
1144
1145         This means that area-based hit-tests can now return elements from all the child frames
1146         they intersect instead of just the one frame containing the center point. The improved
1147         results from area-based hit-tests will among other things also improve touch adjustment
1148         near frame boundaries.
1149
1150         Tests: fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html
1151
1152         * page/EventHandler.cpp:
1153         (WebCore::EventHandler::hitTestResultAtPoint):
1154             Recursion into child-frames have been moved to RenderFrameBase::nodeAtPoint, so
1155             now hitTestResultAtPoint just needs to set AllowChildFrameContent.
1156         * page/TouchAdjustment.cpp:
1157         (WebCore::TouchAdjustment::parentShadowHostOrOwner):
1158             New function to iterate up across frame boundaries.
1159         (WebCore::TouchAdjustment::compileSubtargetList):
1160             We need to iterate up across frame boundaries to avoid iframes competing with their
1161             own content for touch adjustment.
1162         * rendering/HitTestRequest.h:
1163         (WebCore::HitTestRequest::allowsChildFrameContent):
1164         (WebCore::HitTestRequest::isChildFrameHitTest):
1165         * rendering/HitTestResult.cpp:
1166         (WebCore::HitTestResult::HitTestResult):
1167         (WebCore::HitTestResult::operator=):
1168         (WebCore::HitTestResult::append):
1169         (WebCore::HitTestResult::dictationAlternatives):
1170         * rendering/HitTestResult.h:
1171         (WebCore::HitTestResult::pointInMainFrame):
1172         (WebCore::HitTestResult::pointInInnerNodeFrame):
1173         (HitTestResult):
1174             m_hitTestLocation is now in main frame coordinates, which make m_pointInMainFrame
1175             unnecessary, but requires the introduction of m_pointInInnerFrame, to remember
1176             the coordinates of inner-node in its own frame.
1177         * rendering/RenderFrameBase.cpp:
1178         (WebCore::RenderFrameBase::nodeAtPoint):
1179             The recursion into child-frames is now handled here instead of in hitTestResultAtPoint, this
1180             allows us to recurse into multiple frames, instead of just one.
1181         * rendering/RenderFrameBase.h:
1182         (RenderFrameBase):
1183         * rendering/RenderLayer.cpp:
1184         (WebCore::RenderLayer::hitTest):
1185             RenderLayer should not lie about being hit if the request is child-frame request.
1186         * testing/Internals.cpp:
1187         (WebCore::Internals::nodesFromRect):
1188         * testing/Internals.h:
1189         (Internals):
1190         * testing/Internals.idl:
1191             Extended so nodesFromRect with child-frame content can be tested.
1192
1193 2013-02-22  Andreas Kling  <akling@apple.com>
1194
1195         ShareableElementData should use zero-length array for storage.
1196         <http://webkit.org/b/109959>
1197
1198         Reviewed by Anders Carlsson.
1199
1200         Use a zero-length Attribute array instead of always casting from void* to an array.
1201         It was done this way originally because I didn't know we could sidestep the MSVC
1202         build error with some #pragma hackery and a default constructor for Attribute.
1203
1204         * dom/Attribute.cpp:
1205         (WebCore::Attribute::Attribute):
1206         * dom/DocumentSharedObjectPool.cpp:
1207         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
1208         * dom/Element.cpp:
1209         (WebCore::sizeForShareableElementDataWithAttributeCount):
1210         (WebCore::ShareableElementData::ShareableElementData):
1211         (WebCore::ShareableElementData::~ShareableElementData):
1212         (WebCore::UniqueElementData::UniqueElementData):
1213         * dom/Element.h:
1214         (ShareableElementData):
1215         (WebCore::ElementData::attributeItem):
1216
1217 2013-02-22  Andreas Kling  <akling@apple.com>
1218
1219         Remove unused declaration: Element::removeCachedHTMLCollection()
1220
1221         Not reviewed by Antti Koivisto.
1222
1223         * dom/Element.h:
1224         (Element):
1225
1226 2013-02-22  Keishi Hattori  <keishi@webkit.org>
1227
1228         Add scroll view for new calendar picker
1229         https://bugs.webkit.org/show_bug.cgi?id=110137
1230
1231         Reviewed by Kent Tamura.
1232
1233         Adding a scroll view class as part of the new calendar picker (Bug 109439).
1234
1235         No new tests. Code not yet used.
1236
1237         * Resources/pagepopups/calendarPicker.js:
1238         (View):
1239         (View.prototype.offsetRelativeTo): Returns the offset position of this view relative to the given ancestor element.
1240         (View.prototype.attachTo): Attaches view to a node or view.
1241         (View.prototype.bindCallbackMethods): Binds all methods starting with "on" to this.
1242         (ScrollView): A custom scroll view that can contain extremely long content. CSS values have a limit. This can go beyond that.
1243         (ScrollView.prototype.setWidth): Sets the view width.
1244         (ScrollView.prototype.width):
1245         (ScrollView.prototype.setHeight):Sets the view height.
1246         (ScrollView.prototype.height):
1247         (ScrollView.prototype.onScrollAnimatorStep): Callback for scroll animator step.
1248         (ScrollView.prototype.scrollTo): Scrolls to a certain offset.
1249         (ScrollView.prototype.scrollBy): Scrolls by a certain amount.
1250         (ScrollView.prototype.contentOffset): Current content offset.
1251         (ScrollView.prototype.onMouseWheel): Scroll with the mouse wheel.
1252         (ScrollView.prototype.setContentOffset): Sets the content offset.
1253         (ScrollView.prototype.contentPositionForContentOffset): Returns where the content element should be positioned.
1254
1255 2013-02-22  Alexander Pavlov  <apavlov@chromium.org>
1256
1257         Web Inspector: InspectorPageAgent::disable() should not update view metrics regardless of the override state
1258         https://bugs.webkit.org/show_bug.cgi?id=110593
1259
1260         Reviewed by Vsevolod Vlasov.
1261
1262         InspectorPageAgent::disable() now checks if the device metrics are overridden before
1263         telling the client to disable the override.
1264
1265         * inspector/InspectorPageAgent.cpp:
1266         (WebCore::InspectorPageAgent::disable):
1267         (WebCore::InspectorPageAgent::setDeviceMetricsOverride):
1268         (WebCore::InspectorPageAgent::deviceMetricsChanged):
1269         * inspector/InspectorPageAgent.h:
1270         (InspectorPageAgent):
1271
1272 2013-02-22  Zan Dobersek  <zdobersek@igalia.com>
1273
1274         Unreviewed, rolling out r143695.
1275         http://trac.webkit.org/changeset/143695
1276         https://bugs.webkit.org/show_bug.cgi?id=110554
1277
1278         Crashes in DocumentLoader::checkLoadComplete on AppleMac WK1, EFL, GTK.
1279
1280         * loader/DocumentLoader.cpp:
1281         (WebCore::DocumentLoader::isLoading):
1282
1283 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
1284
1285         [CoordGfx] Minor cleanup in CoordinatedGraphicsScene::paintToGraphicsContext
1286         https://bugs.webkit.org/show_bug.cgi?id=109824
1287
1288         Reviewed by Andreas Kling.
1289
1290         Avoid ugly ifdefs by using PlatformGraphicsContext.
1291
1292         No new tests, only refactoring.
1293
1294         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1295         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1296         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1297         (CoordinatedGraphicsScene):
1298
1299 2013-02-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1300
1301         Unreviewed. Fix make distcheck.
1302
1303         * GNUmakefile.am: Add CodeGeneratorInspectorStrings.py to
1304         EXTRA_DIST.
1305
1306 2013-02-22  Andreas Kling  <akling@apple.com>
1307
1308         GlyphPage: ALWAYS_INLINE all performance-relevant getters.
1309
1310         REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler
1311         <http://webkit.org/b/108835>
1312
1313         Reviewed by Antti Koivisto.
1314
1315         Unreviewed desperate hack. Since I can't reproduce the problem and it's only showing
1316         up on two bots, one Linux and one Snow Leopard, I'm thinking it may be GCC related.
1317         Let's see what happens if we tell it to force inline all the GlyphPage getters.
1318
1319         * platform/graphics/GlyphPage.h:
1320         (WebCore::GlyphPage::indexForCharacter):
1321         (WebCore::GlyphPage::glyphDataForCharacter):
1322         (WebCore::GlyphPage::glyphDataForIndex):
1323         (WebCore::GlyphPage::glyphAt):
1324         (WebCore::GlyphPage::fontDataForCharacter):
1325
1326 2013-02-22  Zach Kuznia  <zork@chromium.org>
1327
1328         Update FileReaderLoader to allow specifying a range and reading as a blob.
1329         https://bugs.webkit.org/show_bug.cgi?id=110556
1330
1331         This is part of a series of patches to implement Stream support.  See:
1332         https://bugs.webkit.org/show_bug.cgi?id=110194
1333
1334         Reviewed by Hajime Morrita.
1335
1336         Tests: will be added when js binding is added.
1337
1338         * fileapi/FileReaderLoader.cpp:
1339         * fileapi/FileReaderLoader.h:
1340
1341 2013-02-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1342
1343         [WebGL][EFL] Support for creating surface with alpha disabled.
1344         https://bugs.webkit.org/show_bug.cgi?id=110067
1345
1346         Reviewed by Kenneth Rohde Christiansen.
1347
1348         Covered by compositing/webgl/webgl-no-alpha.html
1349
1350         We currently always create a surface supporting alpha channel. 
1351         With this patch we create the surface with alpha only if
1352         required.
1353
1354         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1355         (WebCore::GraphicsContext3DPrivate::initialize):
1356         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1357         (GraphicsContext3DPrivate):
1358         * platform/graphics/opengl/GLPlatformSurface.cpp:
1359         (WebCore::GLPlatformSurface::createOffScreenSurface):
1360         (WebCore::GLPlatformSurface::createTransportSurface):
1361         (WebCore::GLPlatformSurface::GLPlatformSurface):
1362         (WebCore::GLPlatformSurface::attributes):
1363         (WebCore):
1364         * platform/graphics/opengl/GLPlatformSurface.h:
1365         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
1366         (WebCore):
1367         (WebCore::EGLConfigSelector::EGLConfigSelector):
1368         (WebCore::EGLConfigSelector::pBufferContextConfig):
1369         (WebCore::EGLConfigSelector::surfaceContextConfig):
1370         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
1371         (EGLConfigSelector):
1372         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1373         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1374         * platform/graphics/surfaces/egl/EGLSurface.h:
1375         (EGLWindowTransportSurface):
1376         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1377         (WebCore):
1378         (WebCore::GLXConfigSelector::GLXConfigSelector):
1379         (WebCore::GLXConfigSelector::pixmapContextConfig):
1380         (WebCore::GLXConfigSelector::surfaceContextConfig):
1381         (WebCore::GLXConfigSelector::surfaceClientConfig):
1382         (WebCore::GLXConfigSelector::validateAttributes):
1383         (WebCore::GLXConfigSelector::findMatchingConfig):
1384         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId):
1385         (GLXConfigSelector):
1386         * platform/graphics/surfaces/glx/GLXContext.cpp:
1387         (WebCore::GLXOffScreenContext::initialize):
1388         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1389         (WebCore::GLXTransportSurface::GLXTransportSurface):
1390         (WebCore::GLXOffScreenSurface::GLXOffScreenSurface):
1391         (WebCore::GLXOffScreenSurface::initialize):
1392         * platform/graphics/surfaces/glx/GLXSurface.h:
1393         (GLXTransportSurface):
1394         (GLXOffScreenSurface):
1395         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1396         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1397         (WebCore::GraphicsSurfacePrivate::createPixmap):
1398
1399 2013-02-22  Pavel Feldman  <pfeldman@chromium.org>
1400
1401         Web Inspector: allow opting out from vertical split in the dock-to-right mode
1402         https://bugs.webkit.org/show_bug.cgi?id=110564
1403
1404         Reviewed by Vsevolod Vlasov.
1405
1406         * English.lproj/localizedStrings.js:
1407         * inspector/front-end/ElementsPanel.js:
1408         (WebInspector.ElementsPanel.prototype._splitVertically):
1409         * inspector/front-end/ScriptsPanel.js:
1410         * inspector/front-end/Settings.js:
1411         (WebInspector.Settings):
1412         * inspector/front-end/SettingsScreen.js:
1413         (WebInspector.GenericSettingsTab):
1414
1415 2013-02-21  Claudio Saavedra  <csaavedra@igalia.com>
1416
1417         [GTK] Control+Shift+Up/Down selection works backwards
1418         https://bugs.webkit.org/show_bug.cgi?id=110459
1419
1420         Reviewed by Martin Robinson.
1421
1422         * platform/gtk/KeyBindingTranslator.cpp:
1423         (WebCore): The translation table for paragraph selection
1424         commands is backwards, fix it.
1425
1426 2013-02-21  Eric Seidel  <eric@webkit.org>
1427
1428         REGRESSION(r143664, r143681): http/tests/security/feed-urls-from-remote.html fails
1429         https://bugs.webkit.org/show_bug.cgi?id=110554
1430
1431         Reviewed by Ryosuke Niwa.
1432
1433         Will fix http/tests/security/feed-urls-from-remote.html for Mac WK1.
1434
1435         * loader/DocumentLoader.cpp:
1436         (WebCore::DocumentLoader::isLoading):
1437
1438 2013-02-21  Alec Flett  <alecflett@chromium.org>
1439
1440         IndexedDB: Implement SharedBuffer version of put() / onSuccess()
1441         https://bugs.webkit.org/show_bug.cgi?id=110398
1442
1443         Reviewed by Tony Chang.
1444
1445         This avoids all unnecessary data copies within the context of
1446         IndexedDB proper, and removes all references to
1447         SerializedScriptValue from the IndexedDB "backend".
1448
1449         No new tests because this is just a refactor.
1450
1451         * bindings/v8/IDBBindingUtilities.cpp:
1452         (WebCore::deserializeIDBValueBuffer): New version of deserializeIDBValue which takes SharedBuffer.
1453
1454 2013-02-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1455
1456         Unreviewed, rolling out r143691.
1457         http://trac.webkit.org/changeset/143691
1458         https://bugs.webkit.org/show_bug.cgi?id=110559
1459
1460         Breaks compilation on mac. (Requested by vsevik on #webkit).
1461
1462         * rendering/RenderLayerCompositor.cpp:
1463         (WebCore::RenderLayerCompositor::logLayerInfo):
1464         (WebCore):
1465         (WebCore::RenderLayerCompositor::reasonForCompositing):
1466         * rendering/RenderLayerCompositor.h:
1467         (RenderLayerCompositor):
1468
1469 2013-02-21  Philip Rogers  <pdr@google.com>
1470
1471         Remove deep copy of ImageBuffer in tiled SVG backgrounds
1472         https://bugs.webkit.org/show_bug.cgi?id=110549
1473
1474         Reviewed by Dirk Schulze.
1475
1476         SVGImage::drawPatternForContainer creates a temporary ImageBuffer for stamping out tiled
1477         backgrounds. Previously this ImageBuffer was unnecessarily deep-copied! This patch uses a
1478         shallow copy, taking advantage of the fact that the temporary ImageBuffer is never modified.
1479
1480         This patch is covered with existing tests.
1481
1482         * svg/graphics/SVGImage.cpp:
1483         (WebCore::SVGImage::drawPatternForContainer):
1484
1485 2013-02-21  Antoine Quint  <graouts@apple.com>
1486
1487         Expose a list of all reasons that qualify a RenderLayer to be composited
1488         https://bugs.webkit.org/show_bug.cgi?id=110505
1489
1490         Expose the various reasons that can qualify a RenderLayer to be composited
1491         via a new bitmask returned by the reasonForCompositing() method on
1492         RenderLayerCompositor. This method already existed and was used for logging
1493         purposes, but the previous functionality is now accessed via the
1494         logReasonForCompositing() method.
1495
1496         This will allow the the InspectorLayerTreeAgent to provide this information
1497         to the front-end on a per-layer basis as requested by the front-end.
1498
1499         Reviewed by Simon Fraser.
1500
1501         No new tests.
1502
1503         * rendering/RenderLayerCompositor.cpp:
1504         (WebCore::RenderLayerCompositor::logLayerInfo):
1505         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1506         (WebCore):
1507         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
1508         * rendering/RenderLayerCompositor.h:
1509         (RenderLayerCompositor):
1510
1511 2013-02-21  Takashi Sakamoto  <tasak@google.com>
1512
1513         RenderTable::paintBoxDecorations sometimes draws box-shadow twice.
1514         https://bugs.webkit.org/show_bug.cgi?id=110196
1515
1516         Reviewed by Simon Fraser.
1517
1518         When RenderTable::paintBoxDecorations draws box-shadow, paintBackground
1519         should not draw box-shadow. So we have to provide bleedAvoidance
1520         parameter for RenderBox::paintBackground.
1521
1522         Test: fast/css/table-border-radius-with-box-shadow.html
1523
1524         * rendering/RenderTable.cpp:
1525         (WebCore::RenderTable::paintBoxDecorations):
1526         Provide bleedAvoidance, which determineBackgroundBleedAvoidance
1527         returns, for paintBackground.
1528
1529 2013-02-21  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1530
1531         Allow to retrieve the request data from abstract TextCheckingRequest to be accessible for WK2
1532         https://bugs.webkit.org/show_bug.cgi?id=110208
1533
1534         Reviewed by Hajime Morrita.
1535
1536         The WebCore changes are required to implement asynchronous spell checking in WK2.
1537         The idea of asynchronous spell checking in WK1 is to pass the pointer to the abstract object
1538         to the client who is able to verify the given text and notify the WebCore about results.
1539         WK2 will extract the request data and pass it (with additional information) to the UIProcess.
1540
1541         No new tests, covered by editing/spelling tests.
1542
1543         * editing/Editor.cpp:
1544         (WebCore::Editor::markAndReplaceFor):
1545         Extract the request data as it is the member of 'TextCheckingRequest'.
1546
1547         * editing/SpellChecker.cpp:
1548         (WebCore):
1549         (WebCore::SpellCheckRequest::didCancel):
1550         (WebCore::SpellCheckRequest::setCheckerAndSequence):
1551         (WebCore::SpellChecker::requestCheckingFor):
1552         (WebCore::SpellChecker::enqueueRequest):
1553         (WebCore::SpellChecker::didCheck):
1554         (WebCore::SpellChecker::didCheckSucceed):
1555         * platform/text/TextChecking.h:
1556         (WebCore):
1557         (TextCheckingRequestData):
1558         Introduce a new 'TextCheckingRequestData' class to keep the request data and to
1559         easy extract it from the 'TextCheckingRequest'.
1560
1561         (WebCore::TextCheckingRequestData::TextCheckingRequestData):
1562         (TextCheckingRequest):
1563         (WebCore::TextCheckingRequest::~TextCheckingRequest):
1564
1565 2013-02-21  Brady Eidson  <beidson@apple.com>
1566
1567         Move fastlog2() to WTF/MathExtras.h so it can be used from multiple projects.
1568
1569         Rubberstamped by Geoff Garen.
1570
1571         * loader/cache/MemoryCache.cpp:
1572         (WebCore::MemoryCache::lruListFor): Remove the inline fastlog2 and use WTF::fastlog2.
1573
1574 2013-02-21  Dimitri Glazkov  <dglazkov@chromium.org>
1575
1576         Split SelectorChecker's fast-checking logic into its own class.
1577         https://bugs.webkit.org/show_bug.cgi?id=106860
1578
1579         Reviewed by Antti Koivisto.
1580
1581         No functional changes, covered by existing tests.
1582
1583         * CMakeLists.txt: Added new class to existing build system.
1584         * GNUmakefile.list.am: Ditto.
1585         * Target.pri: Ditto.
1586         * WebCore.gypi: Ditto.
1587         * WebCore.xcodeproj/project.pbxproj: Ditto.
1588         * css/CSSAllInOne.cpp: Ditto.
1589         * css/RuleSet.cpp:
1590         (WebCore::RuleData::RuleData): Changed to use SelectorCheckerFastPath.
1591         * css/SelectorChecker.cpp:
1592         (WebCore::SelectorChecker::matches): Ditto.
1593         * css/SelectorChecker.h:
1594         (SelectorChecker): Move fast path code into SelectorCheckerFastPath.
1595         * css/SelectorCheckerFastPath.cpp: Added.
1596         * css/SelectorCheckerFastPath.h: Added.
1597         * css/StyleResolver.cpp:
1598         (WebCore::StyleResolver::ruleMatches): Changed to use SelectorCheckerFastPath.
1599         * dom/SelectorQuery.cpp:
1600         (WebCore::SelectorDataList::initialize): Ditto.
1601
1602 2013-02-21  Tony Gentilcore  <tonyg@chromium.org>
1603
1604         Invalidate outstanding checkpoints for the background input stream and preload scanner
1605         https://bugs.webkit.org/show_bug.cgi?id=110537
1606
1607         Reviewed by Adam Barth.
1608
1609         fast/tokenizer/write-before-load.html caused duplicate didFailSpeculation() calls for the same checkpoint.
1610         One was triggered by processParsedChunkFromBackgroundParser and the other by resumeParsingAfterScriptExecution.
1611         This change ensures that after we send a checkpoint, it is cleared so it won't be sent again until the next
1612         processParsedChunkFromBackgroundParser().
1613
1614         No new tests because no new functionality.
1615
1616         * html/parser/BackgroundHTMLInputStream.cpp:
1617         (WebCore::BackgroundHTMLInputStream::rewindTo):
1618         * html/parser/HTMLDocumentParser.cpp:
1619         (WebCore::HTMLDocumentParser::didFailSpeculation):
1620         * html/parser/HTMLPreloadScanner.cpp:
1621         (WebCore::TokenPreloadScanner::rewindTo):
1622
1623 2013-02-21  Dean Jackson  <dino@apple.com>
1624
1625         Followup commit for https://bugs.webkit.org/show_bug.cgi?id=110541
1626         from a comment by Jon Lee.
1627
1628         * html/HTMLPlugInImageElement.cpp:
1629         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Logic
1630         in conditional was unnecessarily complex.
1631
1632 2013-02-21  Ojan Vafai  <ojan@chromium.org>
1633
1634         Clean up computePreferredLogicalWidths functions in TableLayout subclasses
1635         https://bugs.webkit.org/show_bug.cgi?id=110515
1636
1637         Reviewed by Tony Chang.
1638
1639         No change in behavior. This is just a cleanup in preparation for other
1640         refactoring to this code.
1641
1642         * rendering/FixedTableLayout.cpp:
1643         (WebCore::FixedTableLayout::calcWidthArray):
1644         Move a FIXME here from computePreferredLogicalWidths. It makes more sense here.
1645         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
1646         -Remove outdated or unhelpful comments.
1647         -Isolate the fixed width codepath to make it a bit less convoluted.
1648         (WebCore::FixedTableLayout::layout):
1649         * rendering/FixedTableLayout.h:
1650         The argument to calcWidthArray is never used. Remove it.
1651
1652 2013-02-21  Eric Seidel  <eric@webkit.org>
1653
1654         LayoutTests/fast/encoding/parser-tests-*.html timeout with threaded HTML parser
1655         https://bugs.webkit.org/show_bug.cgi?id=109995
1656
1657         Unreviewed speculative fix for Mac WK1.
1658
1659         It appears that m_frame can be null for Mac WK1.
1660
1661         * loader/DocumentLoader.cpp:
1662         (WebCore::DocumentLoader::isLoading):
1663
1664 2013-02-21  Dean Jackson  <dino@apple.com>
1665
1666         Better sizing model for Snapshotted plugins
1667         https://bugs.webkit.org/show_bug.cgi?id=110541
1668
1669         Reviewed by Simon Fraser.
1670
1671         Clarify the way we apply sizing rules to snapshotted plug-ins. In
1672         testing we've found that plug-ins smaller than 40px in either
1673         dimension should never be frozen. Also, larger plugins should
1674         be explicitly marked, because often they are the single dominant
1675         element on the page.
1676
1677         As a drive-by, I removed the flag that indicated whether or not
1678         the label should show automatically. It wasn't being used. This is
1679         all determined from the shadow root and its CSS now.
1680
1681         * html/HTMLPlugInImageElement.cpp:
1682         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New values for size thresholds.
1683         (WebCore::HTMLPlugInImageElement::createRenderer): Remove call to setShouldShowSnapshotLabelAutomatically.
1684         (WebCore::classNameForShadowRoot): Remove logging and clearly assign sizing classes.
1685         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): We don't need the page size any more.
1686         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use new constant names.
1687         * html/HTMLPlugInImageElement.h:
1688         (HTMLPlugInImageElement): Remove setShouldShowSnapshotLabelAutomatically.
1689
1690 2013-02-21  Benjamin Poulain  <benjamin@webkit.org>
1691
1692         Fix the build after r143664.
1693
1694         Unreviewed.
1695
1696         * WebCore.exp.in:
1697
1698 2013-02-21  Eric Seidel  <eric@webkit.org>
1699
1700         tables/mozilla/bugs/bug8950.html fails with threaded parser due to attribute duplication
1701         https://bugs.webkit.org/show_bug.cgi?id=110532
1702
1703         Reviewed by Adam Barth.
1704
1705         This is a very basic failure which we should have caught earlier with the html5lib parser
1706         tests, except those use document.write and thus avoid the threaded parser.
1707
1708         AtomicHTMLToken expects its attributes to be unique.  We were not doing that for the
1709         CompactHTMLToken path, and this ancient mozilla table test caught that.
1710
1711         Fixes tables/mozilla/bugs/bug8950.html.
1712
1713         * html/parser/AtomicHTMLToken.h:
1714         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1715         (WebCore::AtomicHTMLToken::initializeAttributes):
1716
1717 2013-02-21  Adam Barth  <abarth@webkit.org>
1718
1719         Threaded HTML Parser fails fast/dom/Document/readystate.html
1720         https://bugs.webkit.org/show_bug.cgi?id=110529
1721
1722         Reviewed by Eric Seidel.
1723
1724         We need to create the tokenizer even when we finish a script-created
1725         parser. Most of the time, the tokenizer has already been created at
1726         this point because it is created by calls to document.write.
1727
1728         Test: fast/parser/body-should-exist-after-open-close.html
1729
1730         * html/parser/HTMLDocumentParser.cpp:
1731         (WebCore::HTMLDocumentParser::finish):
1732
1733 2013-02-21  Emil A Eklund  <eae@chromium.org>
1734
1735         Lots of LayoutUnit assertions when loading a Wikipedia article
1736         https://bugs.webkit.org/show_bug.cgi?id=110270
1737
1738         Reviewed by Levi Weintraub.
1739         
1740         Change RenderBlock::adjustRectForColumns to ensure that the
1741         endColumn calculation does not overflow.
1742
1743         No new tests, covered by existing tests.
1744
1745         * rendering/RenderBlock.cpp:
1746         (WebCore::RenderBlock::adjustRectForColumns):
1747         Make the endOffset value be no less than the beforeBorderPadding
1748         value to ensure that endColumn is not negative.
1749
1750 2013-02-21  Eric Seidel  <eric@webkit.org>
1751
1752         LayoutTests/fast/encoding/parser-tests-*.html timeout with threaded HTML parser
1753         https://bugs.webkit.org/show_bug.cgi?id=109995
1754
1755         Reviewed by Adam Barth.
1756
1757         In the case where during main document onload, we
1758         load a new iframe, and then from within that iframe
1759         we run script to remove the iframe and call testRunner.notifyDone()
1760         the notifyDone() will not correctly dump because
1761         the testRunner does not yet realize that the main resource
1762         has completed loading.
1763
1764         In the main-thread parser, the testRunner does correctly know
1765         that the main thread has completed, because removing the iframe
1766         causes a didFailLoad callback to the embedder, because when
1767         the iframe is being removed, the DocumentLoader for that iframe
1768         is still on the stack and believe's its loading
1769         (because it has a MainResourceLoader which is also on the stack
1770         delivering us the bytes which contain this inline script).
1771
1772         In the threaded-parser case, the DocumentLoader and MainResourceLoader
1773         are no longer on the stack, as we are parsing the iframe asynchronously
1774         after all the bytes have been delivered, and the MainResourceLoader destroyed.
1775         Thus when DocumentLoader::stopLoading() is called, loading() returns
1776         false, and it returns early.  One might argue that we should remove that
1777         early return entirely, but it seemed safer to extend the idea of
1778         when we're loading to include the time when the parser is active.
1779
1780         This patch solves this by teaching the DocumentLoader that it is still
1781         "loading" so long as the parser is still active.
1782
1783         Also added a call to DocumentLoader::checkLoadComplete from
1784         Document::decrementActiveParserCount which seemed to cause
1785         http/tests/multipart/policy-ignore-crash.php to pass.
1786
1787         This causes http/tests/security/feed-urls-from-remote.html to timeout
1788         on chromium (but no other platforms that I'm aware of).  I believe this
1789         is due to a bug in our DRT implementation in the policyDelegate case
1790         (which AFAIK is not a codepath which Chromium actually uses in the wild).
1791         The test already times out on TOT if you remove the setCustomPolicyDelegate calls!
1792
1793         * loader/DocumentLoader.cpp:
1794         (WebCore::DocumentLoader::isLoading):
1795         (WebCore):
1796         * loader/DocumentLoader.h:
1797         (DocumentLoader):
1798
1799 2013-02-21  Erik Arvidsson  <arv@chromium.org>
1800
1801         Nodes should not have attributes property
1802         https://bugs.webkit.org/show_bug.cgi?id=110510
1803
1804         Reviewed by Adam Barth.
1805
1806         According to http://dom.spec.whatwg.org/ attributes and hasAttributes
1807         should be defined on Element and not on Node.
1808
1809         Test: fast/dom/Text/text-should-not-have-attributes.html
1810
1811         * dom/Element.idl:
1812         * dom/Node.idl:
1813
1814 2013-02-21  Tony Gentilcore  <tonyg@chromium.org>
1815
1816         Make BackgroundHTMLParser rewind the preload scanner instead of clear it
1817         https://bugs.webkit.org/show_bug.cgi?id=110517
1818
1819         Reviewed by Adam Barth.
1820
1821         No new tests becuase no new functionality.
1822
1823         * html/parser/BackgroundHTMLParser.cpp:
1824         (WebCore::BackgroundHTMLParser::resumeFrom):
1825         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1826         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1827         * html/parser/BackgroundHTMLParser.h:
1828         (Checkpoint):
1829         * html/parser/HTMLDocumentParser.cpp:
1830         (WebCore::HTMLDocumentParser::didFailSpeculation):
1831         * html/parser/HTMLDocumentParser.h:
1832         (ParsedChunk):
1833         * html/parser/HTMLPreloadScanner.cpp:
1834         (WebCore::TokenPreloadScanner::createCheckpoint):
1835         (WebCore):
1836         (WebCore::TokenPreloadScanner::rewindTo):
1837         * html/parser/HTMLPreloadScanner.h:
1838         (WebCore):
1839         (TokenPreloadScanner):
1840         (WebCore::TokenPreloadScanner::Checkpoint::Checkpoint):
1841         (Checkpoint):
1842
1843 2013-02-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1844
1845         Unreviewed, rolling out r143536.
1846         http://trac.webkit.org/changeset/143536
1847         https://bugs.webkit.org/show_bug.cgi?id=110523
1848
1849         Causing a bunch of tests to fail on Windows, requires
1850         rebaselining (Requested by rfong on #webkit).
1851
1852         * config.h:
1853         * page/Settings.cpp:
1854         (WebCore):
1855         (WebCore::Settings::setShouldPaintNativeControls):
1856         * page/Settings.h:
1857         (Settings):
1858         (WebCore::Settings::shouldPaintNativeControls):
1859         * platform/win/ScrollbarThemeWin.cpp:
1860         (WebCore):
1861         * rendering/RenderThemeWin.cpp:
1862         (WebCore):
1863
1864 2013-02-21  Simon Fraser  <simon.fraser@apple.com>
1865
1866         Don't make an overhang shadow layer when the WKView has a transparent background
1867         https://bugs.webkit.org/show_bug.cgi?id=110429
1868
1869         Reviewed by Anders Carlsson.
1870
1871         When in coordinated scrolling mode, RenderLayerCompositor makes a layer to show
1872         the shadow around the content when rubber-banding. However, if the view is
1873         transparent, we don't want to make this layer, since it darkens the entire view.
1874
1875         * rendering/RenderLayerBacking.cpp:
1876         (WebCore::RenderLayerBacking::updateRootLayerConfiguration): Code was moved
1877         into viewHasTransparentBackground(), so just call that here.
1878         * rendering/RenderLayerCompositor.cpp:
1879         (WebCore::RenderLayerCompositor::requiresContentShadowLayer): Don't make
1880         a shadow layer when the view is transparent.
1881         (WebCore::RenderLayerCompositor::viewHasTransparentBackground): Return
1882         true if the view is transparent or has a non-opaque background color,
1883         and optionally return that color.
1884         * rendering/RenderLayerCompositor.h:
1885
1886 2013-02-21  Simon Fraser  <simon.fraser@apple.com>
1887
1888         [Safari] Crash with opacity + drop shadow filter + child element extending beyond filter outsets
1889         https://bugs.webkit.org/show_bug.cgi?id=107467
1890
1891         Reviewed by Dean Jackson.
1892         
1893         The filter code plays games with the current GraphicsContext, replacing the current
1894         context with one which will get filtered.
1895         
1896         This doesn't play nicely with the RenderLayer code which lazily starts transparency
1897         layers. If we don't start a transparency layer until painting a child of the filtered
1898         layer, then the transparency layer is started using the wrong context.
1899         
1900         Fix by eagerly starting transparency layers if we have both a filter and opacity.
1901
1902         Test: css3/filters/filter-with-opacity-and-children.html
1903
1904         * rendering/RenderLayer.cpp:
1905         (WebCore::RenderLayer::paintLayerContents):
1906
1907 2013-02-21  Tony Chang  <tony@chromium.org>
1908
1909         Autogenerate Settings that call setNeedsRecalcStyleInAllFrames when set
1910         https://bugs.webkit.org/show_bug.cgi?id=109989
1911
1912         Reviewed by Ryosuke Niwa.
1913
1914         Start generating the code for settings that call m_page->setNeedsRecalcStyleInAllFrames()
1915         when the value is changed. This allows us to generate 10 more settings. As a follow up, we
1916         can remove some methods from DRT/WTR after this.
1917
1918         No new tests, this is a build refactor and should not impact any test results.
1919
1920         * page/Settings.cpp:
1921         (WebCore::Settings::Settings): Remove member variables. Add SETTINGS_SETTER_BODIES macro that
1922         has the generated setter bodies.
1923         * page/Settings.h:
1924         (Settings): Remove code that is now generated.
1925         * page/Settings.in: Add new entries with setNeedsStyleRecalcWhenSetting=1
1926         * page/make_settings.pl:
1927         (defaultItemFactory): Add setNeedsStyleRecalcWhenSetting flag.
1928         (generateSettingsMacrosHeader): Print macro for setter bodies.
1929         (printConditionalMacros): Add setter body code.
1930         (printGettersAndSetters): Pass in setNeedsStyleRecalcWhenSetting so we know whether to inline the
1931         setter in the header or not.
1932         (printGetterAndSetter): Ditto.
1933         (printSetterBodies): Print macro for setter bodies.
1934         (printSetterBody): Print setter body for a single setting.
1935
1936 2013-02-21  Dean Jackson  <dino@apple.com>
1937
1938         Plug-in snapshotting code always accepts first snapshot
1939         https://bugs.webkit.org/show_bug.cgi?id=110495
1940
1941         Reviewed by Tim Horton.
1942
1943         When we detect a plugin that can be snapshotted we start capturing
1944         images until we find one that we believe isn't blank, or we timeout.
1945         I introduced a regression recently where we swap renderers as
1946         soon as the snapshot arrives, whether or not is is blank.
1947
1948         The fix was to have the embedder (currently only WK2) be the one
1949         who tells the HTMLPlugInElement to start displaying snapshots.
1950
1951         I also reduced the number of snapshot attempts we will make before
1952         giving up. We don't want to sit around for 66 seconds displaying nothing.
1953
1954         * html/HTMLPlugInElement.h:
1955         (WebCore::HTMLPlugInElement::setDisplayState): Make this a virtual function.
1956         * html/HTMLPlugInImageElement.cpp:
1957         (WebCore::HTMLPlugInImageElement::setDisplayState): Override to call the
1958             base class version, but swap renderers if we should move to the snapshot.
1959         (WebCore::HTMLPlugInImageElement::updateSnapshot): Don't swap renderers here any more.
1960         * html/HTMLPlugInImageElement.h: New virtual version of setDisplayState.
1961
1962 2013-02-21  Tony Gentilcore  <tonyg@chromium.org>
1963
1964         Tune BackgroundHTMLParser's pendingTokenLimit based on a benchmark
1965         https://bugs.webkit.org/show_bug.cgi?id=110408
1966
1967         Reviewed by Adam Barth.
1968
1969         This constant was tuned by running the top 25 sites in Telemetry on a Nexus 7 device.
1970         The new value decreases the maximum time spent parsing by 40% without significantly impacting total parse time or DOMContentLoaded.
1971
1972         No new tests because no new functionality.
1973
1974         * html/parser/BackgroundHTMLParser.cpp:
1975         (WebCore):
1976
1977 2013-02-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1978
1979         Unreviewed, rolling out r143419.
1980         http://trac.webkit.org/changeset/143419
1981         https://bugs.webkit.org/show_bug.cgi?id=110507
1982
1983         Broke border-image on Mac (Requested by jpfau on #webkit).
1984
1985         * platform/graphics/GraphicsContext.cpp:
1986         (WebCore::GraphicsContext::drawTiledImage):
1987         * platform/graphics/GraphicsContext.h:
1988         (GraphicsContext):
1989         * platform/graphics/Image.cpp:
1990         (WebCore::Image::drawTiled):
1991         * platform/graphics/Image.h:
1992         (Image):
1993         * rendering/RenderBoxModelObject.cpp:
1994         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1995
1996 2013-02-21  Tom Sepez  <tsepez@chromium.org>
1997
1998         XSSAuditor should block pages by redirecting to a sandboxed data: URL.
1999         https://bugs.webkit.org/show_bug.cgi?id=110406
2000
2001         Reviewed by Adam Barth.
2002
2003         Patch originally by mkwst@chromium.org. 
2004         Tests: http/tests/security/xssAuditor/block-does-not-leak-location.html
2005                http/tests/security/xssAuditor/block-does-not-leak-referrer.html
2006                http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html
2007
2008         * html/parser/XSSAuditorDelegate.cpp:
2009         (WebCore::XSSAuditorDelegate::didBlockScript):
2010             When blocking entire pages via the XSSAuditor, redirect to a data:
2011             URL to ensure that requests for properties don't leak information.
2012         
2013 2013-02-21  Christian Biesinger  <cbiesinger@chromium.org>
2014
2015         Convert buttons from DeprecatedFlexBox to nondeprecated FlexibleBox
2016         https://bugs.webkit.org/show_bug.cgi?id=109994
2017
2018         Reviewed by Ojan Vafai.
2019
2020         Covered by existing tests for <button> and <input
2021         type="button|submit|reset">
2022
2023         * css/html.css:
2024         (input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button):
2025         Convert from box-align to align-items. We are using flex-start here in
2026         conjunction with an auto margin for correct centering. See
2027         RenderButton.cpp below for the margin & more explanation.
2028
2029         * rendering/RenderBlock.cpp:
2030         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
2031         Add a case for creating a non-deprecated flex box.
2032
2033         * rendering/RenderButton.cpp:
2034         (WebCore::RenderButton::RenderButton):
2035         (WebCore::RenderButton::addChild):
2036         (WebCore::RenderButton::removeChild):
2037         Forward to new base class
2038         (WebCore::RenderButton::styleWillChange):
2039         (WebCore::RenderButton::setupInnerStyle):
2040         We are now using flexbox properties.
2041         - min-width is needed for correct shrinking of the contents
2042         - margin-top and margin-bottom are used for correct centering. We
2043         can't use align-items: center because results are incorrect when the
2044         content overflows. See LayoutTests/fast/forms/control-clip.html
2045
2046         * rendering/RenderButton.h:
2047         Inherit from RenderFlexibleBox
2048
2049         * rendering/RenderFlexibleBox.cpp:
2050         (WebCore::RenderFlexibleBox::createAnonymous):
2051         (WebCore):
2052         * rendering/RenderFlexibleBox.h:
2053         (RenderFlexibleBox):
2054         Add a createAnonymous function to RenderFlexibleBox.
2055
2056 2013-02-21  John Mellor  <johnme@chromium.org>
2057
2058         [chromium] Simplify computation of screenRect/windowRect.
2059         https://bugs.webkit.org/show_bug.cgi?id=110456
2060
2061         Reviewed by Adam Barth.
2062
2063         This patch removes applyDeviceScaleFactorInCompositor checks
2064         added by http://trac.webkit.org/changeset/139356 because
2065         Chrome for Android now sizes its screen and window in DIP
2066         units (like other platforms), so they are no longer necessary.
2067
2068         No new tests, since this is just removing an unused codepath.
2069
2070         * platform/chromium/PlatformScreenChromium.cpp:
2071         (WebCore::screenRect):
2072         (WebCore::screenAvailableRect):
2073         * rendering/TextAutosizer.cpp:
2074         (WebCore::TextAutosizer::processSubtree):
2075
2076 2013-02-21  Beth Dakin  <bdakin@apple.com>
2077
2078         Out-of-view fixed position check should not be affected by page scale at all on Mac
2079         https://bugs.webkit.org/show_bug.cgi?id=110294
2080         -and corresponding-
2081         <rdar://problem/13247582>
2082
2083         Reviewed by Simon Fraser.
2084
2085         Don't scale the layerBounds. Generally, the layerBounds should be relative to the 
2086         viewBounds which are also unscaled. Chromium used to want this behavior, but it is 
2087         covered by their pageScaleFactorAppliedInCompositor implementation now.
2088
2089         * rendering/RenderLayerCompositor.cpp:
2090         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2091
2092 2013-02-21  Philip Rogers  <pdr@google.com>
2093
2094         Stop starting animations when leaving a page
2095         https://bugs.webkit.org/show_bug.cgi?id=110257
2096
2097         Reviewed by Stephen Chenney.
2098
2099         SVGImage::resetAnimation() incorrectly started animations which could cause a crash
2100         when leaving the page. This patch fixes resetAnimation to only stop the animation,
2101         similar to BitmapImage::resetAnimation().
2102
2103         Additionally, this patch removes an unneeded call to Document::updateStyleForAllDocuments()
2104         that was present in the animation loop. This makes the animation code more resistant to
2105         similar bugs in the future.
2106
2107         Both of these changes are functionally covered with existing tests.
2108
2109         Test: svg/animations/reset-animation-crash.html
2110
2111         * svg/animation/SMILTimeContainer.cpp:
2112         (WebCore::SMILTimeContainer::updateAnimations):
2113         * svg/graphics/SVGImage.cpp:
2114         (WebCore::SVGImage::resetAnimation):
2115
2116 2013-02-19  Mark Hahnenberg  <mhahnenberg@apple.com>
2117
2118         Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
2119         https://bugs.webkit.org/show_bug.cgi?id=106059
2120
2121         Reviewed by Geoffrey Garen.
2122
2123         * WebCore.exp.in:
2124         * bindings/js/JSDOMWindowShell.cpp:
2125         (WebCore::JSDOMWindowShell::setWindow): Since we're basically abandoning a JSDOMWindow here, we call
2126         garbageCollectSoon().
2127         * bindings/js/JSDOMWindowShell.h:
2128         * bindings/js/ScriptController.h: New function to get the JSContext for the global object of the current main world.
2129         * bindings/js/ScriptControllerMac.mm: 
2130         (WebCore::ScriptController::javaScriptContext): Ditto.
2131         * bindings/objc/WebScriptObject.h: Added ifdef guards. Also new convenience conversion function for the JSC Obj-C API.
2132         * bindings/objc/WebScriptObject.mm: JSC::JSValue and JSValue conflict with one another, so we have to be more specific.
2133         (-[WebScriptObject _globalContextRef]): Useful helper function for getting the JSGlobalContextRef of a particular WebScriptObject.
2134         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2135         (-[WebScriptObject evaluateWebScript:]):
2136         (-[WebScriptObject valueForKey:]):
2137         (-[WebScriptObject webScriptValueAtIndex:]):
2138         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
2139         (-[WebScriptObject JSValue]): Implementation of convenience WebScriptObject conversion function to new Objective-C API.
2140         * bindings/objc/WebScriptObjectPrivate.h:
2141
2142 2013-02-21  Kentaro Hara  <haraken@chromium.org>
2143
2144         [V8] Rename add{Node,Object}ToGroup() to add{Node,Object}WrapperToGroup()
2145         https://bugs.webkit.org/show_bug.cgi?id=110404
2146
2147         Reviewed by Adam Barth.
2148
2149         The current function name is confusing
2150         (See discussion in bug 110396). We should rename the functions
2151         so that it becomes clear that "Node"/"Object" refers to a type
2152         of a wrapper in the second argument.
2153
2154         No tests. No change in behavior.
2155
2156         * bindings/v8/V8GCController.cpp:
2157         (WebCore::WrapperGrouper::addObjectWrapperToGroup):
2158         (WebCore::WrapperGrouper::addNodeWrapperToGroup):
2159
2160 2013-02-21  Vivek Galatage  <vivek.vg@samsung.com>
2161
2162         [JS Binding] ScriptObject default constructor should initialize the Script State to 0
2163         https://bugs.webkit.org/show_bug.cgi?id=110177
2164
2165         Reviewed by Geoffrey Garen.
2166
2167         Adding the initialization of ScriptState to 0.
2168
2169         * bindings/js/ScriptObject.h:
2170         (WebCore::ScriptObject::ScriptObject):
2171
2172 2013-02-21  Nate Chapin  <japhet@chromium.org>
2173
2174         REGRESSION: Crash in MainResourceLoader::setDataBufferingPolicy when sharing an html5 video via email
2175         https://bugs.webkit.org/show_bug.cgi?id=110075
2176
2177         Reviewed by Alexey Proskuryakov.
2178
2179         Test: webarchive/loading/video-in-webarchive.html
2180
2181         * loader/MainResourceLoader.cpp:
2182         (WebCore::MainResourceLoader::continueAfterContentPolicy): isStopping()
2183             isn't accurate to determine whether a SubstituteData load should
2184             continue, as this point in the code shouldn't be reachable from any point
2185             where isStopping() would return true. DocumentLoader might have completely
2186             stopped and believe that MainResourceLoader is complete, though. Don't
2187             continue in that case. 
2188         (WebCore::MainResourceLoader::setDataBufferingPolicy): m_resource can be null
2189             in a reasonable case, handle it rather \1athan asserting that it can't be null.
2190
2191 2013-02-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2192
2193         Unreviewed, rolling out r143616.
2194         http://trac.webkit.org/changeset/143616
2195         https://bugs.webkit.org/show_bug.cgi?id=110491
2196
2197         Caused a test failure on Chromium Mac. (Requested by vollick
2198         on #webkit).
2199
2200         * page/FrameView.cpp:
2201         (WebCore::FrameView::visibleContentsResized):
2202         * page/FrameView.h:
2203         (FrameView):
2204         * page/Page.cpp:
2205         (WebCore::Page::setPageScaleFactor):
2206
2207 2013-02-21  Robert Hogan  <robert@webkit.org>
2208
2209         Overflow can be cleared just before it is computed
2210         https://bugs.webkit.org/show_bug.cgi?id=110361
2211
2212         Reviewed by David Hyatt.
2213
2214         Overflow can be cleared just before it is computed in a lot of places because overflow computation happens all at once
2215         now rather than cumulatively during layout. Any object that doesn't use computeOverflow() will still need to clear it manually
2216         though.
2217
2218         No new tests, refactoring.
2219
2220         * rendering/RenderBlock.cpp:
2221         (WebCore::RenderBlock::layoutBlock):
2222         (WebCore::RenderBlock::computeOverflow):
2223         (WebCore::RenderBlock::simplifiedLayout):
2224         * rendering/RenderBlockLineLayout.cpp:
2225         (WebCore::RenderBlock::layoutInlineChildren):
2226         * rendering/RenderDeprecatedFlexibleBox.cpp:
2227         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2228         * rendering/RenderFlexibleBox.cpp:
2229         (WebCore::RenderFlexibleBox::layoutBlock):
2230         * rendering/RenderGrid.cpp:
2231         (WebCore::RenderGrid::layoutBlock):
2232         * rendering/RenderRubyRun.cpp:
2233         (WebCore::RenderRubyRun::layout):
2234         * rendering/RenderTable.cpp:
2235         (WebCore::RenderTable::layout):
2236         * rendering/RenderTextControlSingleLine.cpp:
2237         (WebCore::RenderTextControlSingleLine::layout):
2238
2239 2013-02-21  Alok Priyadarshi  <alokp@chromium.org>
2240
2241         Mark GraphicsLayers as opaque when possible
2242         https://bugs.webkit.org/show_bug.cgi?id=70634
2243
2244         Reviewed by Simon Fraser.
2245
2246         Mark layers as opaque in a very simple case - the main renderer has an
2247         opaque background and covers the entire composited bounds.
2248         RenderLayer::contentsOpaqueInRect has been implemented conservatively,
2249         i.e. it errs towards returning false negative.
2250
2251         Tests: compositing/contents-opaque/contents-opaque-background-clip.html
2252                compositing/contents-opaque/contents-opaque-background-color.html
2253                compositing/contents-opaque/contents-opaque-layer-opacity.html
2254                compositing/contents-opaque/contents-opaque-layer-transform.html
2255
2256         * rendering/RenderBox.cpp:
2257         (WebCore::RenderBox::backgroundIsOpaqueInRect):
2258         (WebCore):
2259         * rendering/RenderBox.h:
2260         (RenderBox):
2261         * rendering/RenderBoxModelObject.h:
2262         (WebCore::RenderBoxModelObject::backgroundIsOpaqueInRect):
2263         (WebCore::RenderBoxModelObject::foregroundIsOpaqueInRect):
2264         (RenderBoxModelObject):
2265         * rendering/RenderLayer.cpp:
2266         (WebCore::RenderLayer::contentsOpaqueInRect):
2267         (WebCore):
2268         (WebCore::RenderLayer::listContentsOpaqueInRect):
2269         * rendering/RenderLayer.h:
2270         (RenderLayer):
2271         * rendering/RenderLayerBacking.cpp:
2272         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2273         * rendering/RenderLayerModelObject.h:
2274         (RenderLayerModelObject):
2275
2276 2013-02-21  Julien Chaffraix  <jchaffraix@webkit.org>
2277
2278         [CSS Grid Layout] Implement grid growth during auto placement
2279         https://bugs.webkit.org/show_bug.cgi?id=110418
2280
2281         Reviewed by Ojan Vafai.
2282
2283         This change implements the last remaining piece of the auto placement algorithm:
2284         growing the grid mid-placement. With that landed, we should handle all cases properly.
2285
2286         Change covered by : fast/css-grid-layout/grid-item-addition-auto-placement.html
2287                             fast/css-grid-layout/grid-item-removal-auto-placement.html
2288
2289
2290         * rendering/RenderGrid.cpp:
2291         (WebCore::RenderGrid::growGrid):
2292         Added this helper function to grow the grid one item in a direction.
2293
2294         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2295         Updated this function to grow in the minor axis direction and insert in the
2296         newly created grid area.
2297
2298         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2299         Updated this function to grow in the major axis direction and insert in the
2300         newly create grid area. Unfortunately this code cannot use the iterator to find
2301         the new position as the (auto, auto) case iterates orthogonally to the major axis
2302         direction, which we just grew.
2303
2304         * rendering/RenderGrid.h:
2305         Added growGrid.
2306
2307 2013-02-21  Martin Robinson  <mrobinson@igalia.com>
2308
2309         A couple more 'make dist' fixes for WebKitGTK+.
2310
2311         * GNUmakefile.list.am: Add a missing file to the source list.
2312
2313 2013-02-21  Andrei Bucur  <abucur@adobe.com>
2314
2315         -webkit-margin-collapse: separate doesn't work correctly for before margins
2316         https://bugs.webkit.org/show_bug.cgi?id=109956
2317
2318         Reviewed by David Hyatt.
2319
2320         The collapsing code for "-webkit-margin-collapse: separate" assumed the margin value inside
2321         marginInfo always contributes to the position of the child. This is valid only if the collapse
2322         doesn't happen at the before side of the container. In that case, the child needs to be positioned 
2323         at the margin value specified in the style sheet.
2324
2325         Test: fast/block/margin-collapse/webkit-margin-collapse-separate-position.html
2326
2327         * rendering/RenderBlock.cpp:
2328         (WebCore::RenderBlock::collapseMargins):
2329
2330 2013-02-21  Tien-Ren Chen  <trchen@chromium.org>
2331
2332         Need to re-layout fixed position elements after scale when using settings()->fixedElementsLayoutRelativeToFrame()
2333         https://bugs.webkit.org/show_bug.cgi?id=105486
2334
2335         Reviewed by James Robinson.
2336
2337         In settings()->fixedElementsLayoutRelativeToFrame() mode, fixed-position
2338         elements are layout relative to the current visible viewport, which can
2339         be different from the layout viewport when using fixed-layout mode.
2340         We need to re-layout fixed-position elements in case of visible content
2341         size changes.
2342
2343         The test is currently chromium-specific due to difficulties to make this
2344         test works on Mac. The mac port seems to work very differently with
2345         visible content size when a page is scaled. And there is no reliable way
2346         to hide scrollbars in mac-wk1 that doesn't cause a side effect.
2347
2348         Test: platform/chromium/fast/repaint/relayout-fixed-position-after-scale.html
2349
2350         * page/FrameView.cpp:
2351         (WebCore::FrameView::visibleContentsResized):
2352         * page/FrameView.h:
2353         (FrameView):
2354         * page/Page.cpp:
2355         (WebCore::Page::setPageScaleFactor):
2356
2357 2013-02-21  Xan Lopez  <xlopez@rim.com>
2358
2359         [BlackBerry] LayerFilterRenderer: fix inclusion of Vector.h
2360         https://bugs.webkit.org/show_bug.cgi?id=110476
2361
2362         Reviewed by Rob Buis.
2363
2364         Added in r124242. The include line should be wtf/Vector.h
2365
2366         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2367
2368 2013-02-21  David Hyatt  <hyatt@apple.com>
2369
2370         [New Multicolumn] Remove unneeded layout method in RenderMultiColumnFlowThread.
2371         https://bugs.webkit.org/show_bug.cgi?id=110477.
2372
2373         Reviewed by Antti Koivisto.
2374
2375         I forgot that both the sets and the flow thread lay out before the containing
2376         RenderMultiColumnBlock has finished. That means it hasn't computed its overflow yet.
2377         Therefore there is no need to force it to compute its overflow from inside
2378         RenderMultiColumnFlowThread::layout, because the minute RenderMultiColumnFlowThread
2379         finishes its layout, the block will compute its overflow anyway.
2380
2381         * rendering/RenderMultiColumnFlowThread.cpp:
2382         (WebCore):
2383         * rendering/RenderMultiColumnFlowThread.h:
2384         (RenderMultiColumnFlowThread):
2385
2386 2013-02-21  Martin Robinson  <mrobinson@igalia.com>
2387
2388         [GTK] Move feature overriding to the configure phase
2389         https://bugs.webkit.org/show_bug.cgi?id=110293
2390
2391         Reviewed by Gustavo Noronha Silva.
2392
2393         * GNUmakefile.am: No longer include GNUmakefile.features.am. We don't
2394         have to process the result of this file or do any modification of
2395         feature_defines_override, because this variable is gone.
2396
2397 2013-02-21  Andrey Adaikin  <aandrey@chromium.org>
2398
2399         Unreviewed. Rolling out an unindented change from r143580.
2400
2401         * inspector/Inspector.json:
2402
2403 2013-02-21  Andreas Kling  <akling@apple.com>
2404
2405         GlyphPage: Bake per-glyph font data array into same allocation as GlyphPage.
2406
2407         A hopeful fix for REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler
2408         <http://webkit.org/b/108835>
2409
2410         Reviewed by Antti Koivisto.
2411
2412         Rewire GlyphPage so that we have to decide at creation time whether there will be a per-glyph
2413         array of SimpleFontData* or not. This removes one allocation and one step of indirection for
2414         pages with glyphs from mixed fonts.
2415
2416         * platform/graphics/GlyphPage.h:
2417         (WebCore::GlyphPage::createForMixedFontData):
2418         (WebCore::GlyphPage::createForSingleFontData):
2419         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2420         (WebCore::GlyphPage::~GlyphPage):
2421         (WebCore::GlyphPage::glyphDataForIndex):
2422         (WebCore::GlyphPage::fontDataForCharacter):
2423         (WebCore::GlyphPage::setGlyphDataForIndex):
2424         (WebCore::GlyphPage::removeFontDataFromSystemFallbackPage):
2425         (WebCore::GlyphPage::GlyphPage):
2426         (WebCore::GlyphPage::hasPerGlyphFontData):
2427         (GlyphPage):
2428         * platform/graphics/GlyphPageTreeNode.cpp:
2429         (WebCore::GlyphPageTreeNode::initializePage):
2430
2431 2013-02-21  Xan Lopez  <xlopez@rim.com>
2432
2433         [BlackBerry] MediaPlayerPrivateBlackBerry: include Logging.h
2434         https://bugs.webkit.org/show_bug.cgi?id=110455
2435
2436         Reviewed by Eric Carlson.
2437
2438         LOG is used in this file, so it is needed.
2439
2440         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2441
2442 2013-02-21  Keishi Hattori  <keishi@webkit.org>
2443
2444         Add animation class for new calendar picker
2445         https://bugs.webkit.org/show_bug.cgi?id=110132
2446
2447         Reviewed by Kent Tamura.
2448
2449         Adding animation related classes as part of the calendar picker
2450         redesign(Bug 109439).
2451
2452         No new tests. Code is not used yet.
2453
2454         * Resources/pagepopups/calendarPicker.js:
2455         (AnimationTimingFunction.Linear): Parameter t should be a number between 0 and 1.
2456         (AnimationTimingFunction.EaseInOut): Ditto.
2457         (AnimationManager): All animators are managed by this class so we
2458         can dispatch "animationFrameWillFinish" event after all the updates.
2459         (AnimationManager.prototype._startAnimation):
2460         (AnimationManager.prototype._stopAnimation):
2461         (AnimationManager.prototype.add): Adds an animator to the list of running animators.
2462         (AnimationManager.prototype.remove): Removes an animator.
2463         (AnimationManager.prototype._animationFrameCallback): Callback for requestAnimationFrame.
2464         (AnimationManager.prototype._needsAnimationFrame): Returns true if we should request the next animation frame.
2465         (AnimationManager.prototype.on): If we add a callback, request animation frame.
2466         (AnimationManager.prototype.removeListener):
2467         (Animator): Animates between the from value and to value.
2468         (Animator.prototype.setFrom): Sets the from value.
2469         (Animator.prototype.setTo): Sets the to value.
2470         (Animator.prototype.start):
2471         (Animator.prototype.stop):
2472         (Animator.prototype.onAnimationFrame): Called by AnimationManager.
2473
2474 2013-02-21  Andrey Adaikin  <aandrey@chromium.org>
2475
2476         Web Inspector: [Canvas] UI: more intuitive control buttons
2477         https://bugs.webkit.org/show_bug.cgi?id=110327
2478
2479         Reviewed by Pavel Feldman.
2480
2481         Tweaks to the CanvasProfiler replay control buttons.
2482         - NextDrawCall forward button (StepOver) should jump up to the last expanded node, otherwise a noop is not intuitive unless the last node is selected.
2483         - NextDrawCall/PrevDrawCall buttons should not skip draw call nodes themselves.
2484
2485         * inspector/front-end/CanvasProfileView.js:
2486         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
2487
2488 2013-02-21  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2489
2490         Make SpellCheckRequest's constructor private.
2491         https://bugs.webkit.org/show_bug.cgi?id=110462
2492
2493         Reviewed by Antonio Gomes.
2494
2495         It's no need to expose SpellCheckRequest's constructor.
2496         There is SpellCheckRequest::create() method which is
2497         responsible for creating SpellCheckRequest object.
2498
2499         No new tests, no behavior change.
2500
2501         * editing/SpellChecker.h:
2502         (SpellCheckRequest):
2503
2504 2013-02-21  Andrey Adaikin  <aandrey@chromium.org>
2505
2506         Web Inspector: [Canvas] Remove arrays of DataGrid nodes from the View
2507         https://bugs.webkit.org/show_bug.cgi?id=110325
2508
2509         Reviewed by Pavel Feldman.
2510
2511         Remove arrays of DataGrid nodes from the CanvasProfileView and use live DataGrid instead.
2512         This is a prerequisite to support a non-fixed layered tree in the grid (for example, to hide
2513         a single frame group node, or to combine several draw call groups into a pattern group).
2514         Drive-by: added an assert to injected canvas module.
2515
2516         * inspector/InjectedScriptCanvasModuleSource.js:
2517         * inspector/front-end/CanvasProfileView.js:
2518         (WebInspector.CanvasProfileView):
2519         (WebInspector.CanvasProfileView.prototype.dispose):
2520         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
2521         (WebInspector.CanvasProfileView.prototype._requestTraceLog):
2522         (WebInspector.CanvasProfileView.prototype._selectedCallIndex):
2523         (WebInspector.CanvasProfileView.prototype._peekLastRecursively):
2524         (WebInspector.CanvasProfileView.prototype._appendCallNodes):
2525         (WebInspector.CanvasProfileView.prototype.):
2526         (WebInspector.CanvasProfileView.prototype.splitDrawCallGroup):
2527         (WebInspector.CanvasProfileView.prototype._appendCallNodesToFrameNode):
2528
2529 2013-02-21  Alexander Pavlov  <apavlov@chromium.org>
2530
2531         Web Inspector: Local/session storage tree items in the Resources panel after page refresh are not shown
2532         Re-landing r143581 with a build fix for Windows.
2533         https://bugs.webkit.org/show_bug.cgi?id=109572
2534
2535         Reviewed by Vsevolod Vlasov.
2536
2537         This is a complete rework of the DOMStorage domain of the Web Inspector protocol. The most notable changes:
2538         - Session and local DOM storages are considered to implicitly exist for each SecurityOrigin in the page
2539           (previously, only those that were lazily created by DOMWindow would exist).
2540         - Consequently, the addDOMStorage event is gone.
2541         - StorageId is now an object rather than an opaque numeric identifier.
2542         - DOM storage modifiers no longer return a boolean indicating if the operation was successful.
2543           Clients should rely on the returned error message instead.
2544
2545         Implementation changes:
2546         - InspectorDOMStorageResource would rely on the frame for which it was created throughout its lifetime.
2547           As such, the frame removal from the page would break the respective DOM storage inspection.
2548           Since this concept was entirely flawed, InspectorDOMStorageResource has been removed. Instead, a StorageArea
2549           is retrieved based on the security origin specified by the client.
2550         - DOM storages can now be dynamically removed (upon the respective SecurityOrigin removal) in the frontend.
2551
2552         * CMakeLists.txt: Remove InspectorDOMStorageResource.
2553         * GNUmakefile.list.am: Ditto.
2554         * Target.pri: Ditto.
2555         * WebCore.gypi: Ditto.
2556         * WebCore.order: Ditto.
2557         * WebCore.vcproj/WebCore.vcproj: Ditto.
2558         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2559         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2560         * WebCore.xcodeproj/project.pbxproj: Ditto.
2561         * dom/WebCoreMemoryInstrumentation.cpp: Ditto.
2562         * dom/WebCoreMemoryInstrumentation.h: Ditto.
2563         * inspector/InjectedScriptSource.js: Account for the structured StorageId.
2564         * inspector/Inspector.json: Update structures and API methods.
2565           Do not return boolean success flag and make use of the error message instead.
2566         * inspector/InspectorAllInOne.cpp: Remove InspectorDOMStorageResource.
2567         * inspector/InspectorController.cpp:
2568         (WebCore::InspectorController::InspectorController): Add InspectorPageAgent into InspectorDOMStorageAgent.
2569         * inspector/InspectorDOMStorageAgent.cpp: Mostly remove InspectorDOMStorageResource usages.
2570         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2571         (WebCore::InspectorDOMStorageAgent::clearFrontend):
2572         (WebCore::InspectorDOMStorageAgent::isEnabled):
2573         (WebCore::InspectorDOMStorageAgent::enable):
2574         (WebCore::InspectorDOMStorageAgent::disable):
2575         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): Renamed.
2576         (WebCore::toErrorString): Stringify ExceptionCode.
2577         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2578         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2579         (WebCore::InspectorDOMStorageAgent::storageId): Make it structured rather than a plain string.
2580         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2581         (WebCore::InspectorDOMStorageAgent::findStorageArea): Added.
2582         (WebCore::InspectorDOMStorageAgent::reportMemoryUsage): Remove InspectorDOMStorageResource map.
2583         * inspector/InspectorDOMStorageAgent.h:
2584         (WebCore::InspectorDOMStorageAgent::create): Update signature.
2585         (InspectorDOMStorageAgent):
2586         * inspector/InspectorDOMStorageResource.cpp: Removed.
2587         * inspector/InspectorDOMStorageResource.h: Removed.
2588         * inspector/InspectorInstrumentation.cpp:
2589         (WebCore::InspectorInstrumentation::didCommitLoadImpl): Do not call the removed clearResources().
2590         * inspector/InspectorInstrumentation.h:
2591         * inspector/InspectorPageAgent.cpp:
2592         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin): Added.
2593         * inspector/InspectorPageAgent.h:
2594         (InspectorPageAgent):
2595         * inspector/front-end/DOMStorage.js: Entirely reworked to use the SecurityOriginAdded/Removed events.
2596         (WebInspector.DOMStorage):
2597         (WebInspector.DOMStorage.storageId):
2598         (WebInspector.DOMStorage.prototype.get id):
2599         (WebInspector.DOMStorage.prototype.get securityOrigin):
2600         (WebInspector.DOMStorage.prototype.getItems):
2601         (WebInspector.DOMStorage.prototype.setItem):
2602         (WebInspector.DOMStorage.prototype.removeItem):
2603         (WebInspector.DOMStorageModel):
2604         (WebInspector.DOMStorageModel.prototype._securityOriginAdded):
2605         (WebInspector.DOMStorageModel.prototype._securityOriginRemoved):
2606         (WebInspector.DOMStorageModel.prototype._storageKey):
2607         (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared):
2608         (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved):
2609         (WebInspector.DOMStorageModel.prototype._domStorageItemAdded):
2610         (WebInspector.DOMStorageModel.prototype.storageForId):
2611         (WebInspector.DOMStorageModel.prototype.storages):
2612         * inspector/front-end/DOMStorageItemsView.js: Rename Entries -> Items to avoid confusion.
2613         (WebInspector.DOMStorageItemsView.prototype._update):
2614         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageItems):
2615         (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageItems):
2616         * inspector/front-end/ResourcesPanel.js: Follow the updated DOMStorage model.
2617         (WebInspector.ResourcesPanel):
2618         (WebInspector.ResourcesPanel.prototype._initialize):
2619         (WebInspector.ResourcesPanel.prototype._domStorageAdded):
2620         (WebInspector.ResourcesPanel.prototype._domStorageRemoved):
2621         (WebInspector.ResourcesPanel.prototype._populateDOMStorageTree):
2622         (WebInspector.DOMStorageTreeElement):
2623         (WebInspector.DOMStorageTreeElement.prototype.get itemURL):
2624         * page/DOMWindow.cpp: Remove instrumentation calls.
2625         (WebCore::DOMWindow::sessionStorage):
2626         (WebCore::DOMWindow::localStorage):
2627
2628 2013-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2629
2630         Unreviewed. Fix make distcheck.
2631
2632         * GNUmakefile.list.am: Add missing files to compilation.
2633
2634 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
2635
2636         [BlackBerry] Fix access to ResourceHandle::context
2637         https://bugs.webkit.org/show_bug.cgi?id=110443
2638
2639         Reviewed by Carlos Garcia Campos.
2640
2641         This changed in r141981.
2642
2643         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
2644         (WebCore::ResourceHandle::start):
2645
2646 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
2647
2648         [BlackBerry] GraphicsLayerBlackBerry: rename showDebugBorder to isShowingDebugBorder
2649         https://bugs.webkit.org/show_bug.cgi?id=110453
2650
2651         Reviewed by Carlos Garcia Campos.
2652
2653         This changed in r133517.
2654
2655         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
2656         (WebCore::GraphicsLayerBlackBerry::setupContentsLayer):
2657
2658 2013-02-21  Peter Rybin  <prybin@chromium.org>
2659
2660         Web Inspector: take large strings out of CodeGeneratorInspector.py
2661         https://bugs.webkit.org/show_bug.cgi?id=110159
2662
2663         Reviewed by Yury Semikhatsky.
2664
2665         Python script is refactored.
2666
2667         * inspector/CodeGeneratorInspector.py:
2668         * inspector/CodeGeneratorInspectorStrings.py: Added.
2669         (InspectorFrontend_h):
2670         (InspectorFrontendChannel):
2671         (InspectorArray):
2672         (InspectorObject):
2673         (String):
2674         (InspectorFrontend):
2675         (InspectorBackendDispatcher_h):
2676         (InspectorAgent):
2677         (InspectorBackendDispatcherImpl):
2678         (InspectorBackendDispatcher):
2679         (CallbackBase):
2680         (void):
2681         (HashMap):
2682         (OptOutput):
2683         (ExactlyInt):
2684         (RuntimeCastHelper):
2685         (provides):
2686         (typename):
2687         (Array):
2688         (Builder):
2689
2690 2013-02-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2691
2692         Unreviewed, rolling out r143581.
2693         http://trac.webkit.org/changeset/143581
2694         https://bugs.webkit.org/show_bug.cgi?id=110457
2695
2696         Breaks Windows builds (compile + link) (Requested by apavlov
2697         on #webkit).
2698
2699         * CMakeLists.txt:
2700         * GNUmakefile.list.am:
2701         * Target.pri:
2702         * WebCore.gypi:
2703         * WebCore.order:
2704         * WebCore.vcproj/WebCore.vcproj:
2705         * WebCore.vcxproj/WebCore.vcxproj:
2706         * WebCore.vcxproj/WebCore.vcxproj.filters:
2707         * WebCore.xcodeproj/project.pbxproj:
2708         * dom/WebCoreMemoryInstrumentation.cpp:
2709         (WebCore):
2710         * dom/WebCoreMemoryInstrumentation.h:
2711         (WebCoreMemoryTypes):
2712         * inspector/InjectedScriptSource.js:
2713         (.):
2714         * inspector/Inspector.json:
2715         * inspector/InspectorAllInOne.cpp:
2716         * inspector/InspectorController.cpp:
2717         (WebCore::InspectorController::InspectorController):
2718         * inspector/InspectorDOMStorageAgent.cpp:
2719         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2720         (WebCore::InspectorDOMStorageAgent::clearFrontend):
2721         (WebCore::InspectorDOMStorageAgent::restore):
2722         (WebCore::InspectorDOMStorageAgent::enable):
2723         (WebCore::InspectorDOMStorageAgent::disable):
2724         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
2725         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2726         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2727         (WebCore::InspectorDOMStorageAgent::storageId):
2728         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
2729         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
2730         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2731         (WebCore::InspectorDOMStorageAgent::clearResources):
2732         (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
2733         * inspector/InspectorDOMStorageAgent.h:
2734         (WebCore):
2735         (WebCore::InspectorDOMStorageAgent::create):
2736         (InspectorDOMStorageAgent):
2737         * inspector/InspectorDOMStorageResource.cpp: Added.
2738         (WebCore):
2739         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
2740         (WebCore::InspectorDOMStorageResource::isSameOriginAndType):
2741         (WebCore::InspectorDOMStorageResource::bind):
2742         (WebCore::InspectorDOMStorageResource::unbind):
2743         (WebCore::InspectorDOMStorageResource::reportMemoryUsage):
2744         * inspector/InspectorDOMStorageResource.h: Added.
2745         (WebCore):
2746         (InspectorDOMStorageResource):
2747         (WebCore::InspectorDOMStorageResource::create):
2748         (WebCore::InspectorDOMStorageResource::id):
2749         (WebCore::InspectorDOMStorageResource::storageArea):
2750         (WebCore::InspectorDOMStorageResource::frame):
2751         * inspector/InspectorInstrumentation.cpp:
2752         (WebCore):
2753         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2754         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
2755         * inspector/InspectorInstrumentation.h:
2756         (InspectorInstrumentation):
2757         (WebCore::InspectorInstrumentation::didUseDOMStorage):
2758         (WebCore):
2759         * inspector/InspectorPageAgent.cpp:
2760         * inspector/InspectorPageAgent.h:
2761         (InspectorPageAgent):
2762         * inspector/front-end/DOMStorage.js:
2763         (WebInspector.DOMStorage):
2764         (WebInspector.DOMStorage.prototype.get id):
2765         (WebInspector.DOMStorage.prototype.get domain):
2766         (WebInspector.DOMStorage.prototype.getEntries):
2767         (WebInspector.DOMStorage.prototype.setItem):
2768         (WebInspector.DOMStorage.prototype.removeItem):
2769         (WebInspector.DOMStorageModel):
2770         (WebInspector.DOMStorageModel.prototype._addDOMStorage):
2771         (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared):
2772         (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved):
2773         (WebInspector.DOMStorageModel.prototype._domStorageItemAdded):
2774         (WebInspector.DOMStorageModel.prototype.storageForId):
2775         (WebInspector.DOMStorageModel.prototype.storages):
2776         (WebInspector.DOMStorageDispatcher.prototype.addDOMStorage):
2777         * inspector/front-end/DOMStorageItemsView.js:
2778         (WebInspector.DOMStorageItemsView.prototype._update):
2779         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
2780         (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
2781         * inspector/front-end/ResourcesPanel.js:
2782         (WebInspector.ResourcesPanel):
2783         (WebInspector.ResourcesPanel.prototype._initialize):
2784         (WebInspector.ResourcesPanel.prototype._domStorageAdded):
2785         (WebInspector.ResourcesPanel.prototype._addDOMStorage):
2786         (WebInspector.DOMStorageTreeElement):
2787         (WebInspector.DOMStorageTreeElement.prototype.get itemURL):
2788         * page/DOMWindow.cpp:
2789         (WebCore::DOMWindow::sessionStorage):
2790         (WebCore::DOMWindow::localStorage):
2791
2792 2013-02-21  Vsevolod Vlasov  <vsevik@chromium.org>
2793
2794         Web Inspector: Get rid of parsedURL in uiSourceCode, use name and path for displayName instead.
2795         https://bugs.webkit.org/show_bug.cgi?id=110335
2796
2797         Reviewed by Alexander Pavlov.
2798
2799         Replaced UISourceCode.parsedURL with UISourceCode.displayName().
2800
2801         * inspector/front-end/NavigatorView.js:
2802         (WebInspector.NavigatorView.prototype._updateScriptTitle):
2803         (WebInspector.NavigatorView.prototype.getOrCreateFolderTreeElement):
2804         (WebInspector.NavigatorFolderTreeElement):
2805         * inspector/front-end/ResourceUtils.js:
2806         (WebInspector.displayNameForURL):
2807         * inspector/front-end/RevisionHistoryView.js:
2808         (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem):
2809         * inspector/front-end/UISourceCode.js:
2810         (WebInspector.UISourceCode):
2811         (WebInspector.UISourceCode.prototype.displayName):
2812         (WebInspector.UISourceCode.prototype.urlChanged):
2813
2814 2013-02-21  Alexander Pavlov  <apavlov@chromium.org>
2815
2816         Web Inspector: Local/session storage tree items in the Resources panel after page refresh are not shown
2817         https://bugs.webkit.org/show_bug.cgi?id=109572
2818
2819         Reviewed by Vsevolod Vlasov.
2820
2821         * CMakeLists.txt:
2822         * GNUmakefile.list.am:
2823         * Target.pri:
2824         * WebCore.gypi:
2825         * WebCore.order:
2826         * WebCore.vcproj/WebCore.vcproj:
2827         * WebCore.vcxproj/WebCore.vcxproj:
2828         * WebCore.vcxproj/WebCore.vcxproj.filters:
2829         * WebCore.xcodeproj/project.pbxproj:
2830         * dom/WebCoreMemoryInstrumentation.cpp:
2831         (WebCore):
2832         * dom/WebCoreMemoryInstrumentation.h:
2833         (WebCoreMemoryTypes):
2834         * inspector/InjectedScriptSource.js:
2835         (.):
2836         * inspector/Inspector.json:
2837         * inspector/InspectorAllInOne.cpp:
2838         * inspector/InspectorController.cpp:
2839         (WebCore::InspectorController::InspectorController):
2840         * inspector/InspectorDOMStorageAgent.cpp:
2841         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2842         (WebCore::InspectorDOMStorageAgent::clearFrontend):
2843         (WebCore::InspectorDOMStorageAgent::isEnabled):
2844         (WebCore::InspectorDOMStorageAgent::enable):
2845         (WebCore::InspectorDOMStorageAgent::disable):
2846         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2847         (WebCore::toErrorString):
2848         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2849         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2850         (WebCore::InspectorDOMStorageAgent::storageId):
2851         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2852         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2853         (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
2854         * inspector/InspectorDOMStorageAgent.h:
2855         (WebCore):
2856         (WebCore::InspectorDOMStorageAgent::create):
2857         (InspectorDOMStorageAgent):
2858         * inspector/InspectorDOMStorageResource.cpp: Removed.
2859         * inspector/InspectorDOMStorageResource.h: Removed.
2860         * inspector/InspectorInstrumentation.cpp:
2861         (WebCore):
2862         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2863         * inspector/InspectorInstrumentation.h:
2864         (InspectorInstrumentation):
2865         * inspector/InspectorPageAgent.cpp:
2866         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
2867         (WebCore):
2868         * inspector/InspectorPageAgent.h:
2869         (InspectorPageAgent):
2870         * inspector/front-end/DOMStorage.js:
2871         (WebInspector.DOMStorage):
2872         (WebInspector.DOMStorage.storageId):
2873         (WebInspector.DOMStorage.prototype.get id):
2874         (WebInspector.DOMStorage.prototype.get securityOrigin):
2875         (WebInspector.DOMStorage.prototype.getItems):
2876         (WebInspector.DOMStorage.prototype.setItem):
2877         (WebInspector.DOMStorage.prototype.removeItem):
2878         (WebInspector.DOMStorageModel):
2879         (WebInspector.DOMStorageModel.prototype._securityOriginAdded):
2880         (WebInspector.DOMStorageModel.prototype._securityOriginRemoved):
2881         (WebInspector.DOMStorageModel.prototype._storageKey):
2882         (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared):
2883         (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved):
2884         (WebInspector.DOMStorageModel.prototype._domStorageItemAdded):
2885         (WebInspector.DOMStorageModel.prototype.storageForId):
2886         (WebInspector.DOMStorageModel.prototype.storages):
2887         * inspector/front-end/DOMStorageItemsView.js:
2888         (WebInspector.DOMStorageItemsView.prototype._update):
2889         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageItems):
2890         (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageItems):
2891         * inspector/front-end/ResourcesPanel.js:
2892         (WebInspector.ResourcesPanel):
2893         (WebInspector.ResourcesPanel.prototype._initialize):
2894         (WebInspector.ResourcesPanel.prototype._domStorageAdded):
2895         (WebInspector.ResourcesPanel.prototype._domStorageRemoved):
2896         (WebInspector.ResourcesPanel.prototype._populateDOMStorageTree):
2897         (WebInspector.DOMStorageTreeElement):
2898         (WebInspector.DOMStorageTreeElement.prototype.get itemURL):
2899         * page/DOMWindow.cpp:
2900         (WebCore::DOMWindow::sessionStorage):
2901         (WebCore::DOMWindow::localStorage):
2902
2903 2013-02-19  Eugene Klyuchnikov  <eustas@chromium.org>
2904
2905         Web Inspector: [Console] Add console API message types for profile/profileEnd.
2906         https://bugs.webkit.org/show_bug.cgi?id=109790
2907
2908         Reviewed by Pavel Feldman.
2909
2910         With profile/profileEnd message types we will gain more control over
2911         output messages.
2912
2913         * English.lproj/localizedStrings.js: Added corresponging strings.
2914         * inspector/ConsoleAPITypes.h: Added enum members.
2915         * inspector/Inspector.json: Ditto.
2916         * inspector/front-end/ConsoleModel.js: Ditto.
2917         * inspector/ConsoleMessage.cpp:
2918         (WebCore::messageTypeValue): Added cases.
2919         * inspector/InspectorProfilerAgent.cpp: Adopted changes.
2920         * inspector/front-end/inspector.js: Ditto.
2921         * inspector/front-end/ConsoleMessage.js:
2922         Added message generators for introduced message types.
2923         * inspector/front-end/ProfilesPanel.js:
2924         Turned showProfileForURL(url) to showProfile(typeId, uid).
2925         * inspector/front-end/ProfilesPanelDescriptor.js:
2926         (WebInspector.ProfilesPanelDescriptor.resolveProfileTitle): Added.
2927         * inspector/front-end/ResourceUtils.js: Removed linkifier plugins.
2928
2929 2013-02-21  Tamas Czene  <tczene@inf.u-szeged.hu>
2930
2931         OpenCL implementation of FEMerge filter.
2932         https://bugs.webkit.org/show_bug.cgi?id=110193
2933
2934         Reviewed by Zoltan Herczeg.
2935
2936         In case of odd number of parameters the first parameter is copied to the destination image and
2937         the rest of the parameters are merged in pairs.
2938
2939         * Target.pri:
2940         * platform/graphics/filters/FEMerge.h:
2941         (FEMerge):
2942         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
2943         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
2944         (FilterContextOpenCL):
2945         * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Added.
2946         (WebCore):
2947         (WebCore::FilterContextOpenCL::compileFEMerge):
2948         (WebCore::FilterContextOpenCL::copy): This is a simple copy method.
2949         (WebCore::FilterContextOpenCL::applyFEMerge):
2950         (WebCore::FEMerge::platformApplyOpenCL):
2951
2952 2013-02-21  Keishi Hattori  <keishi@webkit.org>
2953
2954         Add event dispatch class for the new calendar picker
2955         https://bugs.webkit.org/show_bug.cgi?id=110131
2956
2957         Reviewed by Kent Tamura.
2958
2959         Adding event dispatcher class as part of the new calendar picker patch at Bug 109439.
2960
2961         No new tests. Code is not yet used.
2962
2963         * Resources/pagepopups/calendarPicker.js:
2964         (EventEmitter):
2965         (EventEmitter.prototype.on): Adds a callback for an event.
2966         (EventEmitter.prototype.hasListener): Returns true if more than one listeners exist for an event type.
2967         (EventEmitter.prototype.removeListener): Removes an event listener.
2968         (EventEmitter.prototype.dispatchEvent): Dispatches an event to all callbacks. Takes variable number of arguments.
2969
2970 2013-02-21  Ken Kania  <kkania@chromium.org>
2971
2972         Web Inspector: Add command for selecting files for file input element
2973         https://bugs.webkit.org/show_bug.cgi?id=109308
2974
2975         Reviewed by Pavel Feldman.
2976
2977         Test: inspector-protocol/dom/setFileInputFiles.html
2978
2979         * inspector/Inspector.json:
2980         * inspector/InspectorClient.h:
2981         (WebCore::InspectorClient::canSetFileInputFiles):
2982         (InspectorClient):
2983         * inspector/InspectorController.cpp:
2984         (WebCore::InspectorController::InspectorController):
2985         * inspector/InspectorDOMAgent.cpp:
2986         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2987         (WebCore::InspectorDOMAgent::setFileInputFiles):
2988         (WebCore):
2989         * inspector/InspectorDOMAgent.h:
2990         (WebCore):
2991         (WebCore::InspectorDOMAgent::create):
2992         (InspectorDOMAgent):
2993
2994 2013-02-21  Pan Deng  <pan.deng@intel.com>
2995
2996         [Web Inspector]Add WebSocket networking events in Timeline panel.
2997         https://bugs.webkit.org/show_bug.cgi?id=105527.
2998
2999         Reviewed by Pavel Feldman.
3000
3001         This patch add four WebSocket networking events in Timeline panel. The Events
3002         are CreateWebSocket, SendWebSocketHandshakeRequest, ReceiveWebSocketHandShakeResponse
3003         and DestoryWebSocket. Thanks to Kitamura san's previous work.
3004
3005         Test: http/tests/inspector/websocket/timeline-websocket-event.html
3006
3007         * English.lproj/localizedStrings.js:
3008         * Modules/websockets/WebSocketChannel.cpp: Add protocol information
3009         (WebCore::WebSocketChannel::connect):
3010         * inspector/InspectorInstrumentation.cpp:
3011         (WebCore):
3012         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl): Add Timeline agent instrumentation for websocket
3013         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): Ditto
3014         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl): Ditto
3015         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl): Ditto
3016         * inspector/InspectorInstrumentation.h:
3017         (InspectorInstrumentation):
3018         (WebCore::InspectorInstrumentation::didCreateWebSocket):
3019         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
3020         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
3021         (WebCore::InspectorInstrumentation::didCloseWebSocket):
3022         * inspector/InspectorTimelineAgent.cpp:
3023         (TimelineRecordType):
3024         (WebCore):
3025         (WebCore::InspectorTimelineAgent::didCreateWebSocket): Add Timeline record for websocket create
3026         (WebCore::InspectorTimelineAgent::addWebSocketRecord): Add general websocket record
3027         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest): Add Timeline record for websocket handshake request send
3028         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse): Add Timeline record for websocket handshake response receive
3029         (WebCore::InspectorTimelineAgent::didDestroyWebSocket): Add Timeline record for websocket destroy
3030         * inspector/InspectorTimelineAgent.h:
3031         (WebCore):
3032         (InspectorTimelineAgent):
3033         * inspector/TimelineRecordFactory.h:
3034         (TimelineRecordFactory):
3035         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
3036         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
3037         * inspector/front-end/TimelineModel.js: Add Timeline record type for websocket
3038         * inspector/front-end/TimelinePresentationModel.js:
3039         (WebInspector.TimelinePresentationModel._initRecordStyles):
3040         (WebInspector.TimelinePresentationModel.prototype.reset): Add slot to store WebSocket Create record
3041         (WebInspector.TimelinePresentationModel.Record):
3042         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview): Add PopupContent for websocket record, including url and protocol
3043
3044 2013-02-21  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
3045
3046         [Qt] Fix pkg-config dependencies of QtWebKit itself
3047
3048         Reviewed by Simon Hausmann.
3049
3050         Don't override QMAKE_PKGCONFIG_REQUIRES needlessly.
3051
3052         * WebCore.pri:
3053
3054 2013-02-21  Nils Barth  <nbarth@google.com>
3055
3056         File upload control doesn't apply CSS vertical padding or border to file name
3057         https://bugs.webkit.org/show_bug.cgi?id=109011
3058
3059         Reviewed by Hajime Morrita.
3060
3061         Test: fast/forms/file/file-vertical-padding-border.html
3062
3063         * rendering/RenderFileUploadControl.cpp:
3064             Add borderTop() and paddingTop() when computing position.
3065         (WebCore::RenderFileUploadControl::paintObject):
3066
3067 2013-02-20  Alexey Proskuryakov  <ap@apple.com>
3068
3069         Stop hardcoding knowledge about blob protocol in ResourceHandle
3070         https://bugs.webkit.org/show_bug.cgi?id=110382
3071
3072         Reviewed by Anders Carlsson.
3073
3074         * platform/network/BlobRegistry.h:
3075         * platform/network/chromium/BlobRegistryProxy.h:
3076         Removed loadResourceSynchronously(). Chromium did not even implement it, and
3077         cross-platform code doesn't need it any more either.
3078
3079         * platform/network/BlobRegistryImpl.cpp:
3080         (WebCore::loadResourceSynchronously): A function to load a blob synchronously,
3081         suitable for being in a ResourceHandle map.
3082         (WebCore::registerBlobResourceHandleConstructor): Register loadResourceSynchronously too.
3083         (WebCore::BlobRegistryImpl::createResourceHandle): Don't make policy decisions here,
3084         it's just a registry. Moved code for checking request method down to BlobResourceHandle.
3085
3086         * platform/network/BlobRegistryImpl.h: Removed BlobRegistryImpl::loadResourceSynchronously().
3087         A registry shouldn't load resources, and it already has enough accessors to implement
3088         this externally.
3089
3090         * platform/network/BlobResourceHandle.h:
3091         * platform/network/BlobResourceHandle.cpp:
3092         (WebCore::BlobResourceHandle::createAsync): Renamed from create(), to make it clear
3093         that it's not OK to call from synchronous loader. Moved method check here.
3094         (WebCore::BlobResourceHandle::loadResourceSynchronously): Moved method check here.
3095         We used to fall through to NSURLConnection based loader when method was not GET,
3096         which of course resulted in an error eventually, but was just wrong.
3097
3098         * platform/network/ResourceHandle.cpp:
3099         (WebCore::builtinResourceHandleSynchronousLoaderMap): Added a map for synchronous case.
3100         (WebCore::ResourceHandle::registerBuiltinSynchronousLoader): Ditto.
3101         (WebCore::ResourceHandle::loadResourceSynchronously): We no longer need to hardcode
3102         knowledge about blobRegistry and blobs here.
3103
3104         * platform/network/ResourceHandle.h: Added registerBuiltinSynchronousLoader().
3105
3106         * platform/network/chromium/ResourceHandle.h: Removed loadResourceSynchronously(),
3107         which was not implemented for Chromium.
3108
3109 2013-02-20  Vsevolod Vlasov  <vsevik@chromium.org>
3110
3111         Web Inspector: TabbedEditorContainer and OpenResourceDialog should show uiSourceCode path and name instead of parsedURL
3112         https://bugs.webkit.org/show_bug.cgi?id=110334
3113
3114         Reviewed by Alexander Pavlov.
3115
3116         Introduced uiSourceCode.name() that returns a name based on uiSourceCode path.
3117         OpenResourceDialog now shows uiSourceCode workspace path as a subtitle.
3118         TabbedEditorContainer now shows uiSourceCode name in the tab header.
3119
3120         * inspector/front-end/FilteredItemSelectionDialog.js:
3121         (WebInspector.OpenResourceDialog.filterOutEmptyURLs):
3122         (WebInspector.OpenResourceDialog):
3123         (WebInspector.OpenResourceDialog.prototype.itemTitleAt):
3124         (WebInspector.OpenResourceDialog.prototype.itemSubtitleAt):
3125         (WebInspector.OpenResourceDialog.prototype.itemKeyAt):
3126         * inspector/front-end/NavigatorView.js:
3127         (WebInspector.NavigatorView.prototype._updateScriptTitle):
3128         * inspector/front-end/TabbedEditorContainer.js:
3129         (WebInspector.TabbedEditorContainer.prototype._titleForFile):
3130         * inspector/front-end/UISourceCode.js:
3131         (WebInspector.UISourceCode.prototype.name):
3132
3133 2013-02-20  Pavel Feldman  <pfeldman@chromium.org>
3134
3135         Web Inspector: debugger buttons are scrolled along with the sidebar content.
3136         https://bugs.webkit.org/show_bug.cgi?id=110434
3137
3138         Reviewed by Vsevolod Vlasov.
3139
3140         * inspector/front-end/scriptsPanel.css:
3141         (div.sidebar-pane-stack#scripts-debug-sidebar-contents, #scripts-sidebar-stack-pane):
3142
3143 2013-02-20  Wei James  <james.wei@intel.com>
3144
3145         ChannelMergerNode may need check for deferred updating of output channels
3146         https://bugs.webkit.org/show_bug.cgi?id=108863
3147
3148         There can in rare cases be a slight delay before the output bus is updated
3149         to the new number of channels because of tryLocks() in the context's
3150         updating system. So need to check the channel number before processing.
3151
3152         Reviewed by Chris Rogers.
3153
3154         * Modules/webaudio/ChannelMergerNode.cpp:
3155         (WebCore::ChannelMergerNode::ChannelMergerNode):
3156         (WebCore::ChannelMergerNode::process):
3157         (WebCore::ChannelMergerNode::checkNumberOfChannelsForInput):
3158         * Modules/webaudio/ChannelMergerNode.h:
3159         (ChannelMergerNode):
3160
3161 2013-02-20  Pan Deng  <pan.deng@intel.com>
3162
3163         [Web Inspector] Fix Sort by Initiator functionality of Network Panel.
3164         https://bugs.webkit.org/show_bug.cgi?id=109135.
3165
3166         Reviewed by Pavel Feldman.
3167
3168         A refactor for request initiator types, and the sort by Initiator functionality 
3169         was changed to sort by url and line number that displayed in initiator cell.
3170
3171         No new tests.
3172
3173         * inspector/front-end/NetworkPanel.js:
3174         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): save initiator displayedURL and displayedLineNumber
3175         (WebInspector.NetworkDataGridNode.InitiatorComparator):
3176         * inspector/front-end/NetworkRequest.js:
3177
3178 2013-02-20  Eric Seidel  <eric@webkit.org>
3179
3180         WebVTTParser copies character buffer more often than necessary
3181         https://bugs.webkit.org/show_bug.cgi?id=103319
3182
3183         Reviewed by Eric Carlson.
3184
3185         Previously this codepath was creating a String just to parse the timestamp
3186         and then if the timestamp was valid, was creating a second string.
3187         I've fixed it to only create one string and use it in both places.
3188         I also fixed this codepath to use 8bit strings when possible, per the FIXME.
3189
3190         * html/track/WebVTTParser.cpp:
3191         (WebCore::WebVTTParser::constructTreeFromToken):
3192
3193 2013-02-20  Mike West  <mkwst@chromium.org>
3194
3195         Mouseup event does not fire on Scroll Bar
3196         https://bugs.webkit.org/show_bug.cgi?id=25811
3197
3198         Reviewed by Tony Chang.
3199
3200         Currently, clicking on a scrollbar fires a mousedown event, but not a
3201         mouseup event. This causes problems for code like jQuery UI's
3202         draggable[1], as the drag starts, but is never cancelled. Other use
3203         cases are noted in the slightly old Chromium bug[2].
3204
3205         If a mouseup event is received after a mousedown event on a scrollbar,
3206         this patch dispatches a mouseup event on the same node the mousedown
3207         event dispatched on. This matches Gecko's behavior.
3208
3209         [1]: http://bugs.jqueryui.com/ticket/6925
3210         [2]: http://crbug.com/14204
3211
3212         Tests: fast/scrolling/scrollbar-mousedown-mouseup.html
3213                fast/scrolling/scrollbar-mousedown-move-mouseup.html
3214
3215         * page/EventHandler.cpp:
3216         (WebCore::EventHandler::handleMouseReleaseEvent):
3217             If a mouseup event follow a mousedown event on a scrollbar,
3218             dispatch an event on the same node from which the mousedown event
3219             was triggered.
3220
3221 2013-02-20  Takashi Sakamoto  <tasak@google.com>
3222
3223         [Refactoring] Make m_state an on-stack object
3224         https://bugs.webkit.org/show_bug.cgi?id=109909
3225
3226         Reviewed by Antti Koivisto.
3227
3228         Mode m_state, an instance of StyleResolver::State, an on-stack object.
3229         The state is only required in styleForElement, styleForKeyframe and
3230         so on. No need to keep the state outside of those methods.
3231
3232         No new tests, because just refactoring.
3233
3234         * css/BasicShapeFunctions.cpp:
3235         (WebCore::convertToLength):
3236         (WebCore::basicShapeForValue):
3237         * css/BasicShapeFunctions.h:
3238         (WebCore):
3239         Replaced StyleResolver* with StyleResolver::State&.
3240         * css/CSSGradientValue.cpp:
3241         (WebCore::CSSGradientValue::gradientWithStylesResolved):
3242         * css/CSSGradientValue.h:
3243         (CSSGradientValue):
3244         Replaced StyleResolver* with StyleResolver::State&.
3245         * css/CSSToStyleMap.cpp:
3246         (WebCore::CSSToStyleMap::style):
3247         (WebCore::CSSToStyleMap::rootElementStyle):
3248         (WebCore::CSSToStyleMap::useSVGZoomRules):
3249         (WebCore::CSSToStyleMap::styleImage):
3250         * css/CSSToStyleMap.h:
3251         (WebCore):
3252         (WebCore::CSSToStyleMap::CSSToStyleMap):
3253         (CSSToStyleMap):
3254         Replaced StyleResolver* with StyleResolver::State&.
3255         * css/SVGCSSStyleSelector.cpp:
3256         (WebCore::StyleResolver::applySVGProperty):
3257         Replaced m_state with state which is given as an argument of
3258         applySVGProperty.
3259         * css/StyleBuilder.cpp:
3260         (WebCore::ApplyPropertyExpanding::applyInheritValue):
3261         (WebCore::ApplyPropertyExpanding::applyInitialValue):
3262         (WebCore::ApplyPropertyExpanding::applyValue):
3263         (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
3264         (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
3265         (WebCore::ApplyPropertyDefaultBase::applyValue):
3266         (WebCore::ApplyPropertyDefault::applyValue):
3267         (WebCore::ApplyPropertyNumber::applyValue):
3268         (WebCore::ApplyPropertyStyleImage::applyValue):
3269         (WebCore::ApplyPropertyAuto::applyInheritValue):
3270         (WebCore::ApplyPropertyAuto::applyInitialValue):
3271         (WebCore::ApplyPropertyAuto::applyValue):
3272         (WebCore::ApplyPropertyClip::convertToLength):
3273         (WebCore::ApplyPropertyClip::applyInheritValue):
3274         (WebCore::ApplyPropertyClip::applyInitialValue):
3275         (WebCore::ApplyPropertyClip::applyValue):
3276         (WebCore::ApplyPropertyColor::applyInheritValue):
3277         (WebCore::ApplyPropertyColor::applyInitialValue):
3278         (WebCore::ApplyPropertyColor::applyValue):
3279         (WebCore::ApplyPropertyColor::applyColorValue):
3280         (WebCore::ApplyPropertyDirection::applyValue):
3281         (WebCore::ApplyPropertyLength::applyValue):
3282         (WebCore::ApplyPropertyString::applyValue):
3283         (WebCore::ApplyPropertyBorderRadius::applyValue):
3284         (WebCore::ApplyPropertyFillLayer::applyInheritValue):
3285         (WebCore::ApplyPropertyFillLayer::applyInitialValue):
3286         (WebCore::ApplyPropertyFillLayer::applyValue):
3287         (WebCore::ApplyPropertyComputeLength::applyValue):
3288         (WebCore::ApplyPropertyFont::applyInheritValue):
3289         (WebCore::ApplyPropertyFont::applyInitialValue):
3290         (WebCore::ApplyPropertyFont::applyValue):
3291         (WebCore::ApplyPropertyFontSize::applyInheritValue):
3292         (WebCore::ApplyPropertyFontSize::applyInitialValue):
3293         (WebCore::ApplyPropertyFontSize::applyValue):
3294         (WebCore::ApplyPropertyFontWeight::applyValue):
3295         (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue):
3296         (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue):
3297         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
3298         (WebCore::ApplyPropertyBorderImage::applyValue):
3299         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
3300         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
3301         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
3302         (WebCore::ApplyPropertyBorderImageSource::applyValue):
3303         (WebCore::ApplyPropertyCounter::emptyFunction):
3304         (WebCore::ApplyPropertyCounter::applyInheritValue):
3305         (WebCore::ApplyPropertyCounter::applyValue):
3306         (WebCore::ApplyPropertyCursor::applyInheritValue):
3307         (WebCore::ApplyPropertyCursor::applyInitialValue):
3308         (WebCore::ApplyPropertyCursor::applyValue):
3309         (WebCore::ApplyPropertyTextAlign::applyValue):
3310         (WebCore::ApplyPropertyTextDecoration::applyValue):
3311         (WebCore::ApplyPropertyLineHeight::applyValue):
3312         (WebCore::ApplyPropertyPageSize::applyInheritValue):
3313         (WebCore::ApplyPropertyPageSize::applyInitialValue):
3314         (WebCore::ApplyPropertyPageSize::applyValue):
3315         (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue):
3316         (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue):
3317         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
3318         (WebCore::ApplyPropertyAnimation::map):
3319         (WebCore::ApplyPropertyAnimation::applyInheritValue):
3320         (WebCore::ApplyPropertyAnimation::applyInitialValue):
3321         (WebCore::ApplyPropertyAnimation::applyValue):
3322         (WebCore::ApplyPropertyOutlineStyle::applyInheritValue):
3323         (WebCore::ApplyPropertyOutlineStyle::applyInitialValue):
3324         (WebCore::ApplyPropertyOutlineStyle::applyValue):
3325         (WebCore::ApplyPropertyResize::applyValue):
3326         (WebCore::ApplyPropertyVerticalAlign::applyValue):
3327         (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
3328         (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
3329         (WebCore::ApplyPropertyAspectRatio::applyValue):
3330         (WebCore::ApplyPropertyZoom::resetEffectiveZoom):
3331         (WebCore::ApplyPropertyZoom::applyInheritValue):
3332         (WebCore::ApplyPropertyZoom::applyInitialValue):
3333         (WebCore::ApplyPropertyZoom::applyValue):
3334         (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
3335         (WebCore::ApplyPropertyDisplay::applyInheritValue):
3336         (WebCore::ApplyPropertyDisplay::applyInitialValue):
3337         (WebCore::ApplyPropertyDisplay::applyValue):
3338         (WebCore::ApplyPropertyClipPath::applyValue):
3339         (WebCore::ApplyPropertyExclusionShape::applyValue):
3340         (WebCore::ApplyPropertyImageResolution::applyInheritValue):
3341         (WebCore::ApplyPropertyImageResolution::applyInitialValue):
3342         (WebCore::ApplyPropertyImageResolution::applyValue):
3343         * css/StyleBuilder.h:
3344         (WebCore):
3345         (PropertyHandler):
3346         (WebCore::PropertyHandler::applyInheritValue):
3347         (WebCore::PropertyHandler::applyInitialValue):
3348         (WebCore::PropertyHandler::applyValue):
3349         Replaced StyleResolver* with StyleResolver::State&.
3350         * css/StyleResolver.cpp:
3351         (WebCore):
3352         (WebCore::StyleResolver::StyleResolver):
3353         Removed m_styleMap. Now m_styleMap is an on-stack object.
3354         (WebCore::StyleResolver::collectMatchingRules):
3355         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3356         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3357         (WebCore::StyleResolver::matchScopedAuthorRules):
3358         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
3359         (WebCore::StyleResolver::matchHostRules):
3360         (WebCore::StyleResolver::matchAuthorRules):
3361         (WebCore::StyleResolver::matchUserRules):
3362         (WebCore::StyleResolver::matchUARules):
3363         (WebCore::StyleResolver::collectMatchingRulesForList):
3364         (WebCore::StyleResolver::sortMatchedRules):
3365         (WebCore::StyleResolver::matchAllRules):
3366         (WebCore::StyleResolver::initElement):
3367         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3368         (WebCore::StyleResolver::canShareStyleWithControl):
3369         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3370         (WebCore::StyleResolver::canShareStyleWithElement):
3371         (WebCore::StyleResolver::findSiblingForStyleSharing):
3372         (WebCore::StyleResolver::locateSharedStyle):
3373         (WebCore::StyleResolver::styleForElement):
3374         (WebCore::StyleResolver::styleForKeyframe):
3375         (WebCore::StyleResolver::keyframeStylesForAnimation):
3376         (WebCore::StyleResolver::pseudoStyleForElement):
3377         (WebCore::StyleResolver::styleForPage):
3378         (WebCore::StyleResolver::defaultStyleForElement):
3379         (WebCore::StyleResolver::adjustRenderStyle):
3380         (WebCore::StyleResolver::updateFont):
3381         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3382         (WebCore::StyleResolver::ruleMatches):
3383         (WebCore::StyleResolver::checkRegionSelector):
3384         (WebCore::StyleResolver::applyProperties):
3385         (WebCore::StyleResolver::applyMatchedProperties):
3386         (WebCore::StyleResolver::isLeftPage):
3387         (WebCore::StyleResolver::applyPropertyWithNullCheck):
3388         (WebCore::StyleResolver::applyFontPropertyToStyle):
3389         (WebCore::StyleResolver::resolveVariables):
3390         (WebCore::StyleResolver::applyProperty):
3391         (WebCore::StyleResolver::styleImage):
3392         (WebCore::StyleResolver::cachedOrPendingFromValue):
3393         (WebCore::StyleResolver::generatedOrPendingFromValue):
3394         (WebCore::StyleResolver::setOrPendingFromValue):
3395         (WebCore::StyleResolver::cursorOrPendingFromValue):
3396         (WebCore::StyleResolver::checkForTextSizeAdjust):
3397         (WebCore::StyleResolver::checkForZoomChange):
3398         (WebCore::StyleResolver::checkForGenericFamilyChange):
3399         (WebCore::StyleResolver::initializeFontStyle):
3400         (WebCore::StyleResolver::setFontSize):
3401         (WebCore::StyleResolver::colorFromPrimitiveValue):
3402         (WebCore::StyleResolver::loadPendingSVGDocuments):
3403         (WebCore::StyleResolver::styleShader):
3404         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
3405         (WebCore::StyleResolver::loadPendingShaders):
3406         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
3407         (WebCore::StyleResolver::parseCustomFilterParameter):
3408         (WebCore::StyleResolver::parseCustomFilterParameterList):
3409         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
3410         (WebCore::StyleResolver::createCustomFilterOperation):
3411         (WebCore::StyleResolver::createFilterOperations):
3412         (WebCore::StyleResolver::loadPendingImage):
3413         (WebCore::StyleResolver::loadPendingImages):
3414         (WebCore::StyleResolver::loadPendingResources):
3415         Just replaced m_state with state and added one more parameter to
3416         provide the state.
3417         (WebCore::StyleResolver::reportMemoryUsage):
3418         Since m_state was removed, removed a code for reporting m_state's
3419         memory usage.
3420         * css/StyleResolver.h:
3421         (StyleResolver):
3422         (WebCore::StyleResolver::isRightPage):
3423         (WebCore::StyleResolver::State::State):
3424         (WebCore::StyleResolver::State::document):
3425         Since State::m_element is not always available (sometimes, 0),
3426         added m_document to State and modified to return the m_document.
3427         (WebCore::StyleResolver::State::useSVGZoomRules):
3428         Moved StyleResolver to State.
3429         (State):
3430         * html/canvas/CanvasRenderingContext2D.cpp:
3431         (WebCore::CanvasRenderingContext2D::setFont):
3432         Moved the code, updating a style by using a given StylePropertySet,
3433         to StyleResolver.
3434
3435 2013-02-20  Ojan Vafai  <ojan@chromium.org>
3436
3437         AutoTableLayout applies min-width redundantly with RenderTable
3438         https://bugs.webkit.org/show_bug.cgi?id=110426
3439
3440         Reviewed by Emil A Eklund.
3441
3442         * rendering/AutoTableLayout.cpp:
3443         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
3444         This code used to do something, but has since been superceded by
3445         code in RenderTable::computePreferredLogicalWidths.
3446
3447 2013-02-20  Dirk Schulze  <krit@webkit.org>
3448
3449         Enable CANVAS_PATH flag
3450         https://bugs.webkit.org/show_bug.cgi?id=108508
3451
3452         Uneviewed attempt to fix Qt minimal build.
3453
3454         * html/canvas/DOMPath.h:
3455         (WebCore::DOMPath::DOMPath):
3456
3457 \2013-02-20  Mark Lam  <mark.lam@apple.com>