2011-02-24 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-02-24  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Unreviewed build fix.
4
5         * inspector/InspectorDOMAgent.cpp:
6         (WebCore::InspectorDOMAgent::removeAttribute):
7         * inspector/InspectorResourceAgent.cpp:
8         (WebCore::InspectorResourceAgent::cachedResources):
9         * inspector/InspectorRuntimeAgent.cpp:
10         (WebCore::InspectorRuntimeAgent::evaluate):
11
12 2011-02-24  Zan Dobersek  <zandobersek@gmail.com>
13
14         Reviewed by Eric Seidel.
15
16         [gtk] Failing collinear arcTo canvas tests
17         https://bugs.webkit.org/show_bug.cgi?id=54658
18
19         Check for collinearity of the three points that affect how arcTo call
20         results. This behavior is in accordance with the HTML standard.
21
22         No new tests added as this is already covered by at least two tests.
23
24         * platform/graphics/cairo/PathCairo.cpp:
25         (WebCore::areaOfTriangleFormedByPoints):
26         (WebCore::Path::addArcTo):
27
28 2011-02-24  Ilya Tikhonovsky  <loislo@chromium.org>
29
30         Reviewed by Pavel Feldman.
31
32         Web Inspector: There is a validator of the protocol message format.
33
34         It has two parts. InspectorBackendStub.js is the frontend part.
35         InspectorBackendDispatcher.cpp is the backend part.
36         Both parts are checking protocol message format and report the error if
37         the message has not enough fields or the types of fields do not match with
38         Inspector.idl specification. These validators are generated automatically.
39
40         In addition, we have a number of places at the backend where we check the
41         function arguments and do nothing if the arguments are invalid
42         from the business logic point of view.
43
44         This patch bring us an ability to report a custom error from such function to the frontend.
45
46         https://bugs.webkit.org/show_bug.cgi?id=54971
47
48         * inspector/CodeGeneratorInspector.pm:
49         * inspector/InjectedScriptHost.cpp:
50         * inspector/InspectorAgent.cpp:
51         * inspector/InspectorAgent.h:
52         * inspector/InspectorApplicationCacheAgent.cpp:
53         * inspector/InspectorApplicationCacheAgent.h:
54         * inspector/InspectorBrowserDebuggerAgent.cpp:
55         * inspector/InspectorBrowserDebuggerAgent.h:
56         * inspector/InspectorCSSAgent.cpp:
57         * inspector/InspectorCSSAgent.h:
58         * inspector/InspectorConsoleAgent.cpp:
59         * inspector/InspectorConsoleAgent.h:
60         * inspector/InspectorController.cpp:
61         * inspector/InspectorDOMAgent.cpp:
62         * inspector/InspectorDOMAgent.h:
63         * inspector/InspectorDOMStorageAgent.cpp:
64         * inspector/InspectorDOMStorageAgent.h:
65         * inspector/InspectorDatabaseAgent.cpp:
66         * inspector/InspectorDatabaseAgent.h:
67         * inspector/InspectorDebuggerAgent.cpp:
68         * inspector/InspectorDebuggerAgent.h:
69         * inspector/InspectorProfilerAgent.cpp:
70         * inspector/InspectorProfilerAgent.h:
71         * inspector/InspectorResourceAgent.cpp:
72         * inspector/InspectorResourceAgent.h:
73         * inspector/InspectorRuntimeAgent.cpp:
74         * inspector/InspectorRuntimeAgent.h:
75         * inspector/InspectorTimelineAgent.cpp:
76         * inspector/InspectorTimelineAgent.h:
77
78 2011-02-24  Ryosuke Niwa  <rniwa@webkit.org>
79
80         Reviewed by Ojan Vafai.
81
82         Crash when deleting inside a blockquote with a large offset
83         https://bugs.webkit.org/show_bug.cgi?id=55098
84
85         The bug was caused by inconsistency in lineBreakExistsAtPosition and breakOutOfEmptyMailBlockquotedParagraph.
86         While lineBreakExistsAtPosition was checking that a line break exists at the downstream of the given position,
87         breakOutOfEmptyMailBlockquotedParagraph wasn't using the downstream for caretPos. Fixed the bug by using
88         the downstream position to instantiate caretPos.
89
90         Co-author: Abhishek Arya <inferno@chromium.org>.
91
92         Test: editing/deleting/delete-blockquote-large-offsets.html
93
94         * editing/CompositeEditCommand.cpp:
95         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
96
97 2011-02-24  Robert Kroeger  <rjkroege@chromium.org>
98
99         Reviewed by Darin Fisher.
100
101         Added timestamps to PlatformTouchEvent etc.
102
103         PlatformTouchEvent doesn't have a timestamp and so
104         eventSender.leapForward cannot be used for touchevent based tests.
105         This change adds a timestamp to PlatformTouchEvent and initializes
106         it in a reasonable manner on Android and Qt platforms.
107
108         [chromium] [WebCore] [android] Touch events are missing time stamps
109         https://bugs.webkit.org/show_bug.cgi?id=53510
110
111         * platform/PlatformTouchEvent.h:
112         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
113         (WebCore::PlatformTouchEvent::timestamp):
114         * platform/android/PlatformTouchEventAndroid.cpp:
115         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
116         * platform/qt/PlatformTouchEventQt.cpp:
117         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
118
119 2011-02-24  Renata Hodovan  <reni@webkit.org>
120
121         Unreviewed GTK, Snow Leopard build fix for r79474.
122
123         * platform/graphics/filters/FEConvolveMatrix.cpp:
124         (WebCore::FEConvolveMatrix::setKernelUnitLength):
125         * platform/graphics/filters/FEConvolveMatrix.h:
126
127 2011-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
128
129         Reviewed by Xan Lopez.
130
131         Use IntRect instead of a pointer to a GtkAllocation struct to avoid
132         unnecessary memory allocations.
133
134         * plugins/PluginView.h:
135         * plugins/gtk/PluginViewGtk.cpp:
136         (WebCore::PluginView::setNPWindowIfNeeded):
137         (WebCore::PluginView::plugAddedCallback):
138
139 2011-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
140
141         Unreviewed. Fix the build with GTK+ 3.
142
143         * plugins/PluginView.h:
144
145 2011-02-23  Ryosuke Niwa  <rniwa@webkit.org>
146
147         Reviewed by Darin Adler.
148
149         Refactor HTMLEquivalent into a hierachy of classes
150         https://bugs.webkit.org/show_bug.cgi?id=55025
151
152         Converted HTMLEquivalent into a class.  Some logic in removeImplicitlyStyledElement is
153         extracted as member functions of HTMLEquivalent and its subclasses.
154
155         * editing/ApplyStyleCommand.cpp:
156         (WebCore::HTMLEquivalent::create): Added.
157         (WebCore::HTMLEquivalent::~HTMLEquivalent): Added.
158         (WebCore::HTMLEquivalent::matches): Returns true if the element is an equivalent, meaning that
159         the element's implicit style affects the property of this equivalence.
160         (WebCore::HTMLEquivalent::hasAttribute): Returns true if this equivalence requires attributes;
161         e.g. color, size, dir.
162         (WebCore::HTMLEquivalent::propertyExistsInStyle): Returns true if the property of this equivalence
163         exists in the specified style. e.g. if this equivalence is for size attribute and font-size property,
164         this function returns true if the specified style has font-size property set.
165         (WebCore::HTMLEquivalent::HTMLEquivalent): Added.
166         (WebCore::HTMLEquivalent::valueIsPresentInStyle): Returns true if the specified style has the
167         implicit style of the specified element of this equivalence.
168         (WebCore::HTMLEquivalent::addToStyle): Adds the implicit style of the element of this equivalence
169         to the specified mutable style.
170         (WebCore::HTMLEquivalentValueList::create): Added.
171         (WebCore::HTMLEquivalentValueList::HTMLEquivalentValueList): Added.
172         (WebCore::HTMLEquivalentValueList::valueIsPresentInStyle): Added.
173         (WebCore::HTMLEquivalentAttribute::create): Added.
174         (WebCore::HTMLEquivalentAttribute::matches): Added.
175         (WebCore::HTMLEquivalentAttribute::hasAttribute): Added.
176         (WebCore::HTMLEquivalentAttribute::attributeName): Added.
177         (WebCore::HTMLEquivalentAttribute::HTMLEquivalentAttribute): Added.
178         (WebCore::HTMLEquivalentAttribute::valueIsPresentInStyle): Added.
179         (WebCore::HTMLEquivalentAttribute::addToStyle): Added.
180         (WebCore::HTMLEquivalentAttribute::attributeValueAsCSSValue): Added.
181         (WebCore::HTMLEquivalentFontSizeAttribute::create): Added.
182         (WebCore::HTMLEquivalentFontSizeAttribute::HTMLEquivalentFontSizeAttribute): Added.
183         (WebCore::HTMLEquivalentFontSizeAttribute::attributeValueAsCSSValue): Added.
184         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Uses new classes.
185
186 2011-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
187
188         Unreviewed, rolling out r79510.
189         http://trac.webkit.org/changeset/79510
190         https://bugs.webkit.org/show_bug.cgi?id=55114
191
192         It made ~200 tests crash on Qt bot (Requested by Ossy_ on
193         #webkit).
194
195         * platform/text/TextBreakIterator.h:
196         * platform/text/TextBreakIteratorICU.cpp:
197         (WebCore::lineBreakIterator):
198         * platform/text/qt/TextBreakIteratorQt.cpp:
199         (WebCore::lineBreakIterator):
200         * rendering/RenderBlock.h:
201         * rendering/RenderBlockLineLayout.cpp:
202         (WebCore::RenderBlock::layoutInlineChildren):
203         (WebCore::RenderBlock::findNextLineBreak):
204         * rendering/RenderText.cpp:
205         (WebCore::RenderText::computePreferredLogicalWidths):
206         * rendering/break_lines.cpp:
207         (WebCore::nextBreakablePosition):
208         * rendering/break_lines.h:
209         (WebCore::isBreakable):
210
211 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
212
213         Reviewed by Mark Rowe.
214         
215         Used svn merge -r79502:79501 to roll out r79502 because it broke the
216         SnowLeopard and Leopard builds.
217
218         * WebCore.xcodeproj/project.pbxproj:
219         * platform/mac/HTMLConverter.h: Removed.
220         * platform/mac/HTMLConverter.mm: Removed.
221         * platform/mac/PasteboardMac.mm:
222         (WebCore::Pasteboard::writeSelection):
223
224 2011-02-23  Beth Dakin  <bdakin@apple.com>
225
226         Reviewed by Dan Bernstein.
227
228         Fix for <rdar://problem/9002157> Garbage in the bottom right corner of the window 
229         when scrolling
230
231         When there is both a horizontal and a vertical scrollbar, it is necessary to 
232         include the space between them in the invalidation.
233         * platform/ScrollableArea.cpp:
234         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
235
236 2011-02-23  Ned Holbrook  <nholbrook@apple.com>
237
238         Reviewed by Dan Bernstein.
239
240         Minimize calls to ubrk_setText()
241         https://bugs.webkit.org/show_bug.cgi?id=54912
242         <rdar://problem/9032774>
243
244         Avoid calling ubrk_setText() once per call to isBreakable() by using a LazyLineBreakIterator, which defers
245         break iterator creation until needed. This requires replacing the global line break iterator primitive with a
246         version that can be nested, since in some cases two iterators may need to be outstanding. In particular,
247         layoutInlineChildren() may indirectly call computePreferredLogicalWidths() and each may need an iterator.
248         In a test with a paragraph of Japanese text, this reduced the number of ubrk_setText() calls from 164 to 1.
249
250         * platform/text/TextBreakIterator.h: Add LazyLineBreakIterator.
251         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
252         (WebCore::LazyLineBreakIterator::~LazyLineBreakIterator):
253         (WebCore::LazyLineBreakIterator::string):
254         (WebCore::LazyLineBreakIterator::length):
255         (WebCore::LazyLineBreakIterator::get):
256         (WebCore::LazyLineBreakIterator::reset):
257         * platform/text/TextBreakIteratorICU.cpp: Replace lineBreakIterator() primitive with acquireLineBreakIterator()/releaseLineBreakIterator().
258         (WebCore::acquireLineBreakIterator):
259         (WebCore::releaseLineBreakIterator):
260         * platform/text/qt/TextBreakIteratorQt.cpp: Ditto TextBreakIteratorICU.cpp.
261         (WebCore::acquireLineBreakIterator):
262         (WebCore::releaseLineBreakIterator):
263         * rendering/RenderBlock.h:
264         * rendering/RenderBlockLineLayout.cpp:
265         (WebCore::RenderBlock::layoutInlineChildren): Pass a mapping of RenderText to LazyLineBreakIterator from one call of findNextLineBreak() to the next.
266         (WebCore::RenderBlock::findNextLineBreak): Use said mapping, resetting LazyLineBreakIterator for any newly-encountered RenderText.
267         * rendering/RenderText.cpp: Use a local LazyLineBreakIterator.
268         (WebCore::RenderText::computePreferredLogicalWidths):
269         * rendering/break_lines.cpp: Accept LazyLineBreakIterator rather than TextBreakIterator.
270         (WebCore::nextBreakablePosition):
271         * rendering/break_lines.h: Accept LazyLineBreakIterator rather than TextBreakIterator.
272         (WebCore::isBreakable):
273
274 2011-02-23  Anders Carlsson  <andersca@apple.com>
275
276         Fix build.
277
278         * platform/mac/HTMLConverter.h:
279
280 2011-02-17  Enrica Casucci  <enrica@apple.com>
281
282         Reviewed by Darin Adler.
283
284         REGRESSION: Copied content loses formatting on paste to external apps.
285         https://bugs.webkit.org/show_bug.cgi?id=47615
286         <rdar://problem/9001214>
287
288         This patch adds a way for WebKit2 to create NSAttributedStrings from
289         a DOM range without using the AppKit api initWithDOMRange that internally
290         needs to access the WebView. The NSAttributedString is needed to create
291         RTF formats in the pasteboard.
292         This is to be considered a first step, since in the future we want to have
293         an implementation based on the TextIterator.
294         
295         * WebCore.xcodeproj/project.pbxproj: Added new file.
296         * platform/mac/HTMLConverter.h: Added.
297         * platform/mac/HTMLConverter.mm: Added.
298         * platform/mac/PasteboardMac.mm:
299         (WebCore::Pasteboard::writeSelection): We now use WebHTMLConverter
300         class for WebKit2 to create the NSAttributedString from the DOM range.
301
302 2011-02-23  David Hyatt  <hyatt@apple.com>
303
304         Reviewed by Sam Weinig.
305
306         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
307
308         Patch computePositionedLogicalHeightUsing to be writing-mode-aware. 
309
310         * rendering/RenderBox.cpp:
311         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
312         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
313         * rendering/RenderBox.h:
314
315 2011-02-23  Martin Robinson  <mrobinson@igalia.com>
316
317         Reviewed by Xan Lopez.
318
319         [Gtk] Flash item placed on wrong location right after load
320         https://bugs.webkit.org/show_bug.cgi?id=37769
321
322         If a plugin is GtkSocket based, do not set the widget allocation until the
323         window is actually embedded in the parent. When the window is embedded, use
324         any pending allocation for the call to gtk_widget_size_allocate. This bug
325         seems to only appear with Flash movies loaded as the src of an iframe.
326
327         * manual-tests/plugins/windowed-in-iframe.html: Added.
328         * plugins/PluginView.h: Add a few new members to track window embedding state.
329         * plugins/gtk/PluginViewGtk.cpp:
330         (WebCore::PluginView::setNPWindowIfNeeded): If this is a GtkSocket-based plugin
331         wait until the plug-added signal fires to set the widget allocation.
332         (WebCore::PluginView::plugAddedCallback): Updated to be a static method, so that
333         we can access private members. If there is a pending allocation, call gtk_widget_size_allocate
334         with it.
335         (WebCore::PluginView::platformStart): Update the plugin state, so that we do not
336         call gtk_widget_size_allocate if the window isn't embedded.
337
338 2011-02-18  Enrica Casucci  <enrica@apple.com>
339
340         Reviewed by Adam Roben.
341
342         Mac OS X Services are not available for selected text in WebKit2 windows.
343         https://bugs.webkit.org/show_bug.cgi?id=54777
344         <rdar://problem/8666428>
345
346         The changes to WebCore for this bug are limited to exposing a new
347         entry point in the Editor class to write to the pasteboard and
348         changes to the Pasteboard class to write the selection with
349         a given set of pasteboard types. The majority of the work
350         is done in WebKit2.
351         
352         * WebCore.exp.in:
353         * editing/Editor.h:
354         * editing/mac/EditorMac.mm: Added entrypoint to write the
355         selection to the pasteboard.
356         (WebCore::Editor::writeSelectionToPasteboard):
357         * platform/Pasteboard.h:
358         * platform/mac/ClipboardMac.mm:
359         (WebCore::ClipboardMac::writeRange):
360         * platform/mac/PasteboardMac.mm:
361         (WebCore::Pasteboard::writeSelection):
362
363 2011-02-23  David Hyatt  <hyatt@apple.com>
364
365         Reviewed by Simon Fraser.
366
367         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
368
369         Patch computePositionedLogicalHeight to be writing-mode-aware.  Functions it calls have not been
370         patched yet, so still not testable in a vertical text environment.
371
372         * rendering/RenderBox.cpp:
373         (WebCore::RenderBox::computePositionedLogicalHeight):
374
375 2011-02-23  David Hyatt  <hyatt@apple.com>
376
377         Reviewed by Sam Weinig.
378
379         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
380
381         Patch computePositionedLogicalWidthUsing to be writing-mode-aware. Still not testable in a vertical text
382         environment, since height computations will overwrite all values computed here until they are patched as well.
383
384         * rendering/RenderBox.cpp:
385         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
386         * rendering/RenderBox.h:
387
388 2011-02-23  Renata Hodovan  <reni@webkit.org>
389
390         Reviewed by Nikolas Zimmermann.
391
392         FEColorMatrixElement changes doesn't require relayout
393         https://bugs.webkit.org/show_bug.cgi?id=54880
394
395         When the FEColorMatrixElement receives an update message but the given value remains the same we don't need
396         to relayout the filter.
397
398         No new tests are needed because this modificiation is covered by the dynamic update tests of FEColorMatrix.
399
400         * platform/graphics/filters/FEColorMatrix.cpp:
401         (WebCore::FEColorMatrix::setType):
402         (WebCore::FEColorMatrix::setValues):
403         * platform/graphics/filters/FEColorMatrix.h:
404         * svg/SVGFEColorMatrixElement.cpp:
405         (WebCore::SVGFEColorMatrixElement::setFilterEffectAttribute):
406         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged):
407         * svg/SVGFEColorMatrixElement.h:
408
409 2011-02-23  James Robinson  <jamesr@chromium.org>
410
411         REGRESSION(79466): fast/parser/test-unicode-characters-in-attribute-name.html fails
412
413         Reverts TextCodecUTF16.cpp back to pre-79466 state.  The crash fix in 79466 was for UTF-8 only, it also caused the UTF16 path to fail.
414
415         * platform/text/TextCodecUTF16.cpp:
416         (WebCore::newStreamingTextDecoderUTF16LE):
417         (WebCore::newStreamingTextDecoderUTF16BE):
418         (WebCore::TextCodecUTF16::decode):
419         (WebCore::TextCodecUTF16::encode):
420
421 2011-02-23  David Hyatt  <hyatt@apple.com>
422
423         Reviewed by Sam Weinig.
424
425         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
426
427         Patch computePositionedLogicalWidth to be writing-mode-aware.  Functions it calls have not been
428         patched yet, so still not testable in a vertical text environment.
429
430         * rendering/RenderBox.cpp:
431         (WebCore::RenderBox::computePositionedLogicalWidth):
432
433 2011-02-23  James Robinson  <jamesr@chromium.org>
434
435         Unreviewed, rolling out r79428.
436         http://trac.webkit.org/changeset/79428
437         https://bugs.webkit.org/show_bug.cgi?id=54714
438
439         Does not work in the Chromium sandbox
440
441         * websockets/WebSocketHandshake.cpp:
442         (WebCore::generateSecWebSocketKey):
443         (WebCore::generateKey3):
444
445 2011-02-23  David Hyatt  <hyatt@apple.com>
446
447         Reviewed by Sam Weinig.
448
449         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
450         
451         Add logical accessors for the left()/right()/top()/bottom() properties on the RenderStyle.
452
453         * rendering/style/RenderStyle.h:
454         (WebCore::InheritedFlags::logicalLeft):
455         (WebCore::InheritedFlags::logicalRight):
456         (WebCore::InheritedFlags::logicalTop):
457         (WebCore::InheritedFlags::logicalBottom):
458
459 2011-02-23  Darin Adler  <darin@apple.com>
460
461         Reviewed by Alexey Proskuryakov.
462
463         Fix crash seen in one of the regression tests.
464
465         * platform/text/TextCodecUTF16.cpp:
466         (WebCore::TextCodecUTF16::decode): Handle case where we did not decode any new data,
467         we were not told to flush, and we had a buffered byte. The assertion here was incorrect,
468         and the correct thing to do is nothing.
469
470 2011-02-23  Sergey Glazunov  <serg.glazunov@gmail.com>
471
472         Reviewed by James Robinson.
473
474         SVGCursorElement::removeClient() should verify that its argument is connected with
475         the proper cursor element.
476         https://bugs.webkit.org/show_bug.cgi?id=54979
477
478         Test: svg/css/multiple-cursors-crash.html
479
480         * svg/SVGCursorElement.cpp:
481         (WebCore::SVGCursorElement::removeClient):
482
483 2011-02-23  Renata Hodovan  <reni@webkit.org>
484
485         Reviewed by Darin Adler.
486
487         FEConvolveMatrixElement changes doesn't require relayout
488         https://bugs.webkit.org/show_bug.cgi?id=55067
489
490         When the FEConvolveMatrixElement receives an update message but the
491         given value remains the same we don't need to relayout the filter.
492
493         No new tests are needed because this modificiation is covered by the
494         dynamic update tests of FEConvolveMatrix.
495
496         * platform/graphics/filters/FEConvolveMatrix.cpp:
497         (WebCore::FEConvolveMatrix::setDivisor):
498         (WebCore::FEConvolveMatrix::setBias):
499         (WebCore::FEConvolveMatrix::setTargetOffset):
500         (WebCore::FEConvolveMatrix::edgeMode):
501         (WebCore::FEConvolveMatrix::setEdgeMode):
502         (WebCore::FEConvolveMatrix::setPreserveAlpha):
503         * platform/graphics/filters/FEConvolveMatrix.h:
504         * svg/SVGFEConvolveMatrixElement.cpp:
505         (WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute):
506         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
507         * svg/SVGFEConvolveMatrixElement.h:
508
509 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
510
511         Reviewed by Darin Adler.
512
513         Rolled back in r79367 with SnowLeopard Release bot crash fixed.
514         https://bugs.webkit.org/show_bug.cgi?id=54999
515
516         * ForwardingHeaders/wtf/DoublyLinkedList.h: Added.
517
518 2011-02-23  Dimitri Glazkov  <dglazkov@chromium.org>
519
520         Reviewed by Darin Adler.
521
522         Add more thorough manual test coverage for media controls
523         https://bugs.webkit.org/show_bug.cgi?id=55006
524
525         * manual-tests/media-controls.html: Added.
526
527 2011-02-23  Darin Adler  <darin@apple.com>
528
529         Fix build.
530
531         * platform/text/TextCodecUTF16.cpp:
532         (WebCore::TextCodecUTF16::decode): Removed stray unused local variable.
533
534 2011-02-23  Dimitri Glazkov  <dglazkov@chromium.org>
535
536         Reviewed by Darin Adler.
537
538         Setting shadow host should also attach and set inDocument, just like
539         appending/inserting a child.
540         https://bugs.webkit.org/show_bug.cgi?id=55065
541
542         No new tests, because functionality is not yet used.
543
544         * dom/Element.cpp:
545         (WebCore::Element::setShadowRoot): Add attaching and setting inDocument
546             for the shadow DOM subtree, like the host.
547
548 2011-02-23  David Hyatt  <hyatt@apple.com>
549
550         Reviewed by Darin Adler and Simon Fraser.
551
552         https://bugs.webkit.org/show_bug.cgi?id=46500, make positioned elements work with vertical text.
553         
554         - Add clientLogicalWidth and clientLogicalHeight that call the correct clientWidth or clientHeight based off
555         writing-mode.
556         - Patch clientLogicalBottom to use clientLogicalHeight.
557         - Convert containingBlockWidthForPositioned and containingBlockHeightForPositioned to be logical and to make use of
558         clientLogicalHeight/Width.  Also make them able to handle perpendicular writing mode containining blocks.
559         - Refine containingBlockLogicalHeightForPositioned to match containingBlockLogicalWidthForPositioned more closely.
560         
561         * rendering/RenderBox.cpp:
562         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
563         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
564         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
565         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
566         (WebCore::RenderBox::computePositionedLogicalWidth):
567         (WebCore::RenderBox::computePositionedLogicalHeight):
568         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
569         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
570         * rendering/RenderBox.h:
571         (WebCore::RenderBox::clientLogicalWidth):
572         (WebCore::RenderBox::clientLogicalHeight):
573         (WebCore::RenderBox::clientLogicalBottom):
574
575 2011-02-23  Darin Adler  <darin@apple.com>
576
577         Reviewed by Alexey Proskuryakov.
578
579         REGRESSION (new UTF-8 decoder): Reproducible crash on alltommac.se
580         https://bugs.webkit.org/show_bug.cgi?id=54862
581
582         Correct handling of end of buffer partial sequence in UTF-8 and UTF-16 decoders when flushing with zero length
583         https://bugs.webkit.org/show_bug.cgi?id=54444
584
585         No new tests at this time. I will add some tests later, but since multiple
586         people are hitting this I wanted to get it in as quickly as possible.
587
588         * platform/text/TextCodecUTF16.cpp:
589         (WebCore::TextCodecUTF16::decode): Tweaked coding style quite a bit.
590         Removed special case for zero length now that main code handles it
591         correctly. Used words instead of abbreviations for local variable names.
592         Added error handling for a trailing byte.
593
594         * platform/text/TextCodecUTF8.cpp:
595         (WebCore::TextCodecUTF8::consumePartialSequenceByte): Added. Helper function
596         to make the handleError and handlePartialSequence functions clearer.
597         (WebCore::TextCodecUTF8::handleError): Added. Helper function to make the
598         handlePartialSequence clearer.
599         (WebCore::TextCodecUTF8::handlePartialSequence): Added. Factored out code for
600         the partial sequence case. Making this a separate function probably helps make
601         the fast case a little faster. This new version handles more cases correctly,
602         which is what fixes the crashes we were seeing. In particular, it no longer
603         assumes that the partial sequence is truly partial, because there are cases
604         where we end up handling complete sequences here, such as when a complete
605         sequence is inside a malformed partial sequence.
606         (WebCore::TextCodecUTF8::decode): Removed partial sequence code and made this
607         call handlePartialSequence instead. Could be streamlined if we double checked
608         that passing a reference to "destination" and "source" doesn't harm code
609         generation too much, so perhaps someone can do that research on a few compilers
610         later and clean this up. Removed special case for zero length now that the
611         main code handles that correctly.
612
613         * platform/text/TextCodecUTF8.h: Added declarations for new functions.
614         Made partial sequence buffer large enough to hold a whole sequence so we can
615         use it to complete and decode a sequence in place.
616
617 2011-02-23  Abhishek Arya  <inferno@chromium.org>
618
619         Reviewed by Dave Hyatt.
620
621         Make clear float lineboxes resilient against overflows.        
622         https://bugs.webkit.org/show_bug.cgi?id=54995
623
624         We try to dirty everthing in block range if we have a negative
625         logical bottom, or if our logical bottom is less than our logical
626         top, or if our logical top is equal to INT_MAX. Plus, we also dirty
627         a linebox if its block logical height is less than zero.
628         Tests: fast/overflow/overflow-height-float-not-removed-crash2.html
629                fast/overflow/overflow-height-float-not-removed-crash3.html
630
631         * rendering/RenderBlock.cpp:
632         (WebCore::RenderBlock::removeFloatingObject):
633         (WebCore::RenderBlock::markLinesDirtyInBlockRange):
634         * rendering/RootInlineBox.cpp:
635         (WebCore::RootInlineBox::alignBoxesInBlockDirection): remove the hack
636         added in r69735. we don't need this anymore since we are making the
637         underlying float dirty logic resilient.
638
639 2011-02-22  Kenneth Russell  <kbr@google.com>
640
641         Reviewed by Darin Fisher.
642
643         Per-page minimum DOMTimer interval broken for repeating timers
644         https://bugs.webkit.org/show_bug.cgi?id=55014
645
646         When the minimum timer interval is adjusted, if the timer is
647         repeating, cause its repeat interval to be set to its original
648         timeout clamped to the new minimum interval.
649
650         Tests: fast/dom/timer-increase-min-interval-repeating.html
651                fast/dom/timer-increase-then-decrease-min-interval-repeating.html
652
653         * page/DOMTimer.cpp:
654         (WebCore::DOMTimer::adjustMinimumTimerInterval):
655
656 2011-02-23  Dan Bernstein  <mitz@apple.com>
657
658         Reviewed by Maciej Stachowiak.
659
660         Fix two issues seen in WebKit2 views on Mac:
661         - <rdar://problem/8867831> WebKit2: Insertion points in form fields no longer blink
662         - <rdar://problem/8950362> REGRESSION (WebKit2): Cannot deselect text
663
664         * page/EventHandler.cpp:
665         (WebCore::EventHandler::EventHandler): Initialize m_activationEventNumber
666         to -1. Since WebKit2 doesnÕt support non-activating clicks yet (<http://webkit.org/b/55053>
667         <rdar://problem/9042197>) and doesnÕt send event numbers, all events were considered to be
668         window-activating events. This in turn prevented them from clearing the selection and resuming
669         caret blinking on mouse up.
670
671 2011-02-23  Jacob Dinu  <dinu.jacob@nokia.com>
672
673         Reviewed by Pavel Feldman.
674
675         Web Inspector: Linking error for some InspectorController symbols
676         https://bugs.webkit.org/show_bug.cgi?id=54953
677
678         Moved out hideHighlight definition from under JAVASCRIPT_DEBUGGER flag 
679
680         * inspector/InspectorController.cpp:
681         (WebCore::InspectorController::hideHighlight):
682         (WebCore::InspectorController::resume):
683
684 2011-02-23  Hans Wennborg  <hans@chromium.org>
685
686         IndexedDB: Move some SQL code into IDBBackingStore
687         https://bugs.webkit.org/show_bug.cgi?id=54889
688
689         The idea is to gather all the SQL logic into IDBBackingStore.
690
691         No new functionality, so no new tests.
692
693         * storage/IDBBackingStore.cpp:
694         (WebCore::IDBBackingStore::IDBBackingStore):
695         (WebCore::runCommands):
696         (WebCore::createTables):
697         (WebCore::createMetaDataTable):
698         (WebCore::getDatabaseSchemaVersion):
699         (WebCore::migrateDatabase):
700         (WebCore::IDBBackingStore::open):
701         (WebCore::IDBBackingStore::extractIDBDatabaseMetaData):
702         (WebCore::IDBBackingStore::setIDBDatabaseMetaData):
703         (WebCore::IDBBackingStore::getObjectStores):
704         (WebCore::IDBBackingStore::createObjectStore):
705         (WebCore::doDelete):
706         (WebCore::IDBBackingStore::deleteObjectStore):
707         (WebCore::whereSyntaxForKey):
708         (WebCore::bindKeyToQuery):
709         (WebCore::IDBBackingStore::getObjectStoreRecord):
710         (WebCore::bindKeyToQueryWithNulls):
711         (WebCore::IDBBackingStore::putObjectStoreRecord):
712         (WebCore::IDBBackingStore::deleteIndexDataForRecord):
713         (WebCore::IDBBackingStore::putIndexDataForRecord):
714         (WebCore::IDBBackingStore::createIndex):
715         (WebCore::IDBBackingStore::deleteIndex):
716         (WebCore::IDBBackingStore::clearObjectStore):
717         * storage/IDBBackingStore.h:
718         * storage/IDBDatabaseBackendImpl.cpp:
719         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
720         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
721         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
722         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
723         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
724         * storage/IDBFactoryBackendImpl.cpp:
725         (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
726         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
727         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
728         (WebCore::IDBFactoryBackendImpl::open):
729         * storage/IDBFactoryBackendImpl.h:
730         * storage/IDBObjectStoreBackendImpl.cpp:
731         (WebCore::IDBObjectStoreBackendImpl::getInternal):
732         (WebCore::IDBObjectStoreBackendImpl::putInternal):
733         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
734         (WebCore::populateIndex):
735         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
736         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
737
738 2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
739
740         Reviewed by Laszlo Gombos.
741
742         [Qt] Fix the Symbian build after r79334
743         https://bugs.webkit.org/show_bug.cgi?id=55044
744
745         No new tests as there is no new functionality.
746
747         * WebCore.pri: Reorder symbian blocks to make sure that
748         system-sqlite is set before it is tested.
749
750         Copy the rules from JavaScriptCore.pri for defineTest().
751
752 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
753
754         Reviewed by Alexey Proskuryakov.
755
756         Use AtomicString::fromUTF8 instead of String::fromUTF8 for AtomicStrings
757         https://bugs.webkit.org/show_bug.cgi?id=54992
758
759         * websockets/WebSocketHandshake.cpp:
760         (WebCore::WebSocketHandshake::readHTTPHeaders):
761
762 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
763
764         Reviewed by Andreas Kling.
765
766         [CMake] Move platform dependent files out of main CMakeLists.txt
767         https://bugs.webkit.org/show_bug.cgi?id=53891
768
769         Apple Windows port does not use the image decoders,
770         so move them into the platform specific CMake files.
771
772         * CMakeLists.txt:
773         * CMakeListsEfl.txt:
774         * CMakeListsWinCE.txt:
775
776 2011-02-21  Stephen White  <senorblanco@chromium.org>
777
778         Reviewed by Kenneth Russell.
779
780         Jittering when animating a rotated image
781         https://bugs.webkit.org/show_bug.cgi?id=50775
782
783         Since Skia does not seem to suffer from pixel cracks when scaling to
784         non-integral sizes the way CG does, no-op roundToDevicePixels on the
785         Skia implementation.
786
787         * platform/graphics/skia/GraphicsContextSkia.cpp:
788         (WebCore::GraphicsContext::roundToDevicePixels):
789
790 2011-02-23 Patrick Gansterer <paroga@webkit.org>
791
792         Reviewed by Andreas Kling.
793
794         [WINCE] Get rid of TemporaryLinkStubs.cpp
795         https://bugs.webkit.org/show_bug.cgi?id=54825
796
797         * CMakeListsWinCE.txt:
798         * platform/network/win/CookieStorageWin.cpp: Copied from platform/wince/TemporaryLinkStubs.cpp.
799         * platform/wince/TemporaryLinkStubs.cpp: Removed.
800
801 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
802
803         Reviewed by Darin Adler.
804
805         Rename PLATFORM(CF) to USE(CF)
806         https://bugs.webkit.org/show_bug.cgi?id=53540
807
808         * WebCore.gyp/WebCore.gyp:
809         * editing/SmartReplace.cpp:
810         * editing/SmartReplaceICU.cpp:
811         * loader/MainResourceLoader.cpp:
812         (WebCore::MainResourceLoader::didReceiveResponse):
813         (WebCore::MainResourceLoader::didReceiveData):
814         (WebCore::MainResourceLoader::didFinishLoading):
815         (WebCore::MainResourceLoader::didFail):
816         * loader/archive/ArchiveFactory.cpp:
817         (WebCore::archiveMIMETypes):
818         * platform/FileSystem.h:
819         * platform/KURL.h:
820         * platform/KURLGoogle.cpp:
821         * platform/RunLoopTimer.h:
822         * platform/SharedBuffer.cpp:
823         * platform/SharedBuffer.h:
824         * platform/UUID.cpp:
825         (WebCore::createCanonicalUUIDString):
826         * platform/network/ResourceHandle.h:
827         * platform/network/ResourceRequestBase.h:
828         * platform/network/curl/ResourceHandleCurl.cpp:
829         * platform/network/curl/ResourceHandleManager.cpp:
830         (WebCore::certificatePath):
831         * platform/text/cf/StringCF.cpp:
832         * platform/text/cf/StringImplCF.cpp:
833         * platform/win/BString.cpp:
834         * platform/win/BString.h:
835         * platform/win/ClipboardUtilitiesWin.cpp:
836         (WebCore::getWebLocData):
837         (WebCore::getURL):
838         (WebCore::getClipboardData):
839         * platform/win/ClipboardWin.cpp:
840         (WebCore::writeFileToDataObject):
841         * platform/win/SearchPopupMenuWin.cpp:
842         (WebCore::SearchPopupMenuWin::enabled):
843         (WebCore::SearchPopupMenuWin::saveRecentSearches):
844         (WebCore::SearchPopupMenuWin::loadRecentSearches):
845
846 2011-02-23  Benjamin Kalman  <kalman@chromium.org>
847
848         Reviewed by Ojan Vafai.
849
850         Moving or selecting backwards by words jumps to start of contenteditable region if contenteditable=false span is encountered
851         https://bugs.webkit.org/show_bug.cgi?id=51001
852
853         Test: editing/selection/extend-backward-by-word-over-non-editable.html
854
855         Revert some previous changes (the TextIteratorEndsAtEditingBoundary text iteration behaviour) which caused this
856         bug in the first place, and fix SimplifiedBackwardsTextIterator's iteration range check as an alternative fix.
857
858         The original bug was that double-clicking on an inline editable span at the start of a paragraph would clear the
859         selection (webkit.org/b/36360).  This was caused by upstream/downstream VisbiblePosition complications.  To fix,
860         refuse to iterate beyond the start node (rather than refusing to iterate across editable boundaries, which
861         causes this bug).
862
863         To see why this is correct, and to make it clearer that is indeed what is happening, the text iterator code has
864         been slightly restructured to express the invariant that the iterator will never advance past the start node.
865
866         * editing/TextIterator.cpp:
867         (WebCore::TextIterator::TextIterator): Remove references to TextIterationEndsAtEditing boundary.
868         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Remove m_pastStartNode as the
869         mechanism for iteration range checking, and use a flag m_havePassedStartNode instead.
870         (WebCore::SimplifiedBackwardsTextIterator::advance): Clean up, use advanceRespectingRange and
871         m_havePassedStartNode for iteration range checking rather than m_pastStartNode.
872         (WebCore::SimplifiedBackwardsTextIterator::advanceRespectingRange): The new way of modifying m_node
873         which updates m_havePassedStartNode and refuses to continue when it becomes true.
874         * editing/TextIterator.h: Remove TextIteratorEndsAtEditingBoundary, update for new/removed prototypes and
875         member variables.
876         * editing/visible_units.cpp:
877         (WebCore::previousBoundary): Remove references to TextIteratorEndsAtEditingBoundary.
878
879 2011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
880
881         Reviewed by Adam Barth.
882
883         WebSocket uses insecure random numbers
884         https://bugs.webkit.org/show_bug.cgi?id=54714
885
886         * websockets/WebSocketHandshake.cpp:
887         (WebCore::randomNumberLessThan):
888         (WebCore::generateSecWebSocketKey):
889         (WebCore::generateKey3):
890
891 2011-02-21  Hans Wennborg  <hans@chromium.org>
892
893         Reviewed by Jeremy Orlow.
894
895         IndexedDB: Rename IDBSQLiteDatabase to IDBBackingStore
896         https://bugs.webkit.org/show_bug.cgi?id=54864
897
898         No new functionality, so no new tests.
899
900         * GNUmakefile.am:
901         * WebCore.gypi:
902         * storage/IDBBackingStore.cpp:
903         (WebCore::IDBBackingStore::IDBBackingStore):
904         (WebCore::IDBBackingStore::~IDBBackingStore):
905         * storage/IDBBackingStore.h:
906         (WebCore::IDBBackingStore::create):
907         (WebCore::IDBBackingStore::db):
908         * storage/IDBCursorBackendImpl.cpp:
909         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
910         (WebCore::IDBCursorBackendImpl::currentRowExists):
911         (WebCore::IDBCursorBackendImpl::database):
912         * storage/IDBCursorBackendImpl.h:
913         (WebCore::IDBCursorBackendImpl::create):
914         * storage/IDBDatabaseBackendImpl.cpp:
915         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
916         (WebCore::IDBDatabaseBackendImpl::sqliteDatabase):
917         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
918         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
919         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
920         * storage/IDBDatabaseBackendImpl.h:
921         (WebCore::IDBDatabaseBackendImpl::create):
922         * storage/IDBFactoryBackendImpl.cpp:
923         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
924         (WebCore::openSQLiteDatabase):
925         (WebCore::IDBFactoryBackendImpl::open):
926         * storage/IDBFactoryBackendImpl.h:
927         * storage/IDBIndexBackendImpl.cpp:
928         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
929         (WebCore::IDBIndexBackendImpl::openCursorInternal):
930         (WebCore::IDBIndexBackendImpl::sqliteDatabase):
931         * storage/IDBIndexBackendImpl.h:
932         (WebCore::IDBIndexBackendImpl::create):
933         * storage/IDBObjectStoreBackendImpl.cpp:
934         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
935         (WebCore::IDBObjectStoreBackendImpl::createIndex):
936         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
937         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
938         (WebCore::IDBObjectStoreBackendImpl::sqliteDatabase):
939         * storage/IDBObjectStoreBackendImpl.h:
940         (WebCore::IDBObjectStoreBackendImpl::create):
941
942 2011-02-23  Dominic Mazzoni  <dmazzoni@google.com>
943
944         Reviewed by Kenneth Russell.
945
946         Add a hit test handler for canvas elements that handles clicks on the canvas but ignores children.
947         https://bugs.webkit.org/show_bug.cgi?id=54697
948
949         New test to prevent this from regressing in the future: canvas/canvas-mouse-events.html
950
951         * rendering/RenderHTMLCanvas.cpp:
952         (WebCore::RenderHTMLCanvas::nodeAtPoint):
953
954 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
955
956         Reviewed by Darin Adler.
957
958         Remove obsolete focusRingColor functions
959         https://bugs.webkit.org/show_bug.cgi?id=54824
960
961         * CMakeListsWinCE.txt:
962         * platform/graphics/haiku/ColorHaiku.cpp:
963         * platform/graphics/wince/ColorWinCE.cpp: Removed.
964
965 2011-02-22  Jia Pu  <jpu@apple.com>
966
967         Reviewed by Dan Bernstein.
968
969         On Mac OS X, English contractions are marked misspelled with certain user preference setting.
970         https://bugs.webkit.org/show_bug.cgi?id=54975
971
972         manual test: manual-tests/autocorrection/spellcheck-on-contraction-when-autocorrection-is-off.html
973
974         Without this patch, we check for contraction only when autocorrection or other type of auto-
975         substituation is on. And we failed to check for contraction if only spellchecking is turned on.
976         This patch implements the desired behavior, checking for contraction when either correction/substitution,
977         or spellchecking, is on.
978
979         * editing/Editor.cpp:
980         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
981         * manual-tests/autocorrection/spellcheck-on-contraction-when-autocorrection-is-off.html: Added.
982
983 2011-02-22  Charlie Reis  <creis@chromium.org>
984
985         Reviewed by Darin Fisher.
986
987         Remove DatabasePolicy from FrameLoaderTypes
988         https://bugs.webkit.org/show_bug.cgi?id=54968
989
990         The DatabasePolicy enum is no longer needed now that we avoid stopping
991         loaders on same-document navigations.
992
993         Existing test: storage/hash-change-with-xhr.html
994
995         * WebCore.exp.in:
996         * loader/DocumentLoader.cpp:
997         * loader/DocumentLoader.h:
998         * loader/FrameLoader.cpp:
999         * loader/FrameLoader.h:
1000         * loader/FrameLoaderTypes.h:
1001         * workers/WorkerThread.cpp:
1002
1003 2011-02-22  Alexis Menard  <alexis.menard@openbossa.org>
1004
1005         Reviewed by Andreas Kling.
1006
1007         [Qt] QWebView ignores a palette set with QWebView::setPalette()
1008         https://bugs.webkit.org/show_bug.cgi?id=31742
1009
1010         Use custom QWebView palette if the view provides one.
1011         Modified version of a patch made by Fabrizio Machado.
1012
1013         * platform/qt/RenderThemeQt.cpp:
1014         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
1015         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
1016         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
1017         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
1018         (WebCore::RenderThemeQt::platformFocusRingColor):
1019
1020 2011-02-22  Brian Salomon  <bsalomon@google.com>
1021
1022         Reviewed by Kenneth Russell.
1023
1024         Don't disable accelerated canvas when using the skia gpu backend.
1025
1026         No new tests are required.
1027
1028         * html/canvas/CanvasRenderingContext2D.cpp:
1029         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
1030
1031 2011-02-22  Luiz Agostini  <luiz.agostini@openbossa.org>
1032
1033         Reviewed by Kenneth Rohde Christiansen.
1034
1035         [Qt] <select>s on http://www.ryanair.com render wrong
1036         https://bugs.webkit.org/show_bug.cgi?id=29647
1037
1038         Reducing padding in <select> elements to improve its rendering and introducing a
1039         rendering adjustment specific to QMacStyle.
1040
1041         * platform/qt/RenderThemeQt.cpp:
1042         (WebCore::RenderThemeQt::setPopupPadding):
1043         (WebCore::RenderThemeQt::paintMenuList):
1044
1045 2011-02-22  Andreas Kling  <kling@webkit.org>
1046
1047         Reviewed by Dan Bernstein.
1048
1049         FontCache: Make cTargetInactiveFontData an int instead of float.
1050         https://bugs.webkit.org/show_bug.cgi?id=54963
1051
1052         * platform/graphics/FontCache.cpp:
1053
1054 2011-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1055
1056         Reviewed by Darin Adler.
1057
1058         Make Editor::selectionComputedStyle return EditingStyle
1059         https://bugs.webkit.org/show_bug.cgi?id=54933
1060
1061         Renamed selectionComputedStyle to selectionStartStyle and changed the return type to EditingStyle.
1062         It also no longer takes a boolean shouldUseFixedFontDefaultSize.
1063
1064         Also added EditingStyle::mergeTypingStyle which replaced old editingStyleIncludingTypingStyle. This function
1065         doesn't extract inheritable properties prior to merge because this turned out be a bug, which was revealed
1066         by an existing layout test only after the code was shared with selectionStartStyle.
1067
1068         No tests are added since this is a refactoring.
1069
1070         * editing/CompositeEditCommand.cpp:
1071         (WebCore::CompositeEditCommand::moveParagraphs): Calls EditingStyle::create and EditingStyle::mergeTypingStyle.
1072         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
1073         * editing/EditingStyle.cpp: Removed editingStyleIncludingTypingStyle.
1074         (WebCore::EditingStyle::mergeTypingStyle): Added.
1075         * editing/EditingStyle.h:
1076         (WebCore::EditingStyle::shouldUseFixedDefaultFontSize): Added.
1077         * editing/Editor.cpp:
1078         (WebCore::Editor::selectionStartHasStyle): Calls selectionStartStyle.
1079         (WebCore::Editor::selectionHasStyle): Ditto.
1080         (WebCore::Editor::selectionStartCSSPropertyValue): Ditto.
1081         (WebCore::Editor::selectionStartStyle): Renamed from selectionComputedStyle; returns EditingStyle.
1082         * editing/Editor.h:
1083         * editing/EditorCommand.cpp:
1084         (WebCore::executeToggleStyleInList): Calls selectionStartStyle.
1085         * editing/InsertLineBreakCommand.cpp:
1086         * editing/InsertParagraphSeparatorCommand.cpp:
1087         (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Calls EditingStyle::create and
1088         EditingStyle::mergeTypingStyle.
1089         * editing/ReplaceSelectionCommand.cpp:
1090         (WebCore::ReplaceSelectionCommand::doApply): Ditto.
1091
1092 2011-02-22  Robert Hogan  <robert@webkit.org>
1093
1094         Reviewed by Andreas Kling.
1095
1096         [Qt] painting of windowed plugins faulty on certain scroll events
1097
1098         https://bugs.webkit.org/show_bug.cgi?id=52735
1099
1100         Invalidate the pluginview's relative rect rather then the frameRect(). This is because QWebFrame::renderRelativeCoords()
1101         imitates ScrollView and adds the scroll offset back on to the rect we damage here (making the co-ordinates absolute
1102         to the frame again) before passing it to FrameView.
1103
1104         * plugins/qt/PluginViewQt.cpp:
1105         (WebCore::PluginView::updatePluginWidget):
1106
1107 2011-02-22  Philippe Normand  <pnormand@igalia.com>
1108
1109         Reviewed by Martin Robinson.
1110
1111         Minimal build broken
1112         https://bugs.webkit.org/show_bug.cgi?id=54743
1113
1114         Moved the code of setInspectorExtensionAPI and
1115         dispatchMessageFromFrontend out of #if
1116         ENABLE(JAVASCRIPT_DEBUGGER) to fix link error of the minimal build.
1117
1118         * inspector/InspectorController.cpp:
1119         (WebCore::InspectorController::setInspectorExtensionAPI):
1120         (WebCore::InspectorController::dispatchMessageFromFrontend):
1121
1122 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1123
1124         Unreviewed, rolling out r79367.
1125         http://trac.webkit.org/changeset/79367
1126         https://bugs.webkit.org/show_bug.cgi?id=55012
1127
1128         all layout tests are crashing on Snow Leopard (Requested by
1129         rniwa on #webkit).
1130
1131         * ForwardingHeaders/wtf/DoublyLinkedList.h: Removed.
1132
1133 2011-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1134
1135         Reviewed by Darin Adler.
1136
1137         Deploy EditingStyle in removeInlineStyleFromElement and removeCSSStyle
1138         https://bugs.webkit.org/show_bug.cgi?id=54944
1139
1140         Deployed EditingStyle in removeInlineStyleFromElement and removeCSSStyle.
1141
1142         Also extracted EditingStyle::conflictsWithInlineStyleOfElement from ApplyStyleCommand::removeCSSStyle,
1143         which returns true iff the specified element has inline style that conflicts or matches the editing style.
1144         It also appends conflicting property IDs to the vector of property IDs if one is specified.
1145
1146         * editing/ApplyStyleCommand.cpp:
1147         (WebCore::ApplyStyleCommand::applyBlockStyle): Calls removeCSSStyle.
1148         (WebCore::ApplyStyleCommand::applyInlineStyle): Calls shouldSplitTextElement.
1149         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Calls removeInlineStyleFromElement.
1150         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*.
1151         (WebCore::ApplyStyleCommand::removeCSSStyle): Ditto; extracted the logic to decide properties to remove as
1152         conflictsWithInlineStyleOfElement.
1153         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Calls shouldRemoveInlineStyleFromElement.
1154         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Calls removeInlineStyleFromElement.
1155         (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto.
1156         (WebCore::ApplyStyleCommand::shouldSplitTextElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*.
1157         * editing/ApplyStyleCommand.h:
1158         (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement): Ditto.
1159         * editing/EditingStyle.cpp:
1160         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Extracted from ApplyStyleCommand::removeCSSStyle.
1161         * editing/EditingStyle.h:
1162         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Added.
1163
1164 2011-02-22  Chang Shu  <cshu@webkit.org>
1165
1166         Reviewed by Csaba Osztrogonác.
1167
1168         [Qt] editing/deleting/5408255.html fails
1169         https://bugs.webkit.org/show_bug.cgi?id=54964
1170
1171         Move WebCore resource file to QtWebKit since they are referred in WebKit.
1172
1173         * WebCore.pro:
1174
1175 2011-02-22  Brady Eidson  <beidson@apple.com>
1176
1177         Reviewed by Anders Carlsson.
1178
1179         <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
1180         API to view and delete Application Cache data by origin.
1181
1182         Implement these to be used by WK2 API:
1183         * loader/appcache/ApplicationCacheStorage.cpp:
1184         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
1185         (WebCore::ApplicationCacheStorage::deleteEntriesForOrigin):
1186
1187 2011-02-22  Geoffrey Garen  <ggaren@apple.com>
1188
1189         Reviewed by Oliver Hunt.
1190
1191         Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1)
1192         https://bugs.webkit.org/show_bug.cgi?id=54999
1193         
1194         New WTF header.
1195
1196         * ForwardingHeaders/wtf/DoublyLinkedList.h: Copied from ForwardingHeaders/wtf/FixedArray.h.
1197
1198 2011-02-22  Beth Dakin  <bdakin@apple.com>
1199
1200         Reviewed by Sam Weinig.
1201
1202         Fix for https://bugs.webkit.org/show_bug.cgi?id=54991 
1203         Scrollbar::nativeTheme()->usesOverlayScrollbars() should not be consulted for CSS 
1204         Scrollbars
1205         -and corresponding-
1206         <rdar://problem/9034318>
1207
1208         Instead of consulting the theme directly, callers should ask the Scrollbar or 
1209         ScrollableArea if the scrollbars are overlay or not. 
1210
1211         * platform/ScrollView.cpp:
1212         (WebCore::ScrollView::visibleContentRect):
1213         (WebCore::ScrollView::scrollContents):
1214         (WebCore::ScrollView::wheelEvent):
1215         * platform/ScrollableArea.cpp:
1216         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
1217         (WebCore::ScrollableArea::hasOverlayScrollbars):
1218         * platform/ScrollableArea.h:
1219         * platform/Scrollbar.cpp:
1220         (WebCore::Scrollbar::isOverlayScrollbar):
1221         * platform/Scrollbar.h:
1222         * rendering/RenderBox.cpp:
1223         (WebCore::RenderBox::includeVerticalScrollbarSize):
1224         (WebCore::RenderBox::includeHorizontalScrollbarSize):
1225         * rendering/RenderLayer.cpp:
1226         (WebCore::RenderLayer::verticalScrollbarWidth):
1227         (WebCore::RenderLayer::horizontalScrollbarHeight):
1228         * rendering/RenderListBox.cpp:
1229         (WebCore::RenderListBox::verticalScrollbarWidth):
1230         * rendering/RenderScrollbar.h:
1231         (WebCore::RenderScrollbar::isOverlayScrollbar):
1232
1233 2011-02-22  Andras Becsi  <abecsi@webkit.org>
1234
1235         Reviewed by Csaba Osztrogonác.
1236
1237         [Qt] Redesign the build system
1238         https://bugs.webkit.org/show_bug.cgi?id=51339
1239
1240         Move inspector's resource files into the final build step to fix the layout test regression.
1241
1242         No new tests needed.
1243
1244         * WebCore.pro: Move inspector's resource files into QtWebKit.pro.
1245
1246 2011-02-22  Martin Robinson  <mrobinson@igalia.com>
1247
1248         Reviewed by Xan Lopez.
1249
1250         [GTK] fast/frames/iframe-scale-applied-twice.html fails after r79167
1251         https://bugs.webkit.org/show_bug.cgi?id=54990
1252
1253         No new tests. This will cause fast/events/scroll-after-click-on-tab-index.html
1254         to start passing again.
1255
1256         * platform/gtk/ScrollViewGtk.cpp:
1257         (WebCore::ScrollView::visibleContentRect): Update this method to match the original
1258         in the parent class.
1259
1260 2011-01-17  Martin Robinson  <mrobinson@igalia.com>
1261
1262         Reviewed by Xan Lopez.
1263
1264         [GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
1265         https://bugs.webkit.org/show_bug.cgi?id=49177
1266
1267         * platform/ScrollView.cpp: Remove the GTK+ guards around the implementation
1268         of platformAddChild and platformRemoveChild. This code can be shared.
1269         * platform/gtk/MainFrameScrollbarGtk.cpp:
1270         (MainFrameScrollbarGtk::attachAdjustment): Prevent re-attaching an already attached
1271         adjustment. Connect the adjustment value-changed signal handler after resetting the
1272         adjustment. This prevents the rest from stomping on pre-existing WebCore values.
1273         (MainFrameScrollbarGtk::gtkValueChanged): If the scrollbar is no longer attached to
1274         a scrollview do not listing for value changes. These scrollbars are defunct.
1275         * platform/gtk/ScrollViewGtk.cpp: Remove duplicated empty methods.
1276
1277 2011-02-22  Pavel Feldman  <pfeldman@chromium.org>
1278
1279         Reviewed by Yury Semikhatsky.
1280
1281         Web Inspector: refactor InjectedScript : InspectorDOMAgent interaction.
1282         https://bugs.webkit.org/show_bug.cgi?id=54954
1283
1284         * bindings/js/JSInjectedScriptHostCustom.cpp:
1285         (WebCore::InjectedScriptHost::toNode):
1286         (WebCore::JSInjectedScriptHost::inspect):
1287         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1288         (WebCore::InjectedScriptHost::toNode):
1289         (WebCore::V8InjectedScriptHost::inspectCallback):
1290         * inspector/CodeGeneratorInspector.pm:
1291         * inspector/InjectedScript.cpp:
1292         (WebCore::InjectedScript::nodeForObjectId):
1293         * inspector/InjectedScript.h:
1294         * inspector/InjectedScriptHost.cpp:
1295         (WebCore::InjectedScriptHost::inspect):
1296         * inspector/InjectedScriptHost.h:
1297         * inspector/InjectedScriptHost.idl:
1298         * inspector/InjectedScriptSource.js:
1299         (.):
1300         * inspector/Inspector.idl:
1301         * inspector/InspectorAgent.cpp:
1302         (WebCore::InspectorAgent::focusNode):
1303         * inspector/InspectorAgent.h:
1304         * inspector/InspectorDOMAgent.cpp:
1305         (WebCore::InspectorDOMAgent::inspect):
1306         (WebCore::InspectorDOMAgent::pushNodeToFrontend):
1307         * inspector/InspectorDOMAgent.h:
1308         * inspector/front-end/AuditRules.js:
1309         (WebInspector.AuditRules.evaluateInTargetWindow):
1310         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
1311         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
1312         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.receivedImages):
1313         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.pushImageNodes):
1314         * inspector/front-end/ConsoleView.js:
1315         (WebInspector.ConsoleView.prototype.completions):
1316         * inspector/front-end/DOMAgent.js:
1317         (WebInspector.DOMDispatcher.prototype.childNodeRemoved):
1318         (WebInspector.DOMDispatcher.prototype.inspectElementRequested):
1319         * inspector/front-end/RemoteObject.js:
1320         (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
1321
1322 2011-02-22  Brady Eidson  <beidson@apple.com>
1323
1324         Reviewed by Anders Carlsson.
1325
1326         Part of <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
1327         API to view and delete Application Cache data by origin.
1328
1329         Stub these out for now:
1330         * loader/appcache/ApplicationCacheStorage.cpp:
1331         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
1332         (WebCore::ApplicationCacheStorage::deleteEntriesForOrigin):
1333         (WebCore::ApplicationCacheStorage::deleteAllEntries): Moved implementation here from WebKit/Mac
1334         * loader/appcache/ApplicationCacheStorage.h:
1335
1336         Export the new symbols:
1337         * WebCore.exp.in:
1338
1339 2011-02-22  Anders Carlsson  <andersca@apple.com>
1340
1341         Fix debug build.
1342
1343         * WebCore.exp.in:
1344
1345 2011-02-22  Balazs Kelemen  <kbalazs@webkit.org>
1346
1347         Reviewed by Anders Carlsson.
1348
1349         notImplemented() should behave identical in WebCore and WebKit2
1350         https://bugs.webkit.org/show_bug.cgi?id=54449
1351
1352         No functional change so no new tests.
1353
1354         * WebCore.xcodeproj/project.pbxproj: Add NotImplemented.h as private header
1355         to be able to use it in WebKit2.
1356
1357 2011-02-22  Andras Becsi  <abecsi@webkit.org>
1358
1359         Reviewed by Laszlo Gombos.
1360         Rubber-stamped by Csaba Osztrogonác.
1361
1362         [Qt] Redesign the build system
1363         https://bugs.webkit.org/show_bug.cgi?id=51339
1364
1365         The patch landed in r79320 didn't contain the cleanup
1366         which was already addressed in the last attachment.
1367
1368         No new tests needed.
1369
1370         * WebCore.pri: Add common LIB and CONFIG options.
1371         * WebCore.pro: Add accidentally moved sections.
1372
1373 2011-02-22  Philippe Normand  <pnormand@igalia.com>
1374
1375         Unreviewed, rolling out r79321.
1376         http://trac.webkit.org/changeset/79321
1377         https://bugs.webkit.org/show_bug.cgi?id=53146
1378
1379         Regresses  fast/forms/listbox-typeahead-cyrillic.html and fast
1380         /spatial-navigation/snav-single-select.html on GTK
1381
1382         * accessibility/gtk/AXObjectCacheAtk.cpp:
1383         (WebCore::notifyChildrenSelectionChange):
1384         (WebCore::AXObjectCache::postPlatformNotification):
1385
1386 2011-02-22  Ilya Tikhonovsky  <loislo@chromium.org>
1387
1388         Reviewed by Yury Semikhatsky.
1389
1390         Web Inspector: Inspector.IDL change. rename attribute notify -> event.
1391         https://bugs.webkit.org/show_bug.cgi?id=54958
1392
1393         * inspector/CodeGeneratorInspector.pm:
1394         * inspector/Inspector.idl:
1395
1396 2011-02-22  Yury Semikhatsky  <yurys@chromium.org>
1397
1398         Reviewed by Pavel Feldman.
1399
1400         Web Inspector: Timeline agent should have same lifetime as InspectorAgent
1401         https://bugs.webkit.org/show_bug.cgi?id=54951
1402
1403         * inspector/CodeGeneratorInspector.pm:
1404         * inspector/Inspector.idl:
1405         * inspector/InspectorAgent.cpp:
1406         (WebCore::InspectorAgent::InspectorAgent):
1407         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
1408         (WebCore::InspectorAgent::setFrontend):
1409         (WebCore::InspectorAgent::disconnectFrontend):
1410         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
1411         (WebCore::InspectorAgent::didCommitLoad):
1412         (WebCore::InspectorAgent::domContentLoadedEventFired):
1413         (WebCore::InspectorAgent::loadEventFired):
1414         * inspector/InspectorAgent.h:
1415         * inspector/InspectorController.cpp:
1416         (WebCore::InspectorController::startTimelineProfiler):
1417         (WebCore::InspectorController::stopTimelineProfiler):
1418         (WebCore::InspectorController::timelineProfilerEnabled):
1419         * inspector/InspectorInstrumentation.cpp:
1420         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
1421         * inspector/InspectorTimelineAgent.cpp:
1422         (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
1423         (WebCore::InspectorTimelineAgent::setFrontend):
1424         (WebCore::InspectorTimelineAgent::clearFrontend):
1425         (WebCore::InspectorTimelineAgent::restore):
1426         (WebCore::InspectorTimelineAgent::startTimelineProfiler):
1427         (WebCore::InspectorTimelineAgent::stopTimelineProfiler):
1428         (WebCore::InspectorTimelineAgent::timelineProfilerStarted):
1429         (WebCore::InspectorTimelineAgent::didCommitLoad):
1430         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1431         (WebCore::InspectorTimelineAgent::clearRecordStack):
1432         * inspector/InspectorTimelineAgent.h:
1433         (WebCore::InspectorTimelineAgent::create):
1434         * inspector/front-end/TimelinePanel.js:
1435         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
1436
1437 2011-02-22  Ilya Tikhonovsky  <loislo@chromium.org>
1438
1439         Reviewed by Pavel Feldman.
1440
1441         Web Inspector: flakyness of inspector tests.
1442         https://bugs.webkit.org/show_bug.cgi?id=54729
1443
1444         As far as we have the protocol with sequence numbers we can simplify test harness support
1445         and drop out chomium specific methods.
1446
1447         * inspector/CodeGeneratorInspector.pm:
1448         * inspector/front-end/TestController.js:
1449         (WebInspector.TestController):
1450         (WebInspector.TestController.prototype.notifyDone):
1451         (WebInspector.TestController.prototype.runAfterPendingDispatches):
1452         (WebInspector.TestController.prototype._evaluateForTestInFrontend):
1453         * inspector/front-end/inspector.js:
1454         (WebInspector.dispatch):
1455
1456 2011-02-22  Mario Sanchez Prada  <msanchez@igalia.com>
1457
1458         Reviewed by Martin Robinson.
1459
1460         [GTK] Combo boxes should emit object:selection-changed even when collapsed
1461         https://bugs.webkit.org/show_bug.cgi?id=53146
1462
1463         Emit the selection-changed signals when the menu list value has changed
1464
1465         Test: platform/gtk/accessibility/combo-box-collapsed-selection-changed.html
1466
1467         * accessibility/gtk/AXObjectCacheAtk.cpp:
1468         (WebCore::getListObject): New, return the right list object for
1469         menu lists and list boxes.
1470         (WebCore::notifyChildrenSelectionChange): Support menu lists.
1471         (WebCore::AXObjectCache::postPlatformNotification): Call function
1472         notifyChildrenSelectionChange for AXMenuListValueChanged.
1473
1474 2011-02-22  Andras Becsi  <abecsi@webkit.org>
1475
1476         Reviewed by Laszlo Gombos.
1477
1478         [Qt] Redesign the build system
1479         https://bugs.webkit.org/show_bug.cgi?id=51339
1480
1481         Part 2.
1482
1483         Build WebCore as a static library, compile the WebKit API and WebKit2 API
1484         in a final step and link to WebKit2, WebCore and JSC libraries to fix
1485         linking issues resulting from stripped away symbols.
1486
1487         No new tests needed.
1488
1489         * WebCore.pri: Add needed rules for handling the static library.
1490         * WebCore.pro: Reorganize API and linker options to QtWebKit.pro.
1491
1492 2011-02-22  Pavel Podivilov  <podivilov@chromium.org>
1493
1494         Reviewed by Pavel Feldman.
1495
1496         Web Inspector: [REGRESSION] navigation does not work when inspector is opened.
1497         https://bugs.webkit.org/show_bug.cgi?id=54947
1498
1499         * inspector/InspectorAgent.cpp:
1500         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
1501         * inspector/InspectorState.cpp:
1502         (WebCore::InspectorState::loadFromCookie):
1503         * inspector/InspectorState.h:
1504
1505 2011-02-15  Jer Noble  <jer.noble@apple.com>
1506
1507         Reviewed by Darin Adler.
1508
1509         Built-in HTML5 <audio> (and sometimes <video>) UI doesn't update playhead location or time displays
1510         https://bugs.webkit.org/show_bug.cgi?id=46142
1511
1512         Push a LayoutStateMaintainer in RenderMedia::layout() before calling layout() on the
1513         container elements.  This is necessary because, during layout(), the child renderers
1514         query the current LayoutState to determine where they will be repainting.  If a new
1515         LayoutState is not pushed here, child renderers will attempt to repaint relative to
1516         their grandparent's origin instead of their parents', and repaint operations will fail.
1517
1518         * rendering/RenderMedia.cpp:
1519         (WebCore::RenderMedia::layout):
1520
1521 2011-02-22  Benjamin Poulain  <benjamin.poulain@nokia.com>
1522
1523         Reviewed by Kenneth Rohde Christiansen.
1524
1525         Cleaning: remove a overzealous check for the pointer "files" from Chrome::setToolTip()
1526         https://bugs.webkit.org/show_bug.cgi?id=54952
1527
1528         Remove the unnecessary condition from the if(), HTMLInputElement::files() always return
1529         a valid reference for the input type FileInputType. 
1530
1531         * page/Chrome.cpp:
1532         (WebCore::Chrome::setToolTip):
1533
1534 2011-02-21  Pavel Podivilov  <podivilov@chromium.org>
1535
1536         Reviewed by Pavel Feldman.
1537
1538         Web Inspector: extract source mapping from SourceFrame to DebuggerPresentationModel.
1539         https://bugs.webkit.org/show_bug.cgi?id=54645
1540
1541         This is needed to map one script to several source files.
1542
1543         Test: inspector/debugger/source-frame.html
1544
1545         * WebCore.gypi:
1546         * WebCore.vcproj/WebCore.vcproj:
1547         * inspector/front-end/DebuggerPresentationModel.js: Added.
1548         (WebInspector.DebuggerPresentationModel):
1549         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceName):
1550         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1551         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
1552         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
1553         (WebInspector.DebuggerPresentationModel.prototype._encodeSourceLocation):
1554         (WebInspector.DebuggerPresentationModel.prototype._actualLocationToSourceLocation):
1555         * inspector/front-end/ScriptsPanel.js:
1556         (WebInspector.ScriptsPanel):
1557         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
1558         (WebInspector.ScriptsPanel.prototype._breakpointRemoved):
1559         (WebInspector.ScriptsPanel.prototype._sourceFrameForResource):
1560         (WebInspector.ScriptsPanel.prototype._sourceFrameForScript):
1561         (WebInspector.ScriptsPanel.prototype._addSourceFrame):
1562         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
1563         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
1564         (WebInspector.ScriptsPanel.prototype._clearCurrentExecutionLine):
1565         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
1566         (WebInspector.SourceFrameContentProviderForScript.prototype._buildSource):
1567         * inspector/front-end/SourceFrame.js:
1568         (WebInspector.SourceFrame.prototype.get loaded):
1569         (WebInspector.SourceFrame.prototype._createTextViewer):
1570         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
1571         (WebInspector.SourceFrame.prototype.setExecutionLine):
1572         (WebInspector.SourceFrame.prototype.clearExecutionLine):
1573         (WebInspector.SourceFrame.prototype.addBreakpoint):
1574         (WebInspector.SourceFrame.prototype.removeBreakpoint):
1575         (WebInspector.SourceFrame.prototype._contextMenu.addConditionalBreakpoint.didEditBreakpointCondition):
1576         (WebInspector.SourceFrame.prototype._contextMenu.addConditionalBreakpoint):
1577         (WebInspector.SourceFrame.prototype._findBreakpoint.filter):
1578         (WebInspector.SourceFrame.prototype._findBreakpoint):
1579         * inspector/front-end/WebKit.qrc:
1580         * inspector/front-end/inspector.html:
1581
1582 2011-02-22  Andrey Kosyakov  <caseq@chromium.org>
1583
1584         Reviewed by Pavel Feldman.
1585
1586         Web Inspector: provide a button to expand inspector toolbar when not all panel buttons fit
1587         https://bugs.webkit.org/show_bug.cgi?id=54671
1588
1589         - factored toolbar handling out of inspector.js
1590         - added toolbar dropdown
1591
1592         * WebCore.gypi:
1593         * WebCore.vcproj/WebCore.vcproj:
1594         * inspector/front-end/ExtensionServer.js:
1595         (WebInspector.ExtensionServer.prototype._onCreatePanel):
1596         * inspector/front-end/Panel.js:
1597         (WebInspector.Panel.prototype.get toolbarItem):
1598         * inspector/front-end/Toolbar.js: Added.
1599         (WebInspector.Toolbar):
1600         (WebInspector.Toolbar.prototype.resize):
1601         (WebInspector.Toolbar.prototype.addPanel):
1602         (WebInspector.Toolbar.prototype._toolbarDragStart):
1603         (WebInspector.Toolbar.prototype._toolbarDragEnd):
1604         (WebInspector.Toolbar.prototype._toolbarDrag):
1605         (WebInspector.Toolbar.prototype._onClose):
1606         (WebInspector.Toolbar.prototype._setDropdownVisible):
1607         (WebInspector.Toolbar.prototype._toggleDropdown):
1608         (WebInspector.Toolbar.prototype._updateDropdownButtonAndHideDropdown):
1609         (WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked):
1610         (WebInspector.Toolbar.createPanelToolbarItem):
1611         (WebInspector.ToolbarDropdown):
1612         (WebInspector.ToolbarDropdown.prototype.show):
1613         (WebInspector.ToolbarDropdown.prototype.hide):
1614         (WebInspector.ToolbarDropdown.prototype.get visible):
1615         (WebInspector.ToolbarDropdown.prototype._populate):
1616         (WebInspector.ToolbarDropdown.prototype._onKeyDown):
1617         * inspector/front-end/WebKit.qrc:
1618         * inspector/front-end/inspector.css:
1619         (#toolbar):
1620         (.toolbar-item):
1621         (.toolbar-item.toggleable):
1622         (.toolbar-item.toggleable.toggled-on):
1623         (#toolbar-dropdown .toolbar-icon):
1624         (#toolbar-dropdown .toolbar-label):
1625         (#toolbar-controls):
1626         (#toolbar-dropdown-arrow):
1627         (body.attached #toolbar-dropdown-arrow):
1628         (#toolbar-dropdown-arrow.dropdown-visible):
1629         (#toolbar-dropdown-arrow:hover):
1630         (#toolbar-dropdown-arrow:active):
1631         (#toolbar-dropdown):
1632         (body.detached.platform-mac-snowleopard #toolbar-dropdown):
1633         (#toolbar-dropdown .scrollable-content):
1634         (#toolbar-dropdown .toolbar-item):
1635         (#toolbar-dropdown .toolbar-item.toggleable.toggled-on):
1636         (#toolbar-dropdown .toolbar-item:hover):
1637         (#toolbar-dropdown .toolbar-item.toggleable.toggled-on:hover):
1638         (#toolbar-dropdown .toolbar-item:active .toolbar-icon):
1639         (.scrollable-content):
1640         (.scrollable-content::-webkit-scrollbar):
1641         (.scrollable-content::-webkit-resizer):
1642         (.scrollable-content::-webkit-scrollbar-thumb:vertical):
1643         (.scrollable-content::-webkit-scrollbar-thumb:vertical:active):
1644         (.scrollable-content::-webkit-scrollbar-track:vertical):
1645         (.toolbar-search-item):
1646         (#search):
1647         (body.attached #search):
1648         (#search-results-matches):
1649         (#close-button-left, #close-button-right):
1650         (.close-left):
1651         * inspector/front-end/inspector.html:
1652         * inspector/front-end/inspector.js:
1653         (WebInspector.set attached):
1654         (WebInspector.addPanel):
1655         (WebInspector.windowResize):
1656
1657 2011-02-22  Philippe Normand  <pnormand@igalia.com>
1658
1659         Reviewed by Xan Lopez.
1660
1661         [GTK] make distcheck fails
1662         https://bugs.webkit.org/show_bug.cgi?id=54943
1663
1664         Added new headers and removed references to deleted files.
1665
1666         * GNUmakefile.am:
1667
1668 2011-02-21  Yury Semikhatsky  <yurys@chromium.org>
1669
1670         Reviewed by Pavel Feldman.
1671
1672         Web Inspector: make DOM storage and Database agents have the same lifetime as InspectorAgent
1673         https://bugs.webkit.org/show_bug.cgi?id=54891
1674
1675         * inspector/InspectorAgent.cpp:
1676         (WebCore::InspectorAgent::InspectorAgent):
1677         (WebCore::InspectorAgent::setFrontend):
1678         (WebCore::InspectorAgent::disconnectFrontend):
1679         (WebCore::InspectorAgent::createFrontendLifetimeAgents):
1680         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
1681         (WebCore::InspectorAgent::didCommitLoad):
1682         * inspector/InspectorAgent.h:
1683         (WebCore::InspectorAgent::instrumentingAgents):
1684         * inspector/InspectorDOMStorageAgent.cpp:
1685         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
1686         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
1687         (WebCore::InspectorDOMStorageAgent::setFrontend):
1688         (WebCore::InspectorDOMStorageAgent::clearFrontend):
1689         (WebCore::InspectorDOMStorageAgent::selectDOMStorage):
1690         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
1691         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
1692         (WebCore::InspectorDOMStorageAgent::clearResources):
1693         * inspector/InspectorDOMStorageAgent.h:
1694         (WebCore::InspectorDOMStorageAgent::create):
1695         * inspector/InspectorDatabaseAgent.cpp:
1696         (WebCore::InspectorDatabaseAgent::didOpenDatabase):
1697         (WebCore::InspectorDatabaseAgent::clearResources):
1698         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
1699         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
1700         (WebCore::InspectorDatabaseAgent::setFrontend):
1701         (WebCore::InspectorDatabaseAgent::clearFrontend):
1702         (WebCore::InspectorDatabaseAgent::databaseForId):
1703         (WebCore::InspectorDatabaseAgent::selectDatabase):
1704         * inspector/InspectorDatabaseAgent.h:
1705         (WebCore::InspectorDatabaseAgent::create):
1706         * inspector/InspectorInstrumentation.cpp:
1707         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
1708         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
1709
1710 2011-02-22  Steve Lacey  <sjl@chromium.org>
1711
1712         Reviewed by Darin Fisher.
1713
1714         Rename new media statistics apis to better names
1715
1716         https://bugs.webkit.org/show_bug.cgi?id=54784
1717
1718         * html/HTMLMediaElement.cpp:
1719         (WebCore::HTMLMediaElement::webkitAudioDecodedByteCount):
1720         (WebCore::HTMLMediaElement::webkitVideoDecodedByteCount):
1721         * html/HTMLMediaElement.h:
1722         * html/HTMLMediaElement.idl:
1723         * html/HTMLVideoElement.cpp:
1724         (WebCore::HTMLVideoElement::webkitDecodedFrameCount):
1725         (WebCore::HTMLVideoElement::webkitDroppedFrameCount):
1726         * html/HTMLVideoElement.h:
1727         * html/HTMLVideoElement.idl:
1728         * platform/graphics/MediaPlayer.cpp:
1729         (WebCore::MediaPlayer::decodedFrameCount):
1730         (WebCore::MediaPlayer::droppedFrameCount):
1731         (WebCore::MediaPlayer::audioDecodedByteCount):
1732         (WebCore::MediaPlayer::videoDecodedByteCount):
1733         * platform/graphics/MediaPlayer.h:
1734         * platform/graphics/MediaPlayerPrivate.h:
1735         (WebCore::MediaPlayerPrivateInterface::decodedFrameCount):
1736         (WebCore::MediaPlayerPrivateInterface::droppedFrameCount):
1737         (WebCore::MediaPlayerPrivateInterface::audioDecodedByteCount):
1738         (WebCore::MediaPlayerPrivateInterface::videoDecodedByteCount):
1739
1740 2011-02-21  Roland Steiner  <rolandsteiner@chromium.org>
1741
1742         Reviewed by Kent Tamura.
1743
1744         Bug 54435 - Simplify CSSStyleSelector::canShareStyleWithElement
1745         https://bugs.webkit.org/show_bug.cgi?id=54435
1746
1747         Changed the function to a series of early-exit 'if's,
1748         removed most temporary variables.
1749
1750         No new tests. (refactoring)
1751
1752         * css/CSSStyleSelector.cpp:
1753         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1754
1755 2011-02-21  Nico Weber  <thakis@chromium.org>
1756
1757         Reviewed by James Robinson.
1758
1759         [chromium] PopupContainer::show() confuses clang's -Woverloaded-virtual
1760         https://bugs.webkit.org/show_bug.cgi?id=54923
1761
1762         Rename PopupContainer::show() to showInRect(), to make it obvious it's
1763         not an override of ScrollView::show().
1764
1765         No intended functionality change.
1766
1767         * platform/chromium/PopupMenuChromium.cpp:
1768         (WebCore::PopupContainer::showInRect):
1769         (WebCore::PopupMenuChromium::show):
1770         * platform/chromium/PopupMenuChromium.h:
1771
1772 2011-02-21  Julien Chaffraix  <jchaffraix@codeaurora.org>
1773
1774         Reviewed by Antti Koivisto.
1775
1776         Improve the local{SharedStyle,CousinList} algorithm
1777         https://bugs.webkit.org/show_bug.cgi?id=45507
1778
1779         This change improves the algorithm to find shared styles: the old
1780         algorithm would stop the search after the first cousin, even if
1781         the search threshold is not met. As such, the algorithm would
1782         systematically miss sharings across second cousins and beyond.
1783         The new algorithm continues the search, as long as threshold is
1784         not met. It also separates the threshold for sibling/cousins
1785         search, from that on the levels of search, which is easier to
1786         optimize.
1787         The new algorithm finds up to 30% more sharings on some sites
1788         (e.g. amazon.com and rakuten.co.jp) with no noticeable slowdown.
1789
1790         No new test, refactoring only.
1791
1792         * css/CSSStyleSelector.cpp:
1793         (WebCore::CSSStyleSelector::locateCousinList):
1794         (WebCore::CSSStyleSelector::locateSharedStyle):
1795         While changing the algorithm, cleaned up the style of those 2 methods
1796         (use early return, renamed some variables).
1797
1798         * css/CSSStyleSelector.h:
1799
1800 2011-02-21  Nico Weber  <thakis@chromium.org>
1801
1802         Reviewed by Adam Barth.
1803
1804         RenderTableCell::baselinePosition() confuses clang's -Woverloaded-virtual
1805         https://bugs.webkit.org/show_bug.cgi?id=54922
1806
1807         RenderTableCell::baselinePosition() has the same name as a virtual
1808         method in superclass RenderBlock. Rename the subclass method to make
1809         it clear it's not an attempted override.
1810
1811         No intended functionality change.
1812
1813         * rendering/RenderTableCell.cpp:
1814         (WebCore::RenderTableCell::cellBaselinePosition):
1815         * rendering/RenderTableCell.h:
1816         * rendering/RenderTableSection.cpp:
1817         (WebCore::RenderTableSection::calcRowLogicalHeight):
1818         (WebCore::RenderTableSection::layoutRows):
1819
1820 2011-02-21  Benjamin Kalman  <kalman@chromium.org>
1821
1822         Reviewed by Ryosuke Niwa.
1823
1824         Extending selection by a boundary granularity (LineBoundary/ParagraphBoundary/DocumentBoundary) sets incorrect
1825         start/end of selection for RTL
1826         https://bugs.webkit.org/show_bug.cgi?id=54724
1827
1828         On mac, the selection should always grow when extending by a boundary granularity (line/paragraph/document).
1829         This is achieved by extending from the start for the "left" direction (e.g. pressing left arrow key), or
1830         extending from the end when for the "right" direction (e.g. pressing right arrow key).
1831
1832         However, this has a bug for RTL text, which should actually extend from the *end* when extending left (since
1833         direction is obviously reversed) and likewise extend from the start when extending right.
1834
1835         * editing/SelectionController.cpp:
1836         (WebCore::SelectionController::modify):
1837
1838 2011-02-21  Nico Weber  <thakis@chromium.org>
1839
1840         Reviewed by Adam Barth.
1841
1842         ImageDocument::imageChanged() confuses clang's -Woverride-virtual
1843         https://bugs.webkit.org/show_bug.cgi?id=54924
1844
1845         Rename ImageDocument::imageChanged() to imageUpdated() to make clear
1846         that it's not an override of CachedResourceClient::imageChanged().
1847
1848         * html/ImageDocument.cpp:
1849         (WebCore::ImageDocumentParser::appendBytes):
1850         (WebCore::ImageDocumentParser::finish):
1851         (WebCore::ImageDocument::imageUpdated):
1852         * html/ImageDocument.h:
1853
1854 2011-02-21  Roland Steiner  <rolandsteiner@chromium.org>
1855
1856         Reviewed by Kent Tamura.
1857
1858         Bug 54934 - Sort the WebCore project file(s)
1859         https://bugs.webkit.org/show_bug.cgi?id=54934
1860
1861         No new tests. (no code affected)
1862
1863         * GNUmakefile.am:
1864         * WebCore.xcodeproj/project.pbxproj:
1865
1866 2011-02-21  Nico Weber  <thakis@chromium.org>
1867
1868         Reviewed by Adam Barth.
1869
1870         canAccommodateEllipsis() confuses clang's -Woverloaded-virtual
1871         https://bugs.webkit.org/show_bug.cgi?id=54909
1872
1873         Rename the overload in RootInlineBox to lineCanAccomodateEllipsis() to
1874         unconfuse clang. No intended functionality change.
1875
1876         * rendering/RenderBlockLineLayout.cpp:
1877         (WebCore::RenderBlock::checkLinesForTextOverflow):
1878         * rendering/RenderFlexibleBox.cpp:
1879         (WebCore::RenderFlexibleBox::applyLineClamp):
1880         * rendering/RootInlineBox.cpp:
1881         (WebCore::RootInlineBox::lineCanAccommodateEllipsis):
1882         * rendering/RootInlineBox.h:
1883
1884 2011-02-21  Adele Peterson  <adele@apple.com>
1885
1886         Reviewed by Dan Bernstein.
1887
1888         Fix for for https://bugs.webkit.org/show_bug.cgi?id=54402
1889         REGRESSION (r72052): Placeholder text doesn't have the right padding for search fields on Windows
1890
1891         Test: updated fast/forms/placeholder-position.html and tested manually
1892
1893         Consider padding and margin for the results and cancel buttons.  This is important for the Windows 
1894         theme which uses padding to correctly position those buttons.  This change fixes the placeholder 
1895         position, and also better aligns the results popup list with the actual text you type.
1896
1897         * rendering/RenderTextControlSingleLine.cpp:
1898         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
1899         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
1900
1901 2011-02-21  Nico Weber  <thakis@chromium.org>
1902
1903         Reviewed by Kent Tamura.
1904
1905         GIFImageDecoder::setSize() tries to override the superclass method but fails
1906         https://bugs.webkit.org/show_bug.cgi?id=54305
1907
1908         The superclass uses unsigned instead of int for its parameters, so
1909         GIFImageDecoder::setSize() was an overload, not an override.
1910
1911         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1912         (WebCore::GIFImageDecoder::setSize):
1913         * platform/image-decoders/gif/GIFImageDecoder.h:
1914
1915 2011-02-21  Ryosuke Niwa  <rniwa@webkit.org>
1916
1917         Reviewed by Darin Adler.
1918
1919         Deploy EditingStyle more in ApplyStyleCommand and do some cleanup
1920         https://bugs.webkit.org/show_bug.cgi?id=54528
1921
1922         * editing/ApplyStyleCommand.cpp:
1923         (WebCore::StyleChange::init): Allows style to be a null pointer.
1924         (WebCore::ApplyStyleCommand::applyInlineStyle): Overrides the value of text-decoration property by that of
1925         -webkit-text-decorations-in-effect and remove the latter property when present. This allows removeImplicitlyStyledElement
1926         to ignore -webkit-text-decorations-in-effect. Also uses the return value of EditingStyle::textDirection to determine
1927         whether or not we need to apply unicode-bidi / direction instead of directly checking the value of unicode-bidi property.
1928         (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle): Takes EditingStyle* instead of CSSMutableStyleDeclaration*.
1929         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): Ditto.
1930         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Ditto.
1931         (WebCore::ApplyStyleCommand::removeCSSStyle): Ditto.
1932         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Ditto.
1933         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Ditto.
1934         (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto; no longer collapse text decoration properties because
1935         ApplyStyleCommand::applyInlineStyle already does it.
1936         * editing/ApplyStyleCommand.h:
1937         * editing/EditingStyle.cpp:
1938         (WebCore::EditingStyle::textDirection): Exits early when m_mutableStyle is null.
1939         (WebCore::EditingStyle::collapseTextDecorationProperties): Extracted from ApplyStyleCommand::removeInlineStyle.
1940         * editing/EditingStyle.h:
1941
1942 2011-02-21  Mark Rowe  <mrowe@apple.com>
1943
1944         Reviewed by Darin Adler and Alexey Proskuryakov.
1945
1946         <http://webkit.org/b/54919> / <rdar://problem/7689300> WebCore should retrieve unclamped frame delays from ImageIO
1947
1948         * platform/graphics/cg/ImageSourceCG.cpp:
1949         (WebCore::ImageSource::frameDurationAtIndex): Look for the unclamped frame delay in the
1950         frame properties dictionary and use that if it exists. If it does not exist in the
1951         dictionary then fall back to using the clamped frame delay.
1952
1953 2011-02-21  James Kozianski  <koz@chromium.org>
1954
1955         Reviewed by Kent Tamura.
1956
1957         Causes elements to be unfocusable after tabindex property is removed.
1958         https://bugs.webkit.org/show_bug.cgi?id=54727
1959
1960         Test: fast/html/tabindex-removal.html
1961
1962         * dom/Node.cpp:
1963         (WebCore::Node::clearTabIndexExplicitly):
1964         * dom/Node.h:
1965         * dom/NodeRareData.h:
1966         (WebCore::NodeRareData::clearTabIndexExplicitly):
1967         * html/HTMLElement.cpp:
1968         (WebCore::HTMLElement::parseMappedAttribute):
1969
1970 2011-02-21  Alexey Proskuryakov  <ap@apple.com>
1971
1972         Reviewed by Mark Rowe.
1973
1974         <rdar://problem/8995483> Remove stubs of unneeded NSURLAuthenticationChallengeSender methods
1975
1976         * platform/network/mac/AuthenticationMac.mm: Remove the stubs that are no longer needed.
1977
1978 2011-02-21  Sam Weinig  <sam@webkit.org>
1979
1980         Reviewed by Dan Bernstein.
1981
1982         Overhang areas need to be invalidated on scroll
1983         <rdar://problem/9032194>
1984         https://bugs.webkit.org/show_bug.cgi?id=54917
1985
1986         * platform/ScrollView.cpp:
1987         (WebCore::ScrollView::scrollContents):
1988         We need to explicitly invalidate the overhang areas when we scroll the contents
1989         of a ScrollView, since they could contain arbitrary content that cannot be blitted.
1990
1991 2011-02-21  Lucas Forschler  <lforschler@apple.com>
1992
1993         Reviewed by Stephanie Lewis.
1994
1995         Fix the Leopard Debug build by incorporating the RenderSVGAllInOne.cpp
1996
1997         No new tests required.
1998
1999         * WebCore.xcodeproj/project.pbxproj:
2000
2001 2011-02-21  Pratik Solanki  <psolanki@apple.com>
2002
2003         Reviewed by Darin Adler.
2004
2005         Remove global initializer in CookieStorageCFNet.cpp
2006         https://bugs.webkit.org/show_bug.cgi?id=54905
2007
2008         * platform/network/cf/CookieStorageCFNet.cpp:
2009         (WebCore::currentCookieStorage):
2010         (WebCore::setCurrentCookieStorage):
2011         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2012
2013 2011-02-18  Jer Noble  <jer.noble@apple.com>
2014
2015         Reviewed by Sam Weinig.
2016
2017         WebKit2: Media document videos play only sound, no video (affects trailers.apple.com)
2018         https://bugs.webkit.org/show_bug.cgi?id=54771
2019
2020         Now that video is accelerated, we no longer need to special case
2021         video playing within a media document.
2022
2023         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2024         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
2025         (WebCore::MediaPlayerPrivateQTKit::supportsAcceleratedRendering):
2026
2027 2011-02-21  Alexey Proskuryakov  <ap@apple.com>
2028
2029         Reviewed by Adam Roben.
2030
2031         REGRESSION (WebKit2): HTTP requests time out after 60 seconds
2032         https://bugs.webkit.org/show_bug.cgi?id=54755
2033         <rdar://problem/9006592>
2034
2035         No new tests - it won't be great to have a test that runs for a minute.
2036
2037         It's now possible to set a default timeout to be used at ResourceRequest creation. If one
2038         hasn't been set, ResourceRequest will behave as before (use NSURLRequest default on Mac,
2039         or use INT_MAX on other platforms).
2040
2041         * WebCore.exp.in:
2042         * platform/network/ResourceRequestBase.cpp:
2043         (WebCore::ResourceRequestBase::defaultTimeoutInterval): Get the ResourceRequest notion of
2044         default timeout interval (may be 0 if using NSURLRequest default).
2045         (WebCore::ResourceRequestBase::setDefaultTimeoutInterval): Set the static member variable.
2046         (WebCore::ResourceRequestBase::updatePlatformRequest): Added an assertion that resource
2047         request is updated. Plaform code often calls updateResourceRequest() indirectly from this
2048         function, and that must obviously be a no-op.
2049         (WebCore::ResourceRequestBase::updateResourceRequest): Added an assertion in the opposite
2050         direction.
2051         * platform/network/ResourceRequestBase.h: Changed "unspecifiedTimeoutInterval" to
2052         "defaultTimeoutInterval". It has been used as default by most platforms anyway.
2053         (WebCore::ResourceRequestBase::ResourceRequestBase):
2054
2055         * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdatePlatformRequest):
2056         Now zero is the magic value, not INT_MAX. We'll use NSURLRequest default if neither
2057         setTimeoutInterval() nor setDefaultTimeoutInterval() has been called.
2058
2059 2011-02-21  Martin Robinson  <mrobinson@igalia.com>
2060
2061         Reviewed by Xan Lopez.
2062
2063         [GTK] editing/pasteboard/dataTransfer-setData-getData.html fails
2064         https://bugs.webkit.org/show_bug.cgi?id=54895
2065
2066         Correct the GTK+ clipboard implementation to know that "text" is an alias
2067         for "text/html" data. This corrects the failing test.
2068
2069         * platform/gtk/ClipboardGtk.cpp:
2070         (WebCore::dataObjectTypeFromHTMLClipboardType): Accept "text" as well as "Text".
2071         (WebCore::ClipboardGtk::types): Advertise "text" as well as "Text".
2072
2073 2011-02-21  Vsevolod Vlasov  <vsevik@chromium.org>
2074
2075         Reviewed by Pavel Feldman.
2076
2077         ProcessingInstruction should provide a way to know if it is of CSS type.
2078         https://bugs.webkit.org/show_bug.cgi?id=54868
2079
2080         * dom/ProcessingInstruction.cpp:
2081         (WebCore::ProcessingInstruction::ProcessingInstruction):
2082         (WebCore::ProcessingInstruction::checkStyleSheet):
2083         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2084         * dom/ProcessingInstruction.h:
2085         (WebCore::ProcessingInstruction::isCSS):
2086
2087 2011-02-21  Simon Fraser  <simon.fraser@apple.com>
2088
2089         Put JSDOMImplementationCustom.cpp where it belongs in the project.
2090
2091         * WebCore.xcodeproj/project.pbxproj:
2092
2093 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
2094
2095         Reviewed by Sam Weinig.
2096
2097         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
2098
2099         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
2100         containing a pointer to its parent class. These links should reflect the inheritance
2101         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
2102         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
2103         since intervening C++ classes may not have ClassInfo - but would be a potential bug
2104         were ClassInfo were to be added.
2105
2106         * bindings/js/JSAudioConstructor.cpp:
2107         * bindings/js/JSDOMGlobalObject.cpp:
2108         * bindings/js/JSImageConstructor.cpp:
2109         * bindings/js/JSOptionConstructor.cpp:
2110         * bindings/scripts/CodeGeneratorJS.pm:
2111         * bridge/objc/objc_runtime.mm:
2112         * bridge/runtime_object.cpp:
2113
2114 2011-02-21  Pavel Feldman  <pfeldman@chromium.org>
2115
2116         Reviewed by Yury Semikhatsky.
2117
2118         Web Inspector: navigation does not work after reopening frontend.
2119         https://bugs.webkit.org/show_bug.cgi?id=54879
2120
2121         Test: http/tests/inspector-enabled/open-close-open.html
2122
2123         * inspector/InspectorAgent.cpp:
2124         (WebCore::InspectorAgent::setFrontend):
2125         * inspector/InspectorState.cpp:
2126         (WebCore::InspectorState::unmute):
2127         * inspector/InspectorState.h:
2128
2129 2011-02-21  Adam Roben  <aroben@apple.com>
2130
2131         Protect the PluginView when evaluating javascript: URLs
2132
2133         Fixes <http://webkit.org/b/54884> <rdar://problem/9030864>
2134         plugins/get-url-with-javascript-destroying-plugin.html crashing on Windows since it was
2135         added
2136
2137         Reviewed by Sam Weinig.
2138
2139         * plugins/PluginView.cpp:
2140         (WebCore::PluginView::performRequest): Protect the PluginView, not just its parent frame,
2141         when evaluating javascript: URLs.
2142
2143 2011-02-21  Martin Robinson  <mrobinson@igalia.com>
2144
2145         Fix GTK+ build after r79223.
2146
2147         * GNUmakefile.am: Add file missing from the source list.
2148
2149 2011-02-14  Alexander Pavlov  <apavlov@chromium.org>
2150
2151         Reviewed by Yury Semikhatsky.
2152
2153         Web Inspector: audits should not warn about gzip compression for 304s
2154         https://bugs.webkit.org/show_bug.cgi?id=54343
2155
2156         Do not run compression-related audits on 304 resources.
2157         Drive-by: handle multi-encoding resources (Content-Encoding: sdhc,gzip) correctly.
2158
2159         * inspector/front-end/AuditRules.js:
2160         (WebInspector.AuditRules.GzipRule.prototype.doRun):
2161         (WebInspector.AuditRules.GzipRule.prototype._isCompressed):
2162
2163 2011-02-08  Anton Muhin  <antonm@chromium.org>
2164
2165        Reviewed by Adam Barth and Alexey Proskuryakov.
2166
2167        Propagate security origin of parent document into HTML documents created with DOMImplementation
2168        https://bugs.webkit.org/show_bug.cgi?id=53611
2169
2170        This restores invariant that JS wrappers residing in the same JS context should come
2171        from the same security origin.
2172
2173        Absence of regressions is covered by the current tests.  Different security origin of
2174        DOMImplementation is difficult to check with layout tests as DOMImplementation
2175        resides in the same JS context as parent document and therefore there are no security origin checks.
2176        This is observable however in C++.
2177
2178        * Android.jscbindings.mk:
2179        * CMakeLists.txt:
2180        * WebCore.gypi:
2181        * WebCore.pro:
2182        * WebCore.vcproj/WebCore.vcproj:
2183        * WebCore.xcodeproj/project.pbxproj:
2184        * bindings/v8/V8GCController.cpp:
2185        (WebCore::NodeGrouperVisitor::visitDOMWrapper):
2186        * dom/DOMImplementation.cpp:
2187        (WebCore::DOMImplementation::DOMImplementation):
2188        (WebCore::DOMImplementation::createDocument):
2189        * dom/DOMImplementation.h:
2190        (WebCore::DOMImplementation::create):
2191        (WebCore::DOMImplementation::documentDestroyed):
2192        (WebCore::DOMImplementation::parentDocument):
2193        * dom/DOMImplementation.idl:
2194        * dom/Document.cpp:
2195        (WebCore::Document::~Document):
2196        (WebCore::Document::implementation):
2197        * dom/Document.h:
2198
2199 2011-02-21  Andrey Adaikin  <aandrey@google.com>
2200
2201         Reviewed by Pavel Feldman.
2202
2203         Web Inspector: [Text editor] Optimize editing updates in gutter panel
2204         https://bugs.webkit.org/show_bug.cgi?id=54866
2205
2206         * inspector/front-end/TextViewer.js:
2207         (WebInspector.TextViewer.prototype.set startEditingListener):
2208         (WebInspector.TextViewer.prototype.set endEditingListener):
2209         (WebInspector.TextViewer.prototype.endUpdates):
2210         (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
2211         (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
2212         (WebInspector.TextEditorChunkedPanel.prototype._chunkNumberForLine):
2213         (WebInspector.TextEditorGutterPanel.prototype._expandChunks):
2214         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2215         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
2216
2217 2011-02-21  Alexander Pavlov  <apavlov@chromium.org>
2218
2219         Reviewed by Yury Semikhatsky.
2220
2221         Web Inspector: [Audits] Image dimensions in inline style not checked
2222         https://bugs.webkit.org/show_bug.cgi?id=54738
2223
2224         * inspector/front-end/AuditRules.js:
2225         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
2226
2227 2011-02-21  Yury Semikhatsky  <yurys@chromium.org>
2228
2229         Reviewed by Pavel Feldman.
2230
2231         Web Inspector: create and destroy DOM agent along with InspectorAgent
2232         https://bugs.webkit.org/show_bug.cgi?id=54875
2233
2234         * GNUmakefile.am:
2235         * WebCore.gypi:
2236         * WebCore.pro:
2237         * WebCore.vcproj/WebCore.vcproj:
2238         * WebCore.xcodeproj/project.pbxproj:
2239         * inspector/InstrumentingAgents.h: Added. Agents that want to instrument WebCore should register themselve
2240         on this object.
2241         (WebCore::InstrumentingAgents::InstrumentingAgents):
2242         (WebCore::InstrumentingAgents::~InstrumentingAgents):
2243         (WebCore::InstrumentingAgents::inspectorBrowserDebuggerAgent):
2244         (WebCore::InstrumentingAgents::setInspectorBrowserDebuggerAgent):
2245         (WebCore::InstrumentingAgents::inspectorConsoleAgent):
2246         (WebCore::InstrumentingAgents::setInspectorConsoleAgent):
2247         (WebCore::InstrumentingAgents::inspectorDOMAgent):
2248         (WebCore::InstrumentingAgents::setInspectorDOMAgent):
2249         (WebCore::InstrumentingAgents::inspectorDOMStorageAgent):
2250         (WebCore::InstrumentingAgents::setInspectorDOMStorageAgent):
2251         (WebCore::InstrumentingAgents::inspectorDatabaseAgent):
2252         (WebCore::InstrumentingAgents::setInspectorDatabaseAgent):
2253         (WebCore::InstrumentingAgents::inspectorDebuggerAgent):
2254         (WebCore::InstrumentingAgents::setInspectorDebuggerAgent):
2255         (WebCore::InstrumentingAgents::inspectorProfilerAgent):
2256         (WebCore::InstrumentingAgents::setInspectorProfilerAgent):
2257         (WebCore::InstrumentingAgents::inspectorResourceAgent):
2258         (WebCore::InstrumentingAgents::setInspectorResourceAgent):
2259         (WebCore::InstrumentingAgents::inspectorRuntimeAgent):
2260         (WebCore::InstrumentingAgents::setInspectorRuntimeAgent):
2261         (WebCore::InstrumentingAgents::inspectorStorageAgent):
2262         (WebCore::InstrumentingAgents::setInspectorStorageAgent):
2263         (WebCore::InstrumentingAgents::inspectorTimelineAgent):
2264         (WebCore::InstrumentingAgents::setInspectorTimelineAgent):
2265         * inspector/InspectorAgent.cpp:
2266         (WebCore::InspectorAgent::InspectorAgent):
2267         (WebCore::InspectorAgent::setFrontend):
2268         (WebCore::InspectorAgent::disconnectFrontend):
2269         (WebCore::InspectorAgent::createFrontendLifetimeAgents):
2270         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
2271         (WebCore::InspectorAgent::didCommitLoad):
2272         (WebCore::InspectorAgent::domContentLoadedEventFired):
2273         (WebCore::InspectorAgent::loadEventFired):
2274         * inspector/InspectorAgent.h:
2275         * inspector/InspectorCSSAgent.cpp:
2276         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2277         (WebCore::InspectorCSSAgent::~InspectorCSSAgent):
2278         * inspector/InspectorCSSAgent.h:
2279         * inspector/InspectorConsoleAgent.cpp:
2280         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2281         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
2282         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
2283         (WebCore::InspectorConsoleAgent::clearFrontend):
2284         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
2285         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2286         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2287         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2288         * inspector/InspectorConsoleAgent.h:
2289         * inspector/InspectorDOMAgent.cpp: DOM agent now lives even when the front-end is not attached.
2290         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2291         (WebCore::InspectorDOMAgent::setFrontend): Add DOM agent to the set of active agents when the front-end
2292         is attached.
2293         (WebCore::InspectorDOMAgent::clearFrontend):
2294         * inspector/InspectorDOMAgent.h:
2295         (WebCore::InspectorDOMAgent::create):
2296
2297 2011-02-21  Csaba Osztrogonác  <ossy@webkit.org>
2298
2299         Reviewed by Andreas Kling.
2300
2301         [Qt][V8]REGRESSION(r79157): Fix build
2302         https://bugs.webkit.org/show_bug.cgi?id=54871
2303
2304         * bridge/npruntime_internal.h: Add one more undef because of evil X11 macro.
2305
2306 2011-02-16  Vitaly Repeshko  <vitalyr@chromium.org>
2307
2308         Reviewed by Mihai Parparita.
2309
2310         [V8] SerializedScriptValue: fix JS exception handling.
2311         https://bugs.webkit.org/show_bug.cgi?id=54555
2312
2313         Added checks for exceptions and empty handles:
2314         * bindings/v8/SerializedScriptValue.cpp:
2315         (WebCore::Serializer::Serializer):
2316         (WebCore::Serializer::serialize):
2317         (WebCore::Serializer::checkException):
2318         (WebCore::Serializer::reportFailure):
2319         (WebCore::Serializer::ArrayState::advance):
2320         (WebCore::Serializer::AbstractObjectState::AbstractObjectState):
2321         (WebCore::Serializer::AbstractObjectState::advance):
2322         (WebCore::Serializer::push):
2323         (WebCore::Serializer::handleError):
2324         (WebCore::Serializer::newObjectState):
2325         (WebCore::Serializer::doSerialize):
2326         (WebCore::SerializedScriptValue::SerializedScriptValue):
2327
2328 2011-02-21  Ryosuke Niwa  <rniwa@webkit.org>
2329
2330         Reviewed by Kent Tamura.
2331
2332         Add selectionchange event
2333         https://bugs.webkit.org/show_bug.cgi?id=45712
2334
2335         Added the support for asynchronous selectionchange event, which is fired whenever selection is changed.
2336         This event is not cancelable and does not bubble. An event listener can be attached to a document by
2337         body element's onselectionchange attribute or via document's onselectionchange property.
2338
2339         Note that WebKit's implementation fires the event asynchronously whereas Internet Explorer's implementation
2340         fires it synchronously. This implies that a script that modify selection (e.g. via selection's addRange)
2341         will not observe the event before the control returns to JavaScript.
2342
2343         See also: http://msdn.microsoft.com/en-us/library/ms536968(VS.85).aspx
2344
2345         Tests: fast/events/selectionchange-iframe.html
2346                fast/events/selectionchange-user-initiated.html
2347
2348         * dom/Document.cpp:
2349         (WebCore::Document::enqueueDocumentEvent): Added.
2350         * dom/Document.h: Added selectionchange event listener.
2351         * dom/Document.idl: Added onselectionchagne attribute.
2352         * dom/EventNames.h: Added selectionchange
2353         * editing/SelectionController.cpp:
2354         (WebCore::SelectionController::setSelection): Fires selectionchange event.
2355         * html/HTMLAttributeNames.in: Added onselectionchange.
2356         * html/HTMLBodyElement.cpp:
2357         (WebCore::HTMLBodyElement::parseMappedAttribute): Handles onselectionchange attribute.
2358
2359 2011-02-21  Ilya Tikhonovsky  <loislo@chromium.org>
2360
2361         Reviewed by Pavel Feldman.
2362
2363         Web Inspector: protocol error messages are dumping incorrectly in Layout tests.
2364         https://bugs.webkit.org/show_bug.cgi?id=54859
2365
2366         * inspector/CodeGeneratorInspector.pm:
2367
2368 2011-02-21  Pavel Feldman  <pfeldman@chromium.org>
2369
2370         Reviewed by Yury Semikhatsky.
2371
2372         Web Inspector: generate protocol documentation based on IDL.
2373         https://bugs.webkit.org/show_bug.cgi?id=54822
2374
2375         * inspector/CodeGeneratorInspector.pm:
2376
2377 2011-02-21  Andoni Morales Alastruey  <amorales@flumotion.com>
2378
2379         Reviewed by Martin Robinson.
2380
2381         [GStreamer] Add URI queries support in webkitwebsrc
2382         https://bugs.webkit.org/show_bug.cgi?id=54627
2383
2384         This allow replying to URI queries from downstream elements
2385         with the uri currently set in the source element.
2386
2387         No new tests, this feature is dedicated to internal GStreamer use,
2388         such as the upcoming HTTP Live Streaming element.
2389
2390         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2391         (webKitWebSrcQuery):
2392
2393 2011-02-21  Andoni Morales Alastruey  <amorales@flumotion.com>
2394
2395         Reviewed by Martin Robinson.
2396
2397         [GStreamer] Add 'location' property in webkitwebsrc
2398         https://bugs.webkit.org/show_bug.cgi?id=54628
2399
2400         No new tests, this feature is dedicated to internal GStreamer use,
2401         such as the upcoming HTTP Live Streaming element.
2402
2403         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2404         (webkit_web_src_class_init):
2405         (webKitWebSrcSetProperty):
2406         (webKitWebSrcGetProperty):
2407
2408 2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
2409
2410         Reviewed by Kent Tamura.
2411
2412         Rename Position::node() to Position::deprecatedNode()
2413         https://bugs.webkit.org/show_bug.cgi?id=54622
2414
2415         Done the rename. All calls to node() are replaced by calls to deprecatedNode() except when
2416         calls were of the form node()->document() and node()->inDocument() in which case they were
2417         replaced by anchorNode()->document() and anchorNode()->inDocument() respectively.
2418
2419         * WebCore.exp.in: Added Position::containerNode.
2420
2421         The rest abbreviated for simplicity. Please see svn log.
2422
2423 2011-02-20  Gavin Barraclough  <barraclough@apple.com>
2424
2425         Build fix (remove includes).
2426
2427         * bindings/js/JSDOMBinding.cpp:
2428         * bindings/js/JSDOMWindowCustom.cpp:
2429         * bindings/js/JSHistoryCustom.cpp:
2430         * bindings/js/JSLocationCustom.cpp:
2431
2432 2011-02-20  Gavin Barraclough  <barraclough@apple.com>
2433
2434         Reviewed by Oliver Hunt.
2435
2436         https://bugs.webkit.org/show_bug.cgi?id=54839
2437         Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
2438
2439         Historically, Native functions used to be represented by PrototypeFunctions, however
2440         since introducing call optimizations to the JIT this has used JSFunctions for host
2441         calls too. At the point this change was made, the interpreter continued to use
2442         PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
2443         the interpreter has had to be able to run using host functions represented using
2444         JSFunctions - leading to an unnecessary and redundant divergence in behaviour between 
2445         interpreter only builds, and situations where the JIT has fallen back to interpreting.
2446
2447         NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
2448         for wrappers for host functions, and as such can also be removed.
2449
2450         GlobalEvalFunction is a redundant wrapper that happens to be derived from
2451         PrototypeFunction. It existed to hold a reference to the global object - but since all
2452         functions how derive from JSObjectWithGlobalObject, this no longer requires an
2453         additional class to provide this functionality.
2454
2455         * bindings/js/JSDOMBinding.cpp:
2456         * bindings/js/JSDOMWindowCustom.cpp:
2457         * bindings/js/JSHistoryCustom.cpp:
2458         * bindings/js/JSLocationCustom.cpp:
2459             Removed use of redundant classes.
2460
2461 2011-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2462
2463         Unreviewed, rolling out r79169.
2464         http://trac.webkit.org/changeset/79169
2465         https://bugs.webkit.org/show_bug.cgi?id=54846
2466
2467         Made unexpected results for tests without CJK characters
2468         (Requested by tkent on #webkit).
2469
2470         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2471         (WebCore::FontCache::createFontPlatformData):
2472         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2473         (WebCore::FontPlatformData::FontPlatformData):
2474         (WebCore::FontPlatformData::operator=):
2475         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2476         (WebCore::FontPlatformData::orientation):
2477         * platform/graphics/skia/FontCustomPlatformData.cpp:
2478         (WebCore::FontCustomPlatformData::fontPlatformData):
2479
2480 2011-02-20  Chun-Lung Huang  <alvincl.huang@gmail.com>
2481
2482         Reviewed by Kent Tamura.
2483
2484         On Chromium Windows, glyphs in vertical text tests are rotated 90
2485         degrees clockwise. https://bugs.webkit.org/show_bug.cgi?id=51450
2486
2487         This platform dependent patch makes Chromium Windows show the
2488         vertical writing text correctly. Job was done by adding a prefix '@'
2489         in front of the font family name (Windows Only). No new tests added.
2490
2491         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2492         (WebCore::FontCache::createFontPlatformData):
2493         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2494         (WebCore::FontPlatformData::FontPlatformData):
2495         (WebCore::FontPlatformData::operator=):
2496         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2497         (WebCore::FontPlatformData::orientation):
2498         * platform/graphics/skia/FontCustomPlatformData.cpp:
2499         (WebCore::FontCustomPlatformData::fontPlatformData):
2500
2501 2011-02-20  Simon Fraser  <simon.fraser@apple.com>
2502
2503         Reviewed by Dirk Schulze.
2504
2505         REGRESSION (r73369-r73405): transform animation interpolates incorrectly
2506         https://bugs.webkit.org/show_bug.cgi?id=54793
2507         
2508         After the refactoring in r73380, the ending state for some types of
2509         accelerated animations was computed incorrectly, because the TransformationMatrix
2510         wasn't reset to identity before the ending value transformations were applied.
2511         
2512         Fix by cleaning up the code to use explicit, separate values for
2513         starting and ending values. Only matrix-type animations had this
2514         issue, but cleaned up other clauses similarly.
2515
2516         Test: animations/3d/matrix-transform-type-animation.html
2517
2518         * platform/graphics/ca/GraphicsLayerCA.cpp:
2519         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
2520
2521 2011-02-20  Dan Bernstein  <mitz@apple.com>
2522
2523         Reviewed by Maciej Stachowiak.
2524
2525         <rdar://problem/9028929> REGRESSION (r75897): Scaling applied twice to an iframe with a transformed ancestor
2526
2527         Test: fast/frames/iframe-scale-applied-twice.html
2528
2529         * page/FrameView.cpp:
2530         (WebCore::FrameView::create): Set the initial bounds of the view to match the
2531         frame size.
2532         * platform/ScrollView.cpp:
2533         (WebCore::ScrollView::visibleContentRect): Based on bounds, not frame size.
2534         (WebCore::ScrollView::updateScrollbars): Ditto.
2535         (WebCore::ScrollView::setFrameRect): Moved code that really handles bounds size
2536         change to setBoundsSize().
2537         (WebCore::ScrollView::setBoundsSize): Added.
2538         (WebCore::ScrollView::setInitialBoundsSize): Added. Sets the bounds size but does
2539         not update anything.
2540         (WebCore::ScrollView::frameRectsChanged): Based on bounds, not frame size.
2541         (WebCore::ScrollView::scrollbarCornerPresent): Ditto.
2542         * platform/ScrollView.h:
2543         (WebCore::ScrollView::boundsSize): Added this getter.
2544         * platform/Widget.h:
2545         (WebCore::Widget::resize): Set the bounds size to the frame size.
2546         * platform/mac/ScrollbarThemeMac.mm:
2547         (WebCore::ScrollbarThemeMac::paint): Fixed an error in the indirect drawing code
2548         path where the buffer rect was resized to capture only the damaged part, but was
2549         still drawn in the original location.
2550
2551 2011-02-20  Alexey Proskuryakov  <ap@apple.com>
2552
2553         Reviewed by Eric Seidel.
2554
2555         Tighten up access permissions by using libxslt API
2556         https://bugs.webkit.org/show_bug.cgi?id=52688
2557         <rdar://problem/8909191> 
2558
2559         * xml/XSLTProcessorLibxslt.cpp: (WebCore::XSLTProcessor::transformToString): We are only
2560         interested in a string result, so let libxslt know about that.
2561
2562 2011-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2563
2564         Unreviewed, rolling out r79104.
2565         http://trac.webkit.org/changeset/79104
2566         https://bugs.webkit.org/show_bug.cgi?id=54835
2567
2568         Might have caused flaky canaries (Requested by tonyg-cr on
2569         #webkit).
2570
2571         * html/parser/HTMLDocumentParser.cpp:
2572         (WebCore::HTMLDocumentParser::canTakeNextToken):
2573         (WebCore::HTMLDocumentParser::pumpTokenizer):
2574         * html/parser/HTMLParserScheduler.cpp:
2575         (WebCore::isLayoutTimerActive):
2576         * html/parser/HTMLParserScheduler.h:
2577         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
2578         * page/FrameView.h:
2579
2580 2011-02-20  Dirk Schulze  <krit@webkit.org>
2581
2582         Reviewed by Nikolas Zimmermann.
2583
2584         SVG animation - analyze attribute type for animation
2585         https://bugs.webkit.org/show_bug.cgi?id=54542
2586
2587         Analyze animated attribute type to determine the kind of animation. Removed enum PropertyType and replace it
2588         with AnimatedAttributeType instead. More cleanup of the animation code.
2589         Added missing fillAttributeToPropertyTypeMap() for SVGGElement.
2590
2591         Use QualifiedName instead of AtomicStrings for attribute names. This makes it easier to handle animated attributes
2592         from a different namespace like xlink:href. The rest of the SVG code is using QualifiedNames as well.
2593
2594         No change of functionality on the animation code. The changes for the <g>-element affect animateTransform. Sadly
2595         animateTransform is not supported by our SVG animation test script at the moment. Can still be tested manually
2596         with the W3C test suite in trunk.
2597
2598         The change on SVGUseElement gets covered by animate-elem-39-t.svg
2599
2600         Test: svg/animations/animate-dynamic-update-attributeName.html
2601
2602         * svg/SVGAnimateElement.cpp:
2603         (WebCore::SVGAnimateElement::SVGAnimateElement):
2604         (WebCore::SVGAnimateElement::hasValidAttributeType):
2605         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2606         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2607         (WebCore::inheritsFromProperty):
2608         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2609         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2610         (WebCore::SVGAnimateElement::resetToBaseValue):
2611         (WebCore::SVGAnimateElement::applyResultsToTarget):
2612         (WebCore::SVGAnimateElement::calculateDistance):
2613         * svg/SVGAnimateElement.h:
2614         * svg/SVGAnimateMotionElement.cpp:
2615         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
2616         (WebCore::parsePoint):
2617         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
2618         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2619         (WebCore::SVGAnimateMotionElement::calculateDistance):
2620         * svg/SVGAnimateMotionElement.h:
2621         * svg/SVGAnimateTransformElement.cpp:
2622         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
2623         (WebCore::SVGAnimateTransformElement::determineAnimatedAttributeType):
2624         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
2625         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
2626         (WebCore::SVGAnimateTransformElement::calculateFromAndByValues):
2627         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
2628         (WebCore::SVGAnimateTransformElement::calculateDistance):
2629         * svg/SVGAnimateTransformElement.h:
2630         * svg/SVGAnimationElement.cpp:
2631         (WebCore::parseKeyTimes):
2632         (WebCore::parseKeySplines):
2633         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
2634         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
2635         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
2636         (WebCore::solveEpsilon):
2637         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
2638         (WebCore::SVGAnimationElement::currentValuesFromKeyPoints):
2639         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2640         (WebCore::SVGAnimationElement::startedActiveInterval):
2641         * svg/SVGAnimationElement.h:
2642         * svg/SVGFilterElement.cpp:
2643         (WebCore::SVGFilterElement::fillAttributeToPropertyTypeMap):
2644         * svg/SVGGElement.cpp:
2645         (WebCore::SVGGElement::attributeToPropertyTypeMap):
2646         (WebCore::SVGGElement::fillAttributeToPropertyTypeMap): Added to fill the animated attribute map for this element.
2647         * svg/SVGGElement.h:
2648         * svg/SVGUseElement.cpp:
2649         (WebCore::SVGUseElement::fillAttributeToPropertyTypeMap): Changed attribute type to AnimatedString for xlink:href.
2650         * svg/animation/SMILTimeContainer.cpp:
2651         (WebCore::SMILTimeContainer::baseValueFor):
2652         (WebCore::SMILTimeContainer::updateAnimations):
2653         * svg/animation/SMILTimeContainer.h:
2654         * svg/animation/SVGSMILElement.cpp:
2655         (WebCore::SVGSMILElement::SVGSMILElement):
2656         (WebCore::constructQualifiedName): Create a QualifiedName from a attribute name.
2657         (WebCore::SVGSMILElement::insertedIntoDocument): Update local varaible of attribute name.
2658         (WebCore::SVGSMILElement::removedFromDocument): Ditto.
2659         (WebCore::SVGSMILElement::attributeChanged): Ditto.
2660         * svg/animation/SVGSMILElement.h:
2661         (WebCore::SVGSMILElement::attributeName):
2662
2663 2011-02-20  David Kilzer  <ddkilzer@apple.com>
2664
2665         BUILD FIX: Add missing UNUSED_PARAM() when !ENABLE(FULLSCREEN_API)
2666
2667         Not reviewed.
2668
2669         * rendering/RenderLayerCompositor.cpp:
2670         (WebCore::RenderLayerCompositor::requiresCompositingForFullScreen):
2671
2672 2011-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2673
2674         Reviewed by Martin Robinson.
2675
2676         [GTK] Implement PlatformKeyboardEvent::getCurrentModifierState()
2677         https://bugs.webkit.org/show_bug.cgi?id=52880
2678
2679         * platform/gtk/KeyEventGtk.cpp:
2680         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2681
2682 2011-02-19  Andreas Kling  <kling@webkit.org>
2683
2684         Reviewed by Oliver Hunt.
2685
2686         DragController should use Color::serialized() when passing colors to CSSStyleDeclaration
2687         https://bugs.webkit.org/show_bug.cgi?id=54545
2688
2689         * page/DragController.cpp:
2690         (WebCore::DragController::concludeEditDrag):
2691
2692 2011-02-19  Sam Weinig  <sam@webkit.org>
2693
2694         Reviewed by Anders Carlsson.
2695
2696         Add phase in addition to momentumPhase to platform wheel events
2697         Part of <rdar://problem/8945362>
2698
2699         Rename existing phase to momentumPhase.
2700
2701         * platform/PlatformWheelEvent.h:
2702         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2703         (WebCore::PlatformWheelEvent::momentumPhase):
2704         * platform/mac/ScrollAnimatorMac.mm:
2705         (WebCore::ScrollAnimatorMac::handleWheelEvent):
2706         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2707         * platform/mac/WheelEventMac.mm:
2708         (WebCore::momentumPhaseForEvent):
2709         (WebCore::phaseForEvent):
2710         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2711
2712 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2713
2714         Qt build fix.
2715
2716         * bridge/runtime_method.h:
2717         (JSC::RuntimeMethod::createStructure):
2718
2719 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2720
2721         Qt build fix.
2722
2723         * bridge/qt/qt_instance.cpp:
2724         * bridge/qt/qt_pixmapruntime.cpp:
2725
2726 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2727
2728         Qt build fix.
2729
2730         * bridge/qt/qt_instance.cpp:
2731         (JSC::Bindings::QtInstance::getMethod):
2732         * bridge/qt/qt_pixmapruntime.cpp:
2733         (JSC::Bindings::QtPixmapInstance::getMethod):
2734
2735 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
2736
2737         Reviewed by Sam Weinig.
2738
2739         Bug 54786 - Devirtualize JSCell::classInfo()
2740
2741         Instead of making a virtual function call, add a pointer to the ClassInfo
2742         onto Structure.
2743
2744         This removes a virtual function call, and paves the way towards removing all
2745         the createStructure methods, and StructureFlags/AnonymousSlotCount properties
2746         (these should be able to move onto ClassInfo).
2747
2748         Calls to Structure::create must now pass a pointer to the ClassInfo for the
2749         structure. All objects now have a ClassInfo pointer, non-object cell types
2750         still do not.
2751
2752         Changes are most mechanical, involving three steps:
2753             * Remove virtual classInfo() methods.
2754             * Add &s_info parameter to calls to Structure::create.
2755             * Rename ClassInfo static members on classes from 'info' to 's_info',
2756               for consistency.
2757
2758         * WebCore.exp.in:
2759         * bindings/js/JSAudioConstructor.cpp:
2760         * bindings/js/JSAudioConstructor.h:
2761         * bindings/js/JSDOMBinding.cpp:
2762         * bindings/js/JSDOMBinding.h:
2763         * bindings/js/JSDOMGlobalObject.cpp:
2764         * bindings/js/JSDOMGlobalObject.h:
2765         * bindings/js/JSDOMWindowBase.cpp:
2766         * bindings/js/JSDOMWindowBase.h:
2767         * bindings/js/JSDOMWindowShell.cpp:
2768         * bindings/js/JSDOMWindowShell.h:
2769         * bindings/js/JSGeolocationCustom.cpp:
2770         * bindings/js/JSImageConstructor.cpp:
2771         * bindings/js/JSImageConstructor.h:
2772         * bindings/js/JSImageDataCustom.cpp:
2773         * bindings/js/JSOptionConstructor.cpp:
2774         * bindings/js/JSOptionConstructor.h:
2775         * bindings/js/JSWorkerContextBase.cpp:
2776         * bindings/js/JSWorkerContextBase.h:
2777         * bindings/js/SerializedScriptValue.cpp:
2778         * bindings/scripts/CodeGeneratorJS.pm:
2779         * bridge/c/CRuntimeObject.cpp:
2780         * bridge/c/CRuntimeObject.h:
2781         * bridge/c/c_instance.cpp:
2782         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
2783         * bridge/jni/jsc/JavaInstanceJSC.cpp:
2784         * bridge/jni/jsc/JavaRuntimeObject.cpp:
2785         * bridge/jni/jsc/JavaRuntimeObject.h:
2786         * bridge/jsc/BridgeJSC.cpp:
2787         * bridge/objc/ObjCRuntimeObject.h:
2788         * bridge/objc/ObjCRuntimeObject.mm:
2789         * bridge/objc/objc_instance.mm:
2790         * bridge/objc/objc_runtime.h:
2791         * bridge/objc/objc_runtime.mm:
2792         * bridge/runtime_array.cpp:
2793         * bridge/runtime_array.h:
2794         * bridge/runtime_method.cpp:
2795         * bridge/runtime_method.h:
2796         * bridge/runtime_object.cpp:
2797         * bridge/runtime_object.h:
2798
2799 2011-02-19  Zan Dobersek  <zandobersek@gmail.com>
2800
2801         Reviewed by Martin Robinson.
2802
2803         [cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails
2804         https://bugs.webkit.org/show_bug.cgi?id=54491
2805
2806         When width or height in float rectangle are in range (0, 0.5) or (-0.5, 0)
2807         and would round to 0, alter the behaviour to ensure that width or height are
2808         at least 1 pixel in size in these cases.
2809
2810         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2811         (WebCore::GraphicsContext::roundToDevicePixels):
2812
2813 2011-02-19  Dan Bernstein  <mitz@apple.com>
2814
2815         LLVM Compiler build fix.
2816
2817         * platform/graphics/ShadowBlur.cpp:
2818         (WebCore::ShadowBlur::blurLayerImage): Eliminated a file static that generated
2819         a global initializer since the compiler does not evaluate sqrtf at compile time.
2820
2821 2011-02-19  Brian Ryner  <bryner@chromium.org>
2822
2823         Reviewed by Adam Barth.
2824
2825         Replace the #include of DocumentLoader.h in Document.h with a
2826         forward declaration, and add a missing #include now that this
2827         transitive include is gone.
2828         https://bugs.webkit.org/show_bug.cgi?id=50489
2829
2830         No new tests required.
2831
2832         * bindings/ScriptControllerBase.cpp:
2833         * dom/Document.h:
2834
2835 2011-02-19 Patrick Gansterer <paroga@webkit.org>
2836
2837         Reviewed by Antonio Gomes.
2838
2839         [EFL] Remove WebCore::currentTime()
2840         https://bugs.webkit.org/show_bug.cgi?id=53886
2841
2842         There is no declaration for it and we use WTF::currentTime() everywhere.
2843
2844         * platform/efl/SystemTimeEfl.cpp:
2845
2846 2011-02-19 Patrick Gansterer <paroga@webkit.org>
2847
2848         Reviewed by Andreas Kling.
2849
2850         Move KeygenWinCE from wince into win directory
2851         https://bugs.webkit.org/show_bug.cgi?id=54804
2852
2853         Move this file into the win directory, since it can be used on all windows platforms.
2854
2855         * CMakeListsWinCE.txt:
2856         * platform/win/SSLKeyGeneratorWin.cpp: Renamed from platform/wince/KeygenWinCE.cpp.
2857
2858 2011-02-19  Patrick Gansterer  <paroga@webkit.org>
2859
2860         Reviewed by Andreas Kling.
2861
2862         Make FileChooserWin.cpp more portable and use it on WinCE
2863         https://bugs.webkit.org/show_bug.cgi?id=54803
2864
2865         * CMakeListsWinCE.txt:
2866         * platform/win/FileChooserWin.cpp:
2867         (WebCore::FileChooser::basenameForWidth):
2868         * platform/wince/FileChooserWinCE.cpp: Removed.
2869
2870 2011-02-19  James Simonsen  <simonjam@chromium.org>
2871
2872         Reviewed by Adam Barth.
2873
2874         Make ScriptElement match the HTML5 spec
2875         https://bugs.webkit.org/show_bug.cgi?id=54676
2876
2877         This implements the "prepare a script" section of the HTML5 spec in ScriptElement::prepareScript().
2878         http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script
2879
2880         There are a couple of things missing from the spec that would be new functionality. These will be added later.
2881         - Support for async=false
2882         - Empty src attribute should dispatch an error.
2883
2884         There are a couple of slight behavioral changes to match the spec.
2885         - An XHTML script that is loaded then copied will not fire load on the copy.
2886         - If onbeforeload moves the script to a different document, then it will not try to execute again because wasAlreadyStarted is true.
2887
2888         The parsers were updated to use the new API, but not rewritten to look like the spec. That will be done separately.
2889
2890         Test: All existing tests.
2891
2892         * dom/ScriptElement.cpp: Rewritten to match HTML5 spec.
2893         (WebCore::ScriptElement::ScriptElement):
2894         (WebCore::ScriptElement::insertedIntoDocument): Logic moved to prepareScript.
2895         (WebCore::ScriptElement::childrenChanged): Logic moved to prepareScript.
2896         (WebCore::ScriptElement::handleSourceAttribute): Logic moved to prepareScript.
2897         (WebCore::isLegacySupportedJavaScriptLanguage): Added to support old script types in layout tests.
2898         (WebCore::ScriptElement::isScriptTypeSupported): Derived from old shouldExecuteAsJavaScript().
2899         (WebCore::ScriptElement::prepareScript): START HERE. Main change. Should read exactly like HTML5's "prepare a script." Legacy type support needed for layout tests using XML parser.
2900         (WebCore::ScriptElement::requestScript): Most logic moved to prepareScript. Check security settings here.
2901         (WebCore::ScriptElement::executeScript): Combined evaluateScript() and executeScript() from old code. Logic moved to prepareScript.
2902         (WebCore::ScriptElement::stopLoadRequest): Ignore parser executed scripts.
2903         (WebCore::ScriptElement::execute): Renamed executeScript.
2904         (WebCore::ScriptElement::notifyFinished): We should only listen for non-parser executed scripts.
2905         (WebCore::ScriptElement::ignoresLoadRequest): New variable names.
2906         (WebCore::ScriptElement::childrenAreCommentsOrEmptyText): Added for HTML5 compliance.
2907         (WebCore::ScriptElement::scriptCharset): Use HTML5 variables.
2908         * dom/ScriptElement.h:
2909         (WebCore::ScriptElement::willBeParserExecuted): Added.
2910         (WebCore::ScriptElement::readyToBeParserExecuted): Added.
2911         (WebCore::ScriptElement::willExecuteWhenDocumentFinishedParsing): Added.
2912         (WebCore::ScriptElement::cachedScript): prepareScript() is the only place that should load scripts. This accessor lets the parsers listen for when loads finish.
2913         (WebCore::ScriptElement::isParserInserted): Added.
2914         * dom/XMLDocumentParserLibxml2.cpp:
2915         (WebCore::XMLDocumentParser::endElementNs): Should behave the same. Offloads much of its work to prepareScript().
2916         * dom/XMLDocumentParserQt.cpp:
2917         (WebCore::XMLDocumentParser::parseEndElement): Identical to libxml2 changes.
2918         * html/HTMLScriptElement.cpp:
2919         (WebCore::HTMLScriptElement::insertedIntoDocument): No longer needs url.
2920         (WebCore::HTMLScriptElement::hasSourceAttribute): Added.
2921         * html/HTMLScriptElement.h:
2922         * html/parser/HTMLScriptRunner.cpp:
2923         (WebCore::HTMLScriptRunner::requestPendingScript): Requesting scripts offloaded to ScriptElement.
2924         (WebCore::HTMLScriptRunner::runScript): Should behave the same. Offloads much of its work to prepareScript().
2925         * svg/SVGScriptElement.cpp:
2926         (WebCore::SVGScriptElement::svgAttributeChanged): New ScriptElement function names.
2927         (WebCore::SVGScriptElement::insertedIntoDocument): No longer needs url.
2928         (WebCore::SVGScriptElement::finishParsingChildren): ScriptElement::finishParsingChildren is gone.
2929         (WebCore::SVGScriptElement::hasSourceAttribute): Added.
2930         (WebCore::SVGScriptElement::dispatchLoadEvent): New ScriptElement function names.
2931         * svg/SVGScriptElement.h:
2932
2933 2011-02-19  Marc-Antoine Ruel  <maruel@chromium.org>
2934
2935         Reviewed by James Robinson.
2936
2937         Split webcore_rendering off webcore_remaining to reduce its size for WPO builds
2938         https://bugs.webkit.org/show_bug.cgi?id=54789
2939
2940         * WebCore.gyp/WebCore.gyp:
2941
2942 2011-02-19  Bill Budge  <bbudge@chromium.org>
2943
2944         Reviewed by David Levin.
2945
2946         ThreadableLoaderClient needs willSendRequest method
2947         https://bugs.webkit.org/show_bug.cgi?id=54688
2948
2949         No new tests. Exposes no new functionality
2950
2951         * WebCore.gypi:
2952         * loader/DocumentThreadableLoader.cpp:
2953         (WebCore::DocumentThreadableLoader::willSendRequest):
2954         (WebCore::DocumentThreadableLoader::didReceiveData):
2955         (WebCore::DocumentThreadableLoader::didReceiveCachedMetadata):
2956         * loader/DocumentThreadableLoaderClient.h: Added.
2957         (WebCore::DocumentThreadableLoaderClient::isDocumentThreadableLoaderClient):
2958         (WebCore::DocumentThreadableLoaderClient::willSendRequest):
2959         * loader/ThreadableLoaderClient.h:
2960         (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient):
2961
2962 2011-02-19  Charlie Reis  <creis@chromium.org>
2963
2964         Reviewed by Mihai Parparita.
2965
2966         Ensure loading has stopped in HistoryController::goToItem
2967         https://bugs.webkit.org/show_bug.cgi?id=54517
2968
2969         Avoid stopping all loaders in goToItem for same document navigations
2970         or pseudo-back-forward URLs.  Make HistoryController::goToItem private
2971         to force callers to go through Page::goToItem.  Also add a callback to
2972         FrameLoaderClient to let clients decide whether to stop loading first.
2973
2974         Test: http/tests/navigation/forward-to-fragment-fires-onload.html
2975
2976         * loader/EmptyClients.h:
2977         * loader/FrameLoader.h:
2978         * loader/FrameLoaderClient.h:
2979         * loader/HistoryController.cpp:
2980         * loader/HistoryController.h:
2981         * page/Page.cpp:
2982
2983 2011-02-19  Adam Barth  <abarth@webkit.org>
2984
2985         Reviewed by Daniel Bates.
2986
2987         Fix xssAuditor/iframe-injection.html
2988         https://bugs.webkit.org/show_bug.cgi?id=54591
2989
2990         We should block the iframe src attribute.  Although this technically
2991         can't be used to run script, it's a pretty easy vector for stealing
2992         passwords.
2993
2994         * html/parser/XSSFilter.cpp:
2995         (WebCore::XSSFilter::filterTokenInitial):
2996         (WebCore::XSSFilter::filterIframeToken):
2997         * html/parser/XSSFilter.h:
2998
2999 2011-02-18  Tony Gentilcore  <tonyg@chromium.org>
3000
3001         Reviewed by Eric Seidel.
3002
3003         Let the parser yield for layout before running scripts
3004         https://bugs.webkit.org/show_bug.cgi?id=54355
3005
3006         Prior to this patch, the parser would yield to perform a layout/paint before running a
3007         script only if the script or a stylesheet blocking the script is not loaded yet. Since we
3008         don't preload scan into the body while parsing the head, typically we'll block on a script
3009         early in the body that causes us to yield to do the first paint within a reasonable time.
3010
3011         However, I'm planning to change the PreloadScanner to scan into the body from the head.
3012         That significantly improves overall load time, but would hurt first paint time because
3013         fewer scripts would be blocked during parsing and thus wouldn't yield.
3014
3015         This change causes us to yield before running scripts if we haven't painted yet (regardless
3016         of whether or not the script is loaded). In addition to allowing the above mentioned
3017         PreloadScanner change to be implemented without regressing first paint time, this also
3018         improves first paint time by itself.
3019
3020         I tested Alexa's top 45 websites using Web Page Replay to control the content and simulate
3021         bandwidth. This patch improved average first paint time by 1% over an unlimited connection,
3022         6% over a 1Mbps connection and 11% over a 5Mbps connection. There was no statistically
3023         signifcant change in page load time.
3024
3025         Within the pages tested, 33 had no statistically significant change in time to first paint,
3026         12 improved, and none regressed. Of the improved, some of the standouts from the 1Mbps set
3027         are: 20% on youtube, 37% on wiki, 27% on ebay, 13% on cnn, 16% on espn, 74% on sohu.
3028
3029         * html/parser/HTMLDocumentParser.cpp:
3030         (WebCore::HTMLDocumentParser::canTakeNextToken): This is the new yield point.
3031         (WebCore::HTMLDocumentParser::pumpTokenizer): Remove ASSERT that we are not paused. isPaused
3032         means that we are waiting for a script. Bug 54574 changed pumpTokenizer() so that it does
3033         the right thing whether we are just before a token or waiting for a script. Now that we may
3034         yield before a token or before a script, this may be called while paused.
3035         * html/parser/HTMLParserScheduler.cpp:
3036         (WebCore::isLayoutTimerActive): Added a FIXME because r52919 changed minimumLayoutDelay()
3037         to return m_extraLayoutDelay instead of 0 as a minimum. So checking !minimumLayoutDelay()
3038         no longer works. The fix is to change it to check minimumLayoutDelay() ==
3039         m_extraLayoutDelay. But this is all the more reason to move this method onto Document. I'll
3040         do this in a follow up.
3041         (WebCore::HTMLParserScheduler::checkForYieldBeforeScript): Added.
3042         * page/FrameView.h:
3043         (WebCore::FrameView::hasEverPainted): Added.
3044
3045 2011-02-18  Dawit Alemayehu  <adawit@kde.org>
3046
3047         Reviewed by Andreas Kling.
3048
3049         [Qt]  Button Element is rendered w/ text off-center.
3050         https://bugs.webkit.org/show_bug.cgi?id=53373
3051
3052         Test: LayoutTests/fast/forms/button-white-space.html 
3053
3054         * platform/qt/RenderThemeQt.cpp:
3055         (WebCore::RenderThemeQt::adjustButtonStyle):
3056
3057 2011-02-18  Jonathan Backer  <backer@chromium.org>
3058
3059         Reviewed by Eric Seidel.
3060
3061         [chromium] Fix leak of texture IDs in compositor.
3062         https://bugs.webkit.org/show_bug.cgi?id=54750
3063
3064         No new tests. It is extremely unlikely that this leak would have
3065         any user visible impact because only a few bytes of space are wasted
3066         (we're leaking texture IDs, not actual textures) and the space of
3067         texture IDs is large (32 bits).
3068
3069        * platform/graphics/chromium/TextureManager.cpp:
3070         (WebCore::TextureManager::requestTexture):
3071
3072 2011-02-18  Yi Shen  <yi.4.shen@nokia.com>
3073
3074         Reviewed by Tor Arne Vestbø.
3075
3076         Always display the media controls when requiresFullscreenForVideoPlayback() is true
3077         https://bugs.webkit.org/show_bug.cgi?id=54308
3078
3079         For video element, it should have controls when 
3080         Chrome::requiresFullscreenForVideoPlayback() is true.
3081
3082         * html/HTMLMediaElement.cpp:
3083         (WebCore::HTMLMediaElement::controls):
3084
3085 2011-02-18  Adrienne Walker  <enne@google.com>
3086
3087         Reviewed by Kenneth Russell.
3088
3089         [chromium] Use nearest-neighbor filtering for root layer.
3090         https://bugs.webkit.org/show_bug.cgi?id=54409
3091         https://bugs.webkit.org/show_bug.cgi?id=54509
3092
3093         This setting creates more consistent images for LayoutTests and
3094         prevents small floating point errors in texture coordinates from
3095         creating off-by-one pixel color differences.
3096
3097         * platform/graphics/chromium/LayerTilerChromium.cpp:
3098         (WebCore::LayerTilerChromium::update):
3099
3100 2011-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3101
3102         Reviewed by Kent Tamura.
3103
3104         [EFL] Fix coding style errors in RenderThemeEfl.h
3105         https://bugs.webkit.org/show_bug.cgi?id=54693
3106
3107         Fix style errors in RenderThemeEfl.h
3108
3109         * platform/efl/RenderThemeEfl.h:
3110
3111 2011-02-18  Ademar de Souza Reis Jr  <ademar.reis@openbossa.org>
3112
3113         Reviewed by Andreas Kling.
3114
3115         [Qt] The localized vendor name for Qt SIS packages should be "Nokia"
3116         https://bugs.webkit.org/show_bug.cgi?id=54742
3117
3118         This change was applied in the Qt repository (qt/src/3rdparty/webkit),
3119         so we should do the same here in QtWebKit.
3120
3121         Patch by Eckhart Koppen <eckhart.koppen@nokia.com>
3122         a8a84f1667966acfa093c4be0b7d4b0900ddd3d9:
3123
3124         The previously used name "Nokia, Qt" was not usable for Nokia
3125         Content Signing, which only allows "Nokia" as the visible vendor
3126         name. The unique vendor ID remains as "Nokia, Qt"
3127
3128         * WebCore.pro:
3129
3130 2011-02-18  Alexis Menard  <alexis.menard@openbossa.org>
3131
3132         Reviewed by Andreas Kling.
3133
3134         [Qt] REGRESSION(r67516) : on www.gmail.com a strange rendering issue appears on the
3135         menu bar due to flash.
3136         https://bugs.webkit.org/show_bug.cgi?id=54741
3137
3138         Only show plugins with a valid size. We then don't involve X11 if there is
3139         nothing to see anyway.
3140
3141         * plugins/qt/PluginViewQt.cpp:
3142         (WebCore::PluginView::updatePluginWidget):
3143         (WebCore::PluginView::platformStart):
3144
3145 2011-02-18  Ryuan Choi  <ryuan.choi@samsung.com>
3146
3147         Reviewed by Kent Tamura.
3148
3149         [EFL] Remove GDK dependency.
3150         https://bugs.webkit.org/show_bug.cgi?id=53978
3151
3152         Remove GLIB_SUPPORT macro in GDK related code.
3153         Regardless of GLIB_SUPPORT, getDefaultFontOptions() will works same way.
3154
3155         * CMakeListsEfl.txt:
3156         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3157         (WebCore::getDefaultFontOptions):
3158
3159 2011-02-18  Noel Gordon  <noel.gordon@gmail.com>
3160
3161         Reviewed by James Robinson.
3162
3163         [Chromium] Add elliptical gradient support to GradientSkia
3164         https://bugs.webkit.org/show_bug.cgi?id=51841
3165
3166         Covered by existing tests, these need new rebaselines once this patch
3167         lands for chrome linux, win32
3168
3169         fast/gradients/css3-color-stop-units.html
3170         fast/gradients/css3-color-stops.html
3171         fast/gradients/css3-linear-angle-gradients.html
3172         fast/gradients/css3-radial-gradients.html
3173         fast/gradients/css3-radial-gradients2.html
3174         fast/gradients/css3-radial-gradients3.html
3175         fast/gradients/css3-repeating-radial-gradients.html
3176
3177         * platform/graphics/skia/GradientSkia.cpp:
3178         (WebCore::Gradient::platformGradient):
3179
3180 2011-02-18  James Robinson  <jamesr@chromium.org>
3181
3182         Fix typo in boundary test in ASSERT() - test is for an inclusive range, not exclusive.
3183
3184         * platform/graphics/chromium/ContentLayerChromium.cpp:
3185         (WebCore::ContentLayerChromium::updateTextureIfNeeded):
3186
3187 2011-02-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3188
3189         Reviewed by Kenneth Rohde Christiansen.
3190
3191         Tiled backing store area is too big.
3192         Error in area calculcation causes size of backing store
3193         up to 6 times bigger than viewport with default multipliers.
3194         https://bugs.webkit.org/show_bug.cgi?id=54587
3195
3196         * platform/graphics/TiledBackingStore.cpp:
3197         (WebCore::TiledBackingStore::createTiles):
3198
3199 2011-02-18  Beth Dakin  <bdakin@apple.com>
3200
3201         Reviewed by Sam Weinig.
3202
3203         Fix for <rdar://problem/9018729> Horizontal scroller doesn't 
3204         appear when loading a page with a Horizontal scrollbar from 
3205         the back/forward cache.
3206
3207         This patch adds a new  bool member variable to FrameView to 
3208         keep track of whether we are loading a page from the back/
3209         forward cache. If we are, don't suppress scrollbars on 
3210         first layout.
3211         * history/CachedFrame.cpp:
3212         (WebCore::CachedFrameBase::restore):
3213         * page/FrameView.cpp:
3214         (WebCore::FrameView::FrameView):
3215         (WebCore::FrameView::reset):
3216         (WebCore::FrameView::layout):
3217         * page/FrameView.h:
3218         (WebCore::FrameView::setIsRestoringFromBackForward):
3219         (WebCore::FrameView::isRestoringFromBackForward):
3220
3221 2011-02-18  Patrick Gansterer  <paroga@webkit.org>
3222
3223         Unreviewed WinCE build fix for r78846.
3224
3225         * platform/graphics/wince/FontWinCE.cpp:
3226         (WebCore::TextRunComponent::TextRunComponent):
3227         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3228         (WebCore::GraphicsContext::drawLineForText):
3229         (WebCore::GraphicsContext::drawLineForTextChecking):
3230         (WebCore::GraphicsContext::drawText):
3231         * platform/wince/FileChooserWinCE.cpp:
3232         (WebCore::FileChooser::basenameForWidth):
3233
3234 2011-02-18  Emil A Eklund  <eae@chromium.org>
3235
3236         Reviewed by Darin Adler.
3237
3238         Crash in EventHandler::sendContextMenuEventForKey
3239         https://bugs.webkit.org/show_bug.cgi?id=54495
3240
3241         Test: fast/events/menu-keydown-on-hidden-element.html
3242
3243         * page/EventHandler.cpp:
3244         (WebCore::EventHandler::sendContextMenuEventForKey): Add null check.
3245
3246 2011-02-15  Adrienne Walker  <enne@google.com>
3247
3248         Reviewed by James Robinson.
3249
3250         [chromium] Clean up shader code from LayerChromium classes
3251         https://bugs.webkit.org/show_bug.cgi?id=54484
3252
3253         This is a refactoring and there should be no change in functionality.
3254         All shader code is pulled out into classes in ShaderChromium.
3255         The SharedValues classes are now turned into ProgramBinding, one per
3256         shader program.  These contain shader classes that know about what
3257         variables they can bind.
3258
3259         * WebCore.gypi:
3260         * platform/graphics/chromium/CanvasLayerChromium.cpp:
3261         (WebCore::CanvasLayerChromium::draw):
3262         * platform/graphics/chromium/CanvasLayerChromium.h:
3263         * platform/graphics/chromium/ContentLayerChromium.cpp:
3264         (WebCore::ContentLayerChromium::draw):
3265         * platform/graphics/chromium/ContentLayerChromium.h:
3266         * platform/graphics/chromium/GeometryBinding.cpp: Added.
3267         (WebCore::GeometryBinding::GeometryBinding):
3268         (WebCore::GeometryBinding::~GeometryBinding):
3269         (WebCore::GeometryBinding::prepareForDraw):
3270         * platform/graphics/chromium/GeometryBinding.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
3271         (WebCore::GeometryBinding::initialized):
3272         (WebCore::GeometryBinding::context):
3273         (WebCore::GeometryBinding::quadVerticesVbo):
3274         (WebCore::GeometryBinding::quadElementsVbo):
3275         (WebCore::GeometryBinding::positionAttribLocation):
3276         (WebCore::GeometryBinding::texCoordAttribLocation):
3277         * platform/graphics/chromium/LayerChromium.cpp:
3278         (WebCore::LayerChromium::drawDebugBorder):
3279         * platform/graphics/chromium/LayerChromium.h:
3280         * platform/graphics/chromium/LayerRendererChromium.cpp:
3281         (WebCore::LayerRendererChromium::drawLayers):
3282         (WebCore::LayerRendererChromium::initializeSharedObjects):
3283         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3284         * platform/graphics/chromium/LayerRendererChromium.h:
3285         (WebCore::LayerRendererChromium::sharedGeometry):
3286         (WebCore::LayerRendererChromium::borderProgram):
3287         (WebCore::LayerRendererChromium::contentLayerProgram):
3288         (WebCore::LayerRendererChromium::canvasLayerProgram):
3289         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
3290         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
3291         (WebCore::LayerRendererChromium::pluginLayerProgram):
3292         (WebCore::LayerRendererChromium::renderSurfaceProgram):
3293         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
3294         (WebCore::LayerRendererChromium::tilerProgram):
3295         * platform/graphics/chromium/LayerTilerChromium.cpp:
3296         (WebCore::LayerTilerChromium::draw):
3297         (WebCore::LayerTilerChromium::drawTexturedQuad):
3298         * platform/graphics/chromium/LayerTilerChromium.h:
3299         * platform/graphics/chromium/PluginLayerChromium.cpp:
3300         (WebCore::PluginLayerChromium::draw):
3301         * platform/graphics/chromium/PluginLayerChromium.h:
3302         * platform/graphics/chromium/ProgramBinding.cpp: Added.
3303         (WebCore::ProgramBindingBase::ProgramBindingBase):
3304         (WebCore::ProgramBindingBase::~ProgramBindingBase):
3305         (WebCore::ProgramBindingBase::init):
3306         (WebCore::ProgramBindingBase::loadShader):
3307         (WebCore::ProgramBindingBase::createShaderProgram):
3308         * platform/graphics/chromium/ProgramBinding.h: Added.
3309         (WebCore::ProgramBindingBase::program):
3310         (WebCore::ProgramBindingBase::initialized):
3311         (WebCore::ProgramBinding::ProgramBinding):
3312         (WebCore::ProgramBinding::vertexShader):
3313         (WebCore::ProgramBinding::fragmentShader):
3314         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3315         (WebCore::RenderSurfaceChromium::drawSurface):
3316         * platform/graphics/chromium/RenderSurfaceChromium.h:
3317         * platform/graphics/chromium/ShaderChromium.cpp: Added.
3318         (WebCore::VertexShaderPosTex::VertexShaderPosTex):
3319         (WebCore::VertexShaderPosTex::init):
3320         (WebCore::VertexShaderPosTex::getShaderString):
3321         (WebCore::VertexShaderPosTexYUVStretch::VertexShaderPosTexYUVStretch):
3322         (WebCore::VertexShaderPosTexYUVStretch::init):
3323         (WebCore::VertexShaderPosTexYUVStretch::getShaderString):
3324         (WebCore::VertexShaderPos::VertexShaderPos):
3325         (WebCore::VertexShaderPos::init):
3326         (WebCore::VertexShaderPos::getShaderString):
3327         (WebCore::VertexShaderPosTexTransform::VertexShaderPosTexTransform):
3328         (WebCore::VertexShaderPosTexTransform::init):
3329         (WebCore::VertexShaderPosTexTransform::getShaderString):
3330         (WebCore::FragmentTexAlphaBinding::FragmentTexAlphaBinding):
3331         (WebCore::FragmentTexAlphaBinding::init):
3332         (WebCore::FragmentShaderRGBATexFlipAlpha::getShaderString):
3333         (WebCore::FragmentShaderRGBATexAlpha::getShaderString):
3334         (WebCore::FragmentShaderBGRATexAlpha::getShaderString):
3335         (WebCore::FragmentShaderRGBATexAlphaMask::FragmentShaderRGBATexAlphaMask):
3336         (WebCore::FragmentShaderRGBATexAlphaMask::init):
3337         (WebCore::FragmentShaderRGBATexAlphaMask::getShaderString):
3338         (WebCore::FragmentShaderYUVVideo::FragmentShaderYUVVideo):
3339         (WebCore::FragmentShaderYUVVideo::init):
3340         (WebCore::FragmentShaderYUVVideo::getShaderString):
3341         (WebCore::FragmentShaderColor::FragmentShaderColor):
3342         (WebCore::FragmentShaderColor::init):
3343         (WebCore::FragmentShaderColor::getShaderString):
3344         * platform/graphics/chromium/ShaderChromium.h: Added.
3345         (WebCore::VertexShaderPosTex::matrixLocation):
3346         (WebCore::VertexShaderPosTexYUVStretch::matrixLocation):
3347         (WebCore::VertexShaderPosTexYUVStretch::yWidthScaleFactorLocation):
3348         (WebCore::VertexShaderPosTexYUVStretch::uvWidthScaleFactorLocation):
3349         (WebCore::VertexShaderPos::matrixLocation):
3350         (WebCore::VertexShaderPosTexTransform::matrixLocation):
3351         (WebCore::VertexShaderPosTexTransform::texTransformLocation):
3352         (WebCore::FragmentTexAlphaBinding::alphaLocation):
3353         (WebCore::FragmentTexAlphaBinding::samplerLocation):
3354         (WebCore::FragmentShaderRGBATexAlphaMask::alphaLocation):
3355         (WebCore::FragmentShaderRGBATexAlphaMask::samplerLocation):
3356         (WebCore::FragmentShaderRGBATexAlphaMask::maskSamplerLocation):
3357         (WebCore::FragmentShaderYUVVideo::yTextureLocation):
3358         (WebCore::FragmentShaderYUVVideo::uTextureLocation):
3359         (WebCore::FragmentShaderYUVVideo::vTextureLocation):
3360         (WebCore::FragmentShaderYUVVideo::alphaLocation):
3361         (WebCore::FragmentShaderYUVVideo::ccMatrixLocation):
3362         (WebCore::FragmentShaderYUVVideo::signAdjLocation):
3363         (WebCore::FragmentShaderColor::colorLocation):
3364         * platform/graphics/chromium/VideoLayerChromium.cpp:
3365         (WebCore::VideoLayerChromium::draw):
3366         (WebCore::VideoLayerChromium::drawYUV):
3367         (WebCore::VideoLayerChromium::drawRGBA):
3368         * platform/graphics/chromium/VideoLayerChromium.h:
3369
3370 2011-02-18  James Robinson  <jamesr@chromium.org>
3371
3372         Reviewed by Kenneth Russell.
3373
3374         [chromium] Update texture for ContentLayerChromiums in draw() call instead of updateContents..() call
3375         https://bugs.webkit.org/show_bug.cgi?id=54315
3376
3377         This defers all operations on the compositor's GL context until the
3378         draw() call which is a prerequisite for moving the draw() off-thread.
3379         Also cleans up the update cycle a bit - there were some unused local
3380         variables and whatnot.
3381
3382         One consequence of this change is that the upload buffer is retained
3383         across updates now instead of allocated by each paint.  This is
3384         necessary so that the full layer contents can be uploaded if the
3385         texture manager evicts the layer's backing texture.  This costs more
3386         persistent memory but avoids lots of allocator churn on updates.
3387         Another nonobvious detail is that I have to update the texture for
3388         ContentLayerChromiums in bindContentsTexture() because mask layers
3389         never draw(), they are instead bound to the secondary texture unit.
3390
3391         * platform/graphics/chromium/ContentLayerChromium.cpp:
3392         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
3393         (WebCore::ContentLayerChromium::updateContentsIfDirty):
3394         (WebCore::ContentLayerChromium::resizeUploadBufferForImage):
3395         (WebCore::ContentLayerChromium::resizeUploadBuffer):
3396         (WebCore::SkBitmapConditionalAutoLockerPixels::SkBitmapConditionalAutoLockerPixels):
3397         (WebCore::SkBitmapConditionalAutoLockerPixels::~SkBitmapConditionalAutoLockerPixels):
3398         (WebCore::SkBitmapConditionalAutoLockerPixels::lockPixels):
3399         (WebCore::ContentLayerChromium::updateTextureIfNeeded):
3400         (WebCore::ContentLayerChromium::draw):
3401         (WebCore::ContentLayerChromium::unreserveContentsTexture):
3402         (WebCore::ContentLayerChromium::bindContentsTexture):
3403         * platform/graphics/chromium/ContentLayerChromium.h:
3404         * platform/graphics/chromium/ImageLayerChromium.cpp:
3405         (WebCore::ImageLayerChromium::updateContentsIfDirty):
3406         * platform/graphics/chromium/LayerChromium.cpp:
3407         (WebCore::LayerChromium::setBounds):
3408         * platform/graphics/chromium/LayerChromium.h:
3409
3410 2011-02-18  Kenneth Russell  <kbr@google.com>
3411
3412         Unreviewed, Chromium build fix on certain Linux platforms.
3413
3414         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp:
3415
3416 2011-02-18  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
3417
3418         Reviewed by Kenneth Rohde Christiansen.
3419
3420         [Qt] Implement client based geolocation for qtport
3421         https://bugs.webkit.org/show_bug.cgi?id=42629
3422
3423         Implements client based geolocation for qtwebkit. Removed old code related to non-client based geolocation
3424
3425         No tests as yet. This will be raised as different bug as new mock client implementation need to be done.
3426
3427         * WebCore.pro:
3428         * features.pri:
3429         * platform/qt/GeolocationServiceQt.cpp: Removed.
3430         * platform/qt/GeolocationServiceQt.h: Removed.
3431
3432 2011-02-18  Yael Aharon  <yael.aharon@nokia.com>
3433
3434         Reviewed by Dave Hyatt.
3435
3436         Add support for dir=auto
3437         https://bugs.webkit.org/show_bug.cgi?id=50916
3438
3439         When an element has dir attribute with value "auto", call defaultWritingMode
3440         to find its directionality.
3441         Added a flag SelfOrAncestorHasDirAutoFlag, and added hooks in the DOM to set
3442         and check this flag. This flag is set on every node between an element with
3443         dir=auto attribute and its first text node. Changes in the DOM between those
3444         elements will trigger re-evaluating the directionality, but changes not
3445         between those element do not need to be concerned.
3446         The DOM hooks were added to childrenChanged, and to parseMappedAttribute.
3447         The directionality is evaluated when children are added, and cleared when they are
3448         removed. Directionality flag is also cleared on a child that is no longer determining
3449         the directionality due to a sibling being added before that child.
3450
3451         Added 2 static CSSMutableStyleDeclarations to be used for elements with dir=auto.
3452         We cannot used the mapped declaration, because it can take only one value.
3453
3454         Tests: fast/dom/HTMLElement/attr-dir-auto-change-before-text-node.html
3455                fast/dom/HTMLElement/attr-dir-auto-change-child-node.html
3456                fast/dom/HTMLElement/attr-dir-auto-change-text.html
3457                fast/dom/HTMLElement/attr-dir-auto-children.html
3458                fast/dom/HTMLElement/attr-dir-auto-remove-add-children.html
3459                fast/dom/HTMLElement/attr-dir-auto.html
3460                fast/dom/HTMLElement/attr-dir-value-change.html
3461
3462         * css/CSSStyleSelector.cpp:
3463         (WebCore::leftToRightDeclaration):
3464         (WebCore::rightToLeftDeclaration):
3465         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3466         (WebCore::CSSStyleSelector::styleForElement):
3467         * dom/Node.h:
3468         (WebCore::Node::selfOrAncestorHasDirAutoAttribute):
3469         (WebCore::Node::setSelfOrAncestorHasDirAutoAttribute):
3470         * html/HTMLElement.cpp:
3471         (WebCore::HTMLElement::mapToEntry):
3472         (WebCore::HTMLElement::parseMappedAttribute):
3473         (WebCore::setHasDirAutoFlagRecursively):
3474         (WebCore::HTMLElement::childrenChanged):