2011-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r82295 and r82300.
4         http://trac.webkit.org/changeset/82295
5         http://trac.webkit.org/changeset/82300
6         https://bugs.webkit.org/show_bug.cgi?id=57380
7
8         This patch breaks compile on Chromium (Requested by
9         abarth|gardener on #webkit).
10
11         * accessibility/AccessibilityObject.h:
12         * accessibility/AccessibilityRenderObject.cpp:
13         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
14         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
15         (atkRole):
16         (webkit_accessible_get_role):
17         * accessibility/mac/AccessibilityObjectWrapper.mm:
18
19 2011-03-29  Anders Carlsson  <andersca@apple.com>
20
21         Fix clang build.
22
23         * platform/text/BidiResolver.h:
24         (WebCore::::createBidiRunsForLine):
25
26 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
27
28         Reviewed by Adam Roben.
29
30         Use per-configuration vsprops in WebCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
31         https://bugs.webkit.org/show_bug.cgi?id=57378
32
33         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
34         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
35         the IDE. To avoid this, add a separate vsprops file for each project configuration that
36         contains the required inherited property sheets.
37
38         * WebCore.vcproj/QTMovieWin.vcproj:
39         * WebCore.vcproj/QTMovieWinDebug.vsprops: Added.
40         * WebCore.vcproj/QTMovieWinDebugAll.vsprops: Added.
41         * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops: Added.
42         * WebCore.vcproj/QTMovieWinRelease.vsprops: Added.
43         * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops: Added.
44         * WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops: Added.
45         * WebCore.vcproj/WebCore.vcproj:
46         * WebCore.vcproj/WebCoreDebug.vsprops: Added.
47         * WebCore.vcproj/WebCoreDebugAll.vsprops: Added.
48         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Added.
49         * WebCore.vcproj/WebCoreRelease.vsprops: Added.
50         * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops: Added.
51         * WebCore.vcproj/WebCoreReleaseLTCG.vsprops: Added.
52
53 2011-03-29  David Hyatt  <hyatt@apple.com>
54
55         Reviewed by Simon Fraser.
56
57         <rdar://problem/9194927> REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly
58         
59         Back out the optimization that stopped when it hit the first float. This was an incorrect optimization
60         and can't be done without more work.
61
62         Added fast/block/float/float-forced-below-other-floats.html
63
64         * rendering/RenderBlock.cpp:
65         (WebCore::RenderBlock::logicalLeftOffsetForLine):
66         (WebCore::RenderBlock::logicalRightOffsetForLine):
67
68 2011-03-29  Eric Seidel  <eric@webkit.org>
69
70         Reviewed by Ryosuke Niwa.
71
72         Start to clean up BidiResolver::createBidiRunsForLine so that mere mortals can understand it
73         https://bugs.webkit.org/show_bug.cgi?id=57338
74
75         I'm attempting to break createBidiRunsForLine into understandable pieces
76         so that we can tell what it's actually doing.  Our implementation of the
77         unicode bidi algorithm is slightly different from the spec in that we
78         run it per-line (instead of over the entire paragraph at once).  This is
79         great for performance (our implementation is resumable), but it makes
80         things a bit tricky to understand.  Splitting createBidiRunsForLine into
81         pieces should help make our UBA implementation more readable.
82
83         * platform/text/BidiResolver.h:
84         (WebCore::::updateStatusLastFromCurrentDirection):
85         (WebCore::::createBidiRunsForLine):
86
87 2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
88
89         Reviewed by Martin Robinson.
90
91         [Gtk] Consistent crash from Google/ARIA combobox click
92         https://bugs.webkit.org/show_bug.cgi?id=55883
93
94         Do not call to firstChild() to avoid entering into infinite loops.
95
96         This would happen when current item is a WebCore Group and some of
97         its children have either role 'option' or 'menuitem'. Other than
98         that the logic behind that call to firstChild() seems to be no
99         longer needed so it's safe to remove it.
100
101         Test: platform/gtk/accessibility/aria-options-and-menuitems-crash.html
102
103         * accessibility/gtk/AccessibilityObjectAtk.cpp:
104         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
105         Remove call to firsChild, which was leading to crashes sometimes.
106
107 2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
108
109         Reviewed by Chris Fleizach.
110
111         AX: GTK: ARIA role is not respected on <p> <label> <div> and <form>
112         https://bugs.webkit.org/show_bug.cgi?id=47636
113
114         Define new roles in WebCore and map them to ATK accordingly.
115
116         Test: platform/gtk/accessibility/aria-roles-unignored.html
117
118         * accessibility/AccessibilityObject.h: Added new roles to
119         represent paragraphs, labels, forms and div sections.
120         * accessibility/AccessibilityRenderObject.cpp:
121         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
122         Return ParagraphRole, LabelRole, FormRole and DivRole when needed.
123         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
124         (atkRole): Map new WebCore roles to ATK Roles.
125         (webkit_accessible_get_role): Remove code to define roles for
126         paragraphs, labels, forms and divs based on node's tag name.
127
128         Update mappings for the Mac platform.
129
130         * accessibility/mac/AccessibilityObjectWrapper.mm:
131         (createAccessibilityRoleMap): Add explicit mappings from the new
132         roles introduced to NSAccessibilityGroupRole.
133
134 2011-03-29  Philippe Normand  <pnormand@igalia.com>
135
136         Unreviewed build fix. Remove ASSERT hitting consitently on GTK.
137
138         * rendering/InlineIterator.h:
139         (WebCore::InlineIterator::moveToStartOf):
140
141 2011-03-29  Darin Adler  <darin@apple.com>
142
143         Fix some just-introduced build failures.
144
145         * WebCore.pro: Correct spelling of filename.
146
147         * css/CSSParser.cpp:
148         (WebCore::parseColorIntOrPercentage): Fix double/int conversion that fails to compile
149         on Leopard. Also renamed one local variabel.
150
151         * inspector/InspectorAgent.cpp:
152         (WebCore::InspectorAgent::didCommitLoad): Removed unused argument names to avoid warning.
153         (WebCore::InspectorAgent::domContentLoadedEventFired): Ditto.
154
155 2011-03-29  Andras Becsi  <abecsi@webkit.org>
156
157         Reviewed by Darin Adler.
158
159         CSS: Slow parsing of rgb() with percent values
160         https://bugs.webkit.org/show_bug.cgi?id=16708
161
162         Implement fast-path parsing for percentage color values.
163
164         Gain ~30% speedup on http://canvex.lazyilluminati.com/misc/3d.html.
165
166         * css/CSSParser.cpp:
167         (WebCore::checkForValidDouble): Extend to return the number of characters forming a valid double.
168         (WebCore::parseDouble): Function for parsing double values if they are valid.
169         (WebCore::parseColorIntOrPercentage): Extend parseColorInt to deal with percentage values.
170         (WebCore::parseAlphaValue): Use the new functions.
171         (WebCore::CSSParser::parseColor): Ditto.
172
173 2011-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
174
175         Reviewed by Pavel Feldman.
176
177         Web Inspector: extract InspectorPageAgent from InspectorAgent.
178         https://bugs.webkit.org/show_bug.cgi?id=57327
179
180         There are page related methods and inspector related methods in InspectorAgent.
181         It would be nice to extract page specific methods for future usage the rest of methods in workers debugger.
182
183         * GNUmakefile.am:
184         * WebCore.gypi:
185         * inspector/CodeGeneratorInspector.pm:
186         * inspector/Inspector.json:
187         * inspector/InspectorAgent.cpp:
188         (WebCore::InspectorAgent::InspectorAgent):
189         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
190         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
191         (WebCore::InspectorAgent::setFrontend):
192         (WebCore::InspectorAgent::disconnectFrontend):
193         (WebCore::InspectorAgent::didCommitLoad):
194         (WebCore::InspectorAgent::domContentLoadedEventFired):
195         * inspector/InspectorAgent.h:
196         (WebCore::InspectorAgent::pageAgent):
197         * inspector/InspectorPageAgent.cpp: Added.
198         (WebCore::InspectorPageAgent::create):
199         (WebCore::InspectorPageAgent::InspectorPageAgent):
200         (WebCore::InspectorPageAgent::setFrontend):
201         (WebCore::InspectorPageAgent::clearFrontend):
202         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
203         (WebCore::InspectorPageAgent::removeAllScriptsToEvaluateOnLoad):
204         (WebCore::InspectorPageAgent::reloadPage):
205         (WebCore::InspectorPageAgent::openInInspectedWindow):
206         (WebCore::InspectorPageAgent::setUserAgentOverride):
207         (WebCore::buildObjectForCookie):
208         (WebCore::buildArrayForCookies):
209         (WebCore::InspectorPageAgent::getCookies):
210         (WebCore::InspectorPageAgent::deleteCookie):
211         (WebCore::InspectorPageAgent::inspectedURLChanged):
212         (WebCore::InspectorPageAgent::restore):
213         (WebCore::InspectorPageAgent::didCommitLoad):
214         (WebCore::InspectorPageAgent::domContentEventFired):
215         (WebCore::InspectorPageAgent::loadEventFired):
216         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
217         (WebCore::InspectorPageAgent::applyUserAgentOverride):
218         * inspector/InspectorPageAgent.h: Added.
219         * inspector/InspectorController.cpp:
220         (WebCore::InspectorController::connectFrontend):
221         * inspector/InspectorInstrumentation.cpp:
222         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
223         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
224         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
225         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
226         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
227         (WebCore::InspectorInstrumentation::retrievePageAgent):
228         * inspector/InspectorInstrumentation.h:
229         * inspector/InstrumentingAgents.h:
230         (WebCore::InstrumentingAgents::InstrumentingAgents):
231         (WebCore::InstrumentingAgents::inspectorPageAgent):
232         (WebCore::InstrumentingAgents::setInspectorPageAgent):
233         * inspector/front-end/AuditsPanel.js:
234         (WebInspector.AuditsPanel.prototype._reloadResources):
235         * inspector/front-end/CookieItemsView.js:
236         (WebInspector.CookieItemsView.prototype._deleteCookie):
237         (WebInspector.Cookies.getCookiesAsync):
238         * inspector/front-end/ExtensionServer.js:
239         (WebInspector.ExtensionServer.prototype._onReload):
240         * inspector/front-end/NetworkPanel.js:
241         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
242         * inspector/front-end/ResourcesPanel.js:
243         (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
244         * inspector/front-end/WorkersSidebarPane.js:
245         (WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
246         * inspector/front-end/inspector.js:
247         (WebInspector.openResource):
248         (WebInspector.documentKeyDown):
249
250 2011-03-29  David Hyatt  <hyatt@apple.com>
251
252         Reviewed by Darin Adler.
253
254         https://bugs.webkit.org/show_bug.cgi?id=57276
255         
256         Add optimizations to make the vertical placement of boxes much faster. Whenever a box is added
257         to a line, compare it with the parent box. If we can determine that the child box has the exact
258         same height and baseline position as the parent box, then we keep a boolean flag set called
259         descendantsHaveSameLineHeightAndBaseline(). If the box is different for any reason then we clear the
260         flag up the line box parent chain.
261
262         When it comes time to do computeLogicalboxHeights, we can avoid recurring into the children of
263         a box whose descendants all have the same position. When we do placeBoxesInBlockDirection, we
264         can do a simplified recursion that just calls adjustBlockDirectionPosition to offset the boxes
265         without doing anything else.
266         
267         Because of the quirks mode rule of only shrinking boxes with no immediate text children, we need
268         to track whether a box has text descendants now as well.  When we avoid doing the recursion
269         this flag tells us whether the collection of boxes should have an effect on the ascent and descent
270         of the line in quirks mode.
271  
272         * rendering/InlineFlowBox.cpp:
273         (WebCore::InlineFlowBox::addToLine):
274         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
275         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
276         (WebCore::InlineFlowBox::nodeAtPoint):
277         (WebCore::InlineFlowBox::paintBoxDecorations):
278         (WebCore::InlineFlowBox::paintMask):
279         * rendering/InlineFlowBox.h:
280         (WebCore::InlineFlowBox::InlineFlowBox):
281         (WebCore::InlineFlowBox::hasTextDescendants):
282         (WebCore::InlineFlowBox::descendantsHaveSameLineHeightAndBaseline):
283         (WebCore::InlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline):
284         * rendering/RenderBlock.h:
285         * rendering/RenderBlockLineLayout.cpp:
286         (WebCore::RenderBlock::createLineBoxes):
287         (WebCore::RenderBlock::constructLine):
288         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
289
290 2011-03-29  Eric Seidel  <eric@webkit.org>
291
292         Reviewed by Ryosuke Niwa.
293
294         Remove a bunch of duplicate code by adding some InlineIterator helper methods
295         https://bugs.webkit.org/show_bug.cgi?id=57326
296
297         Once I started adding these it became clear how much crazy duplicated code
298         we had due to treating InlineIterator as a struct and accessing its
299         members directly.  We can't quite make the members private yet since
300         findNextLineBreak still splits out the members.  But this change
301         makes the code much cleaner.
302
303         * rendering/InlineIterator.h:
304         (WebCore::InlineIterator::clear):
305         (WebCore::InlineIterator::moveToStartOf):i
306         (WebCore::InlineIterator::moveTo):
307         (WebCore::InlineIterator::increment):
308         * rendering/RenderBlockLineLayout.cpp:
309         (WebCore::tryHyphenating):
310         (WebCore::RenderBlock::findNextLineBreak):
311
312 2011-03-29  Eric Seidel  <eric@webkit.org>
313
314         Reviewed by Ryosuke Niwa.
315
316         Clean up bidiNext by abstracting repeated code
317         https://bugs.webkit.org/show_bug.cgi?id=57335
318
319         I also added a comment to explain what bidiNext is actually doing.
320         This whole area of code is confusing but need not be.
321
322         * rendering/InlineIterator.h:
323         (WebCore::embedCharFromDirection):
324         (WebCore::notifyResolverEnteredObject):
325         (WebCore::notifyResolverWillExitObject):
326         (WebCore::bidiNext):
327         (WebCore::bidiFirst):
328
329 2011-03-29  Alexander Pavlov  <apavlov@chromium.org>
330
331         Reviewed by Yury Semikhatsky.
332
333         Web Inspector: Support external CSS stylesheet freeflow text editing
334         https://bugs.webkit.org/show_bug.cgi?id=54397
335
336         In this implementation, Ctrl/Cmd-S commits the current changes into the model.
337
338         * inspector/front-end/ResourceView.js:
339         (WebInspector.ResourceView.createResourceView):
340         (WebInspector.CSSSourceFrameDelegateForResourcesPanel):
341         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.canEditScriptSource):
342         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource):
343         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource.handleInfos):
344         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype._saveStyleSheet):
345         * inspector/front-end/ResourcesPanel.js:
346         (WebInspector.ResourcesPanel.prototype._applyDiffMarkup):
347         (WebInspector.FrameResourceTreeElement.prototype._contentChanged):
348         * inspector/front-end/SourceFrame.js:
349         (WebInspector.SourceFrame.prototype._createTextViewer):
350
351 2011-03-29  Eric Carlson  <eric.carlson@apple.com>
352
353         Reviewed by Dan Bernstein.
354
355         playbackRate should not be set to defaultPlaybackRate in play()
356         https://bugs.webkit.org/show_bug.cgi?id=55943
357
358         Test: media/video-playbackrate.html
359
360         * html/HTMLMediaElement.cpp:
361         (WebCore::HTMLMediaElement::playbackRate): No need to ask the media engine for the current
362             rate, we already have the current value cached.
363         (WebCore::HTMLMediaElement::playInternal): Don't reset the engine's playback rate to 
364             the default rate.
365         (WebCore::HTMLMediaElement::togglePlayState): Do reset the engine's playback rate to 
366             the default rate before triggering playback.
367         * manual-tests/media-default-playback-rate.html: Added.
368
369 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
370
371         Reviewed by Eric Seidel.
372
373         Remove specialization of EventDispatcher with inversion of control.
374         https://bugs.webkit.org/show_bug.cgi?id=57285
375
376         Since some events have extra logic around their dispatch, allow them
377         to dispatch themselves and specialize the logic. This change only
378         converts KeyboardEvent to this model.
379
380         No functional change, covered by existing tests.
381
382         * dom/Event.cpp:
383         (WebCore::Event::dispatch): Added.
384         * dom/Event.h: Updated decls.
385         * dom/EventDispatcher.cpp:
386         (WebCore::EventDispatcher::dispatchEvent): Changed to ask event to dispatch
387             itself.
388         * dom/EventDispatcher.h: Updated decls.
389         * dom/KeyboardEvent.cpp:
390         (WebCore::KeyboardEvent::dispatch): Added, moving code from EventDispatcher.
391         * dom/KeyboardEvent.h: Updated decls.
392         * dom/Node.cpp:
393         (WebCore::Node::dispatchKeyEvent): Changed to use the new ways.
394
395 2011-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
396
397         Reviewed by Yury Semikhatsky.
398
399         Web Inspector: InspectorDOMAgent has unnecessary dependency from InspectorAgent.
400         https://bugs.webkit.org/show_bug.cgi?id=57329
401
402         * inspector/InspectorAgent.cpp:
403         (WebCore::InspectorAgent::InspectorAgent):
404         (WebCore::InspectorAgent::setFrontend):
405         * inspector/InspectorAgent.h:
406         * inspector/InspectorController.cpp:
407         (WebCore::InspectorController::inspect):
408         * inspector/InspectorDOMAgent.cpp:
409         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
410         (WebCore::InspectorDOMAgent::setFrontend):
411         (WebCore::InspectorDOMAgent::handleMousePress):
412         (WebCore::InspectorDOMAgent::inspect):
413         (WebCore::InspectorDOMAgent::focusNode):
414         (WebCore::InspectorDOMAgent::highlight):
415         (WebCore::InspectorDOMAgent::hideHighlight):
416         * inspector/InspectorDOMAgent.h:
417         (WebCore::InspectorDOMAgent::create):
418
419 2011-03-29  Eric Seidel  <eric@webkit.org>
420
421         Reviewed by Nikolas Zimmermann.
422
423         Rename InlineIterator::pos to m_pos to match modern style
424         https://bugs.webkit.org/show_bug.cgi?id=57342
425
426         Somehow I failed to upload this one earlier, no wonder later patches didn't apply.
427
428         * rendering/InlineIterator.h:
429         (WebCore::InlineIterator::InlineIterator):
430         (WebCore::operator==):
431         (WebCore::operator!=):
432         (WebCore::InlineIterator::increment):
433         (WebCore::InlineIterator::current):
434         (WebCore::InlineBidiResolver::appendRun):
435         * rendering/RenderBlockLineLayout.cpp:
436         (WebCore::checkMidpoints):
437         (WebCore::RenderBlock::appendRunsForObject):
438         (WebCore::RenderBlock::layoutInlineChildren):
439         (WebCore::RenderBlock::matchedEndLine):
440         (WebCore::tryHyphenating):
441         (WebCore::RenderBlock::findNextLineBreak):
442
443 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
444
445         Reviewed by Yury Semikhatsky.
446
447         Web Inspector: document BrowserDebugger agent.
448         https://bugs.webkit.org/show_bug.cgi?id=57331
449
450         * inspector/Inspector.json:
451
452 2011-03-29  Alexander Pavlov  <apavlov@chromium.org>
453
454         Reviewed by Pavel Feldman.
455
456         Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js
457         https://bugs.webkit.org/show_bug.cgi?id=56310
458
459         Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing
460         "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned
461         by CSSAgent.getStyleSheet() anymore.
462
463         Test: inspector/styles/get-set-stylesheet-text.html
464
465         * inspector/Inspector.json:
466         * inspector/InspectorCSSAgent.cpp:
467         (WebCore::InspectorCSSAgent::getAllStyleSheets):
468         * inspector/InspectorCSSAgent.h:
469         * inspector/InspectorStyleSheet.cpp:
470         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
471         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
472         * inspector/InspectorStyleSheet.h:
473         * inspector/front-end/AuditRules.js:
474         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
475         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
476         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
477         * inspector/front-end/CSSStyleModel.js:
478         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
479         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
480         (WebInspector.CSSStyleModel.prototype._onRevert):
481         (WebInspector.CSSStyleSheet):
482         (WebInspector.CSSStyleSheet.prototype.setText):
483
484 2011-03-29  Jeremy Moskovich  <jeremy@chromium.org>
485
486         Reviewed by Eric Seidel.
487
488         Implement text-align:match-parent as -webkit-match-parent.
489         https://bugs.webkit.org/show_bug.cgi?id=50951
490
491         Add support to the CSS parser.
492
493         Tests: fast/css/text-align-webkit-match-parent-parse.html
494                fast/css/text-align-webkit-match-parent.html
495
496         * css/CSSParser.cpp:
497         (WebCore::CSSParser::parseValue):
498         * css/CSSStyleSelector.cpp:
499         (WebCore::CSSStyleSelector::applyProperty):
500         * css/CSSValueKeywords.in:
501
502 2011-03-29  Eric Seidel  <eric@webkit.org>
503
504         Reviewed by Ryosuke Niwa.
505
506         Rename InlineIterator::nextBreakablePosition to m_nextBreakablePosition to match modern style
507         https://bugs.webkit.org/show_bug.cgi?id=57323
508
509         All of these m_nextBreakablePosition = -1 could probably be replaced with
510         some new methods.  But I'll do that in a separate change.  Clearly
511         m_nextBreakablePosition is just a cached value which should be cleared
512         at the right times.  I suspect we may even fail to clear it sometimes when
513         we should due to the current used of direct access instead of smarter functions.
514
515         * rendering/InlineIterator.h:
516         (WebCore::InlineIterator::InlineIterator):
517         (WebCore::InlineIterator::increment):
518         * rendering/RenderBlockLineLayout.cpp:
519         (WebCore::tryHyphenating):
520         (WebCore::RenderBlock::findNextLineBreak):
521
522 2011-03-29  Jeff Miller  <jeffm@apple.com>
523
524         Reviewed by Jon Honeycutt.
525
526         Add WebCore::copyCertificateToData() on Windows
527         https://bugs.webkit.org/show_bug.cgi?id=57296
528
529         Create a new win directory in platform/cf and add CertificateCFWin.cpp and CertificateCFWin.h to it.
530
531         * WebCore.vcproj/WebCore.vcproj: Added CertificateCFWin.cpp and CertificateCFWin.h.
532         * WebCore.vcproj/copyForwardingHeaders.cmd: Copy all header files in \platform\cf\win\.
533         * platform/cf/win: Added.
534         * platform/cf/win/CertificateCFWin.cpp: Added.
535         (WebCore::deallocCertContext): Added.
536         (WebCore::createCertContextDeallocator): Added.
537         (WebCore::copyCertificateToData): Added.
538         * platform/cf/win/CertificateCFWin.h: Added.
539
540 2011-03-29  Eric Seidel  <eric@webkit.org>
541
542         Reviewed by Ryosuke Niwa.
543
544         Rename InlineIterator::block to m_block to match modern style
545         https://bugs.webkit.org/show_bug.cgi?id=57321
546
547         I could have made m_block private, since it's only accessed in
548         one place outside of InlineIterator (for an ASSERT).  But I chose
549         not to do so in this change.
550
551         * rendering/InlineIterator.h:
552         (WebCore::InlineIterator::InlineIterator):
553         (WebCore::InlineIterator::increment):
554         (WebCore::InlineBidiResolver::appendRun):
555         * rendering/RenderBlockLineLayout.cpp:
556         (WebCore::RenderBlock::findNextLineBreak):
557
558 2011-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
559
560         Reviewed by Nikolas Zimmermann.
561
562         Incorrect offset of svg <use> element which is in <symbol> element
563         https://bugs.webkit.org/show_bug.cgi?id=57318
564
565         When webkit expanded a svg <symbol> element in the shadow tree it
566         would clone the children of the <symbol>. The children may contain
567         SVGShadowTreeContainerElement which was expanded from svg <use>
568         element. But the clone operation would clone a
569         SVGShadowTreeContainerElement as a svg <g> element. This resulted
570         that updateContainerOffset wouldn't update offset for those elements
571         which were expand from <use> elements.
572
573         This patch implements cloneElementWithoutAttributesAndChildren for
574         SVGShadowTreeContainerElement to make the container clone itself
575         correctly.
576
577         Test: svg/custom/use-in-symbol-with-offset.svg
578
579         * rendering/svg/SVGShadowTreeElements.cpp:
580         (WebCore::SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren):
581         * rendering/svg/SVGShadowTreeElements.h:
582
583 2011-03-29  Eric Seidel  <eric@webkit.org>
584
585         Reviewed by Ryosuke Niwa.
586
587         Rename InlineIterator::obj to m_obj to match modern style
588         https://bugs.webkit.org/show_bug.cgi?id=57319
589
590         I started this rename after confusion in InlineBidiResolver::appendRun.
591         (Which uses an "obj" local in InlineIterator.h.  It's not actually
592         masking m_obj because it's a separate class, but I didn't realize
593         that at the time because it's in InlineIterator.h which is itself confusing!)
594
595         * rendering/InlineIterator.h:
596         (WebCore::InlineIterator::InlineIterator):
597         (WebCore::operator==):
598         (WebCore::operator!=):
599         (WebCore::InlineIterator::increment):
600         (WebCore::InlineIterator::atEnd):
601         (WebCore::InlineIterator::current):
602         (WebCore::InlineIterator::direction):
603         (WebCore::InlineBidiResolver::appendRun):
604         * rendering/RenderBlockLineLayout.cpp:
605         (WebCore::checkMidpoints):
606         (WebCore::RenderBlock::appendRunsForObject):
607         (WebCore::RenderBlock::layoutInlineChildren):
608         (WebCore::RenderBlock::matchedEndLine):
609         (WebCore::skipNonBreakingSpace):
610         (WebCore::RenderBlock::requiresLineBox):
611         (WebCore::RenderBlock::skipTrailingWhitespace):
612         (WebCore::RenderBlock::skipLeadingWhitespace):
613         (WebCore::tryHyphenating):
614         (WebCore::RenderBlock::findNextLineBreak):
615
616 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
617
618         Reviewed by Yury Semikhatsky.
619
620         Web Inspector: document Timeline domain, make timeline event types of type string.
621         https://bugs.webkit.org/show_bug.cgi?id=57299
622
623         * inspector/Inspector.json:
624         * inspector/InspectorTimelineAgent.cpp:
625         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
626         (WebCore::InspectorTimelineAgent::start):
627         (WebCore::InspectorTimelineAgent::stop):
628         (WebCore::InspectorTimelineAgent::willCallFunction):
629         (WebCore::InspectorTimelineAgent::didCallFunction):
630         (WebCore::InspectorTimelineAgent::willDispatchEvent):
631         (WebCore::InspectorTimelineAgent::didDispatchEvent):
632         (WebCore::InspectorTimelineAgent::willLayout):
633         (WebCore::InspectorTimelineAgent::didLayout):
634         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
635         (WebCore::InspectorTimelineAgent::didRecalculateStyle):
636         (WebCore::InspectorTimelineAgent::willPaint):
637         (WebCore::InspectorTimelineAgent::didPaint):
638         (WebCore::InspectorTimelineAgent::willWriteHTML):
639         (WebCore::InspectorTimelineAgent::didWriteHTML):
640         (WebCore::InspectorTimelineAgent::didInstallTimer):
641         (WebCore::InspectorTimelineAgent::didRemoveTimer):
642         (WebCore::InspectorTimelineAgent::willFireTimer):
643         (WebCore::InspectorTimelineAgent::didFireTimer):
644         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
645         (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
646         (WebCore::InspectorTimelineAgent::willLoadXHR):
647         (WebCore::InspectorTimelineAgent::didLoadXHR):
648         (WebCore::InspectorTimelineAgent::willEvaluateScript):
649         (WebCore::InspectorTimelineAgent::didEvaluateScript):
650         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
651         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
652         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
653         (WebCore::InspectorTimelineAgent::didReceiveResourceData):
654         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
655         (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
656         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
657         (WebCore::InspectorTimelineAgent::didMarkTimeline):
658         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
659         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
660         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
661         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
662         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
663         * inspector/InspectorTimelineAgent.h:
664         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
665         * inspector/front-end/TimelineAgent.js:
666         * inspector/front-end/TimelinePanel.js:
667         (WebInspector.TimelinePanel.prototype.get _recordStyles):
668         (WebInspector.TimelinePanel.prototype._createEventDivider):
669         (WebInspector.TimelinePanel.prototype._findParentRecord):
670         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
671         (WebInspector.TimelineDispatcher.prototype.started):
672         (WebInspector.TimelineDispatcher.prototype.stopped):
673         (WebInspector.TimelineDispatcher.prototype.eventRecorded):
674         (WebInspector.TimelinePanel.FormattedRecord):
675         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
676         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
677
678 2011-03-29  Andrey Adaikin  <aandrey@google.com>
679
680         Reviewed by Pavel Feldman.
681
682         Web Inspector: Fixing live edits tests on chromium.
683         https://bugs.webkit.org/show_bug.cgi?id=57316
684
685         * inspector/front-end/ScriptsPanel.js:
686         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
687         * inspector/front-end/SourceFrame.js:
688         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
689         (WebInspector.SourceFrame.prototype._handleSave):
690         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
691
692 2011-03-29  Pavel Podivilov  <podivilov@chromium.org>
693
694         Reviewed by Yury Semikhatsky.
695
696         Web Inspector: fix call frames positions in formatted scripts.
697         https://bugs.webkit.org/show_bug.cgi?id=57036
698
699         Introduce PresentationCallFrame class that encapsulates source mapping details from UI components.
700
701         * inspector/front-end/CallStackSidebarPane.js:
702         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLocation):
703         (WebInspector.CallStackSidebarPane.prototype.update):
704         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
705         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
706         (WebInspector.CallStackSidebarPane.prototype._contextMenu):
707         (WebInspector.CallStackSidebarPane.prototype._copyStackTrace):
708         * inspector/front-end/DebuggerModel.js:
709         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
710         (WebInspector.DebuggerModel.prototype.get debuggerPausedDetails):
711         (WebInspector.DebuggerModel.prototype._pausedScript):
712         * inspector/front-end/DebuggerPresentationModel.js:
713         (WebInspector.DebuggerPresentationModel):
714         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
715         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
716         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
717         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
718         (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
719         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
720         (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame):
721         (WebInspector.DebuggerPresentationModel.prototype._reset):
722         (WebInspector.PresenationCallFrame): Call frame wrapper for UI.
723         * inspector/front-end/ScriptsPanel.js:
724         (WebInspector.ScriptsPanel):
725         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
726         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
727         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
728         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
729         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
730         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
731         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
732         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
733         * inspector/front-end/SourceFile.js:
734         (WebInspector.SourceFile.prototype.get content):
735         * inspector/front-end/SourceFrame.js:
736         (WebInspector.SourceFrame.prototype._createTextViewer):
737         (WebInspector.SourceFrame.prototype.setExecutionLine):
738         (WebInspector.SourceFrame.prototype.clearExecutionLine):
739         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
740         (WebInspector.SourceFrame.prototype._showPopup):
741
742 2011-03-29  Emil A Eklund  <eae@chromium.org>
743
744         Reviewed by Darin Adler.
745
746         Fix for execCommand("Delete") with an empty selection.
747         https://bugs.webkit.org/show_bug.cgi?id=56652
748
749         Test: editing/execCommand/delete-empty-container.html
750
751         * editing/TypingCommand.cpp:
752         (WebCore::TypingCommand::makeEditableRootEmpty): Add check for root element.
753
754 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
755
756         Reviewed by Pavel Feldman.
757
758         Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
759         make sure we don't return big amounts of data to forms.
760         https://bugs.webkit.org/show_bug.cgi?id=57227
761
762         * inspector/front-end/DetailedHeapshotGridNodes.js:
763         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
764         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
765         (WebInspector.HeapSnapshotObjectNode):
766         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
767         (WebInspector.HeapSnapshotInstanceNode):
768         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
769         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
770         (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
771         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
772         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
773         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
774         * inspector/front-end/DetailedHeapshotView.js:
775         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
776         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
777         * inspector/front-end/HeapSnapshot.js:
778         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
779         (WebInspector.HeapSnapshotNode.prototype.get retainers):
780         (WebInspector.HeapSnapshot):
781         (WebInspector.HeapSnapshot.prototype.get _allNodes):
782         (WebInspector.HeapSnapshot.prototype.get nodeCount):
783         (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
784         (WebInspector.HeapSnapshot.prototype.hasId):
785         (WebInspector.HeapSnapshot.prototype.get nodeIds):
786         (WebInspector.HeapSnapshot.prototype._retainersForNode):
787         (WebInspector.HeapSnapshot.prototype._buildRetainers):
788         (WebInspector.HeapSnapshot.prototype._buildAggregates):
789         (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
790         (WebInspector.HeapSnapshot.prototype._buildIdsList):
791         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
792         (WebInspector.HeapSnapshotFilteredOrderedIterator):
793         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
794         (WebInspector.HeapSnapshotEdgesProvider):
795         (WebInspector.HeapSnapshotNodesProvider):
796
797 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
798
799         Reviewed by Pavel Feldman.
800
801         Web Inspector: [Chromium] Fix detailed heap snapshots UI.
802         https://bugs.webkit.org/show_bug.cgi?id=57235
803
804         Fix two problems:
805           1. Text color of grid cells under selection needs to be white, otherwise it's unreadable for some colors;
806           2. Long strings need to be truncated in grid, their contents can be shown on hover.
807
808         * inspector/front-end/DetailedHeapshotView.js:
809         (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor):
810         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
811         * inspector/front-end/heapProfiler.css:
812         (.detailed-heapshot-view .console-formatted-string):
813         (.detailed-heapshot-view .data-grid tr.selected *):
814         (.detailed-heapshot-view .data-grid:focus tr.selected *):
815
816 2011-03-29  Andrey Adaikin  <aandrey@google.com>
817
818         Reviewed by Yury Semikhatsky.
819
820         Web Inspector: Highlight visible lines first
821         https://bugs.webkit.org/show_bug.cgi?id=57013
822
823         * inspector/front-end/TextViewer.js:
824         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleChunkNumber):
825         (WebInspector.TextEditorChunkedPanel.prototype._findVisibleChunks):
826         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops):
827         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber):
828         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
829         (WebInspector.TextEditorMainPanel.prototype._paintLines):
830         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
831         (WebInspector.TextEditorMainPanel.prototype._paintLine):
832         (WebInspector.TextEditorMainChunk.prototype.set expanded):
833
834 2011-03-29  Emil A Eklund  <eae@chromium.org>
835
836         Reviewed by Dimitri Glazkov.
837
838         Relative mouse coordinates recalculated for each target
839         https://bugs.webkit.org/show_bug.cgi?id=57130
840
841         Calculate relative coordinates lazily for mouse events instead of doing
842         it for each target. Speeds up dispatching of mouse events in deep dom
843         structures significantly, O(n^2) to O(n).
844
845         Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973
846
847         Tests: fast/events/mouse-relative-position.html
848                perf/mouse-event.html
849
850         * dom/Event.cpp:
851         (WebCore::Event::setTarget):
852         * dom/MouseRelatedEvent.cpp:
853         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
854         (WebCore::MouseRelatedEvent::initCoordinates):
855         (WebCore::pageZoomFactor):
856         (WebCore::MouseRelatedEvent::receivedTarget):
857         (WebCore::MouseRelatedEvent::computeRelativePosition):
858         (WebCore::MouseRelatedEvent::layerX):
859         (WebCore::MouseRelatedEvent::layerY):
860         (WebCore::MouseRelatedEvent::offsetX):
861         (WebCore::MouseRelatedEvent::offsetY):
862         * dom/MouseRelatedEvent.h:
863         * dom/UIEvent.cpp:
864         (WebCore::UIEvent::layerX):
865         (WebCore::UIEvent::layerY):
866         * dom/UIEvent.h:
867
868 2011-03-29  Emil A Eklund  <eae@chromium.org>
869
870         Reviewed by Darin Adler.
871
872         getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
873         https://bugs.webkit.org/show_bug.cgi?id=57266
874
875         Add null check to counterToCSSValue.
876
877         Test: fast/css/getComputedStyle/counterIncrement-without-counter.html
878
879         * css/CSSComputedStyleDeclaration.cpp:
880         (WebCore::counterToCSSValue):
881
882 2011-03-29  Gavin Peters  <gavinp@chromium.org>
883
884         Reviewed by Tony Gentilcore.
885
886         Implement onerror events for <link rel=prefetch>
887         https://bugs.webkit.org/show_bug.cgi?id=57182
888
889         These events are equired on link elements, see
890         http://dev.w3.org/html5/spec/Overview.html#the-link-element
891
892         After a discussion in WebKit-dev about the direction of prefetch in the loader, and about a path
893         to adding the Link header, we decided to look at making onerror, onload and onbeforeload events
894         more uniformly supported.  See the thread at
895         https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html .
896
897         It turned out that part of adding onerror for link prefetch was to make the top CachedResource less
898         abstract.  It was pure virtual until prefetch became the first consumer to use an unspecialised
899         implementation, and this CL continues that by adding a default checkNotify method to it.  As it
900         happens there were already two subclasses using what amounted to the generic checkNotify, so I
901         also removed those, buying us some code cleanup with the change.
902
903         Test: fast/dom/HTMLLinkElement/prefetch-onerror.html
904
905         * html/HTMLLinkElement.cpp:
906         (WebCore::HTMLLinkElement::parseMappedAttribute):
907         (WebCore::HTMLLinkElement::onloadTimerFired):
908         (WebCore::HTMLLinkElement::notifyFinished):
909         * loader/cache/CachedImage.cpp:
910         * loader/cache/CachedImage.h:
911         * loader/cache/CachedResource.cpp:
912         (WebCore::CachedResource::checkNotify):
913         (WebCore::CachedResource::data):
914         (WebCore::CachedResource::error):
915         * loader/cache/CachedResource.h:
916         * loader/cache/CachedScript.cpp:
917         * loader/cache/CachedScript.h:
918
919 2011-03-29  Eric Seidel  <eric@webkit.org>
920
921         Reviewed by Ryosuke Niwa.
922
923         Add support for parsing unicode-bidi: -webkit-isolate
924         https://bugs.webkit.org/show_bug.cgi?id=57181
925
926         Test: css3/unicode-bidi-insolate-parse.html
927
928         * WebCore.xcodeproj/project.pbxproj:
929         * css/CSSParser.cpp:
930         (WebCore::CSSParser::parseValue):
931         * css/CSSPrimitiveValueMappings.h:
932         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
933         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
934         * css/CSSValueKeywords.in:
935         * rendering/style/RenderStyleConstants.h:
936
937 2011-03-29  Patrick Gansterer  <paroga@webkit.org>
938
939         Unreviewed WinCE build fix for r82193.
940
941         * platform/wince/FileSystemWinCE.cpp:
942         (WebCore::openTemporaryFile):
943
944 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
945
946         Unreviewed, rolling out r82198.
947         http://trac.webkit.org/changeset/82198
948         https://bugs.webkit.org/show_bug.cgi?id=57304
949
950         Broke Chromium Win build. (Requested by dave_levin on
951         #webkit).
952
953         * platform/image-decoders/png/PNGImageDecoder.cpp:
954         (WebCore::PNGImageDecoder::headerAvailable):
955         (WebCore::PNGImageDecoder::rowAvailable):
956
957 2011-03-28  Ofri Wolfus  <ofri@google.com>
958
959         Reviewed by Eric Seidel.
960
961         RTL: Select elements with a size attribute are always left aligned.
962         https://bugs.webkit.org/show_bug.cgi?id=50928
963
964         Added support for alignment in RenderListBox.
965
966         Test: fast/forms/listbox-bidi-align.html
967
968         * rendering/RenderListBox.cpp:
969         (WebCore::itemOffsetForAlignment):
970         (WebCore::RenderListBox::paintItemForeground): Add support for alignment and directionality.
971
972 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
973
974         Reviewed by Benjamin Poulain.
975
976         [Qt] Change TextureMapperVideoLayer to TextureMapperMediaLayer
977         https://bugs.webkit.org/show_bug.cgi?id=57142
978
979         TextureMapperMediaLayer is a better name here because both video and plugins use this layer.
980         Remove ENABLE(VIDEO) guard.
981
982         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
983         * platform/graphics/qt/MediaPlayerPrivateQt.h:
984         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
985         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
986         * platform/graphics/texmap/TextureMapperNode.h:
987         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
988         (WebCore::TextureMapperMediaLayer::layerType):
989
990 2011-03-28  Thomas Klausner  <tk@giga.or.at>
991
992         Reviewed by David Levin.
993
994         png-1.5 fixes
995         https://bugs.webkit.org/show_bug.cgi?id=54406
996
997         Fix compilation with png-1.5: struct members were hidden, and
998         a new API to terminate data processing was added (especially for
999         WebKit).
1000
1001         Compilation fixes, so no new tests.
1002
1003         * platform/image-decoders/png/PNGImageDecoder.cpp:
1004         (WebCore::PNGImageDecoder::headerAvailable):
1005         (WebCore::PNGImageDecoder::rowAvailable):
1006
1007 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
1008
1009         Reviewed by Adam Barth.
1010
1011         Replace fprintf(stderr, ...) with LOG_ERROR
1012         https://bugs.webkit.org/show_bug.cgi?id=57216
1013
1014         LOG_ERROR is a better choice here.
1015
1016         * bridge/jni/v8/JavaClassV8.cpp:
1017         (JavaClass::JavaClass):
1018
1019 2011-03-28  Steve Block  <steveblock@google.com>
1020
1021         Reviewed by Jeremy Orlow.
1022
1023         Add a new JavaValue to type to represent a Java value in the Java bridge
1024         https://bugs.webkit.org/show_bug.cgi?id=57022
1025
1026         This change introduces a new JavaValue type and uses it in place of jvalue
1027         in the conversions to and from JavaNPObject used in the V8 Java bridge.
1028
1029         Refactoring only, no new tests.
1030
1031         * WebCore.gypi:
1032         * bridge/jni/JNIUtility.cpp:
1033         (JSC::Bindings::javaTypeFromClassName):
1034         (JSC::Bindings::signatureFromJavaType):
1035         (JSC::Bindings::getJNIField):
1036         (JSC::Bindings::callJNIMethod):
1037         * bridge/jni/JavaType.h:
1038         * bridge/jni/v8/JNIUtilityPrivate.cpp:
1039         (JSC::Bindings::convertNPVariantToJavaValue):
1040         (JSC::Bindings::convertJavaValueToNPVariant):
1041         (JSC::Bindings::jvalueToJavaValue):
1042         (JSC::Bindings::javaValueToJvalue):
1043         * bridge/jni/v8/JNIUtilityPrivate.h:
1044         * bridge/jni/v8/JavaNPObjectV8.cpp:
1045         (JSC::Bindings::JavaNPObjectInvoke):
1046         (JSC::Bindings::JavaNPObjectGetProperty):
1047         * bridge/jni/v8/JavaValueV8.h: Added.
1048         (JSC::Bindings::JavaValue::JavaValue):
1049
1050 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
1051
1052         Reviewed by Darin Adler.
1053
1054         Use String instead of CString as return value of openTemporaryFile
1055         https://bugs.webkit.org/show_bug.cgi?id=55332
1056
1057         We usually store all paths as UTF-16. Do this for temporary files too.
1058
1059         * WebCore.exp.in
1060         * platform/FileSystem.h:
1061         * platform/android/FileSystemAndroid.cpp:
1062         * platform/brew/FileSystemBrew.cpp:
1063         * platform/efl/FileSystemEfl.cpp:
1064         * platform/gtk/FileSystemGtk.cpp:
1065         * platform/haiku/FileSystemHaiku.cpp:
1066         * platform/mac/FileSystemMac.mm:
1067         * platform/qt/FileSystemQt.cpp:
1068         * platform/win/FileSystemWin.cpp:
1069         * platform/wince/FileSystemWinCE.cpp:
1070         * platform/wx/FileSystemWx.cpp:
1071         * plugins/PluginStream.cpp:
1072         (WebCore::PluginStream::destroyStream):
1073         * plugins/PluginStream.h:
1074
1075 2011-03-28  Jeff Johnson  <opendarwin@lapcatsoftware.com>
1076
1077         Reviewed by Pavel Feldman.
1078
1079         Web Inspector: empty, non-functional window
1080         https://bugs.webkit.org/show_bug.cgi?id=56354
1081
1082         Check whether DOM local storage is enabled
1083         before attempting to access window.localStorage.
1084
1085         No new tests.
1086
1087         * inspector/front-end/Settings.js:
1088         (WebInspector.Settings.prototype.findSettingForAllProjects):
1089         (WebInspector.Settings.prototype._get):
1090         (WebInspector.Settings.prototype._set):
1091
1092 2011-03-28  Beth Dakin  <bdakin@apple.com>
1093
1094         Reviewed by Darin Adler.
1095
1096         Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: 
1097         Horizontal scroller stops appearing after going Forward
1098         -and corresponding-
1099         <rdar://problem/9026946>
1100
1101         This patch rolls out revision 79053 and fixes the same bug in a  better way.
1102
1103         New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then 
1104         sets the contents size to 0. This is called when a document is going into the page 
1105         cache.
1106         * dom/Document.cpp:
1107         (WebCore::Document::setInPageCache):
1108         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
1109
1110         Roll-out of 79053.
1111         * history/CachedFrame.cpp:
1112         (WebCore::CachedFrameBase::restore):
1113         * page/FrameView.cpp:
1114         (WebCore::FrameView::FrameView):
1115         (WebCore::FrameView::reset):
1116         (WebCore::FrameView::layout):
1117         * page/FrameView.h:
1118
1119 2011-03-28  Ojan Vafai  <ojan@chromium.org>
1120
1121         Reviewed by Antti Koivisto.
1122
1123         fix style sharing with :any and sibling selectors
1124         https://bugs.webkit.org/show_bug.cgi?id=57211
1125
1126         Test: fast/css/sibling-selectors.html
1127
1128         * css/CSSStyleSelector.cpp:
1129         (WebCore::collectFeaturesFromList):
1130
1131 2011-03-27  Ojan Vafai  <ojan@chromium.org>
1132
1133         Reviewed by Antti Koivisto.
1134
1135         fix :-webkit-any(:last-child)
1136         https://bugs.webkit.org/show_bug.cgi?id=57207
1137
1138         We were passing the wrong arguments to checkSelector. Also, we were not
1139         passing through the encounteredLink bool.
1140
1141         * css/CSSStyleSelector.cpp:
1142         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
1143         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1144         * css/CSSStyleSelector.h:
1145
1146 2011-03-27  Ojan Vafai  <ojan@chromium.org>
1147
1148         Reviewed by Antti Koivisto.
1149
1150         fix :-webkit-any(:last-child)
1151         https://bugs.webkit.org/show_bug.cgi?id=57207
1152
1153         We were passing the wrong arguments to checkSelector. Also, we were not
1154         passing through the encounteredLink bool.
1155
1156         * css/CSSStyleSelector.cpp:
1157         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
1158         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
1159         * css/CSSStyleSelector.h:
1160
1161 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
1162
1163         Reviewed by Darin Adler.
1164
1165         REGRESSION(r82152): fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
1166         https://bugs.webkit.org/show_bug.cgi?id=57291
1167
1168         * platform/KURL.cpp:
1169         (WebCore::KURL::parse): Instead of considering URLs with
1170         credentials but no host invalid, consider them to have a host
1171         ending in @ (which fails down the line)/
1172
1173 2011-03-28  Kent Tamura  <tkent@chromium.org>
1174
1175         Reviewed by Dimitri Glazkov.
1176
1177         Fix some problems of the appearance of form validation message bubble.
1178         https://bugs.webkit.org/show_bug.cgi?id=57208
1179
1180         No new tests. Validation message bubble appearance is not testable
1181         because it depends on a timer.
1182
1183         * css/html.css:
1184         (::-webkit-validation-bubble):
1185         (::-webkit-validation-bubble-message):
1186         (::-webkit-validation-bubble-arrow):
1187         (::-webkit-validation-bubble-arrow-clipper):
1188           - Explicitly set margin, padding, and color.
1189           - Make the shadow darker.
1190           - Make the background color darker.
1191           - Make opacity larger.
1192           - Make the border color lighter.
1193           - Add inset shadows
1194           - Change the implementation of an arrow.
1195             Stop making a right triangle by the border trick.
1196             Use -webkit-transform instead.
1197           - Make min-width workable by changing display property of
1198             -webkit-validation-bubble to "inline-block".
1199         * html/ValidationMessage.cpp:
1200         (WebCore::ValidationMessage::buildBubbleTree):
1201           Change the node structure. Before this change, -webkit-validation-bubble
1202           had three DIVs inside. After this change, it has two DIVs;
1203           -webkit-validation-bubble-arrow-clipper and
1204           -webkit-validation-bubble-message, and
1205           -webkit-validation-bubble-arrow-clipper contains
1206           -webkit-validation-bubble-arrow.
1207
1208 2011-03-28  Enrica Casucci  <enrica@apple.com>
1209
1210         Reviewed by Sam Weinig.
1211
1212         REGRESSION: Can't enter pasted with context or Edit menu text in search or address field in the browser.
1213         https://bugs.webkit.org/show_bug.cgi?id=57275
1214         <rdar://problem/8246691>
1215
1216         We need to classify cut and paste actions as user typing actions even when
1217         the action is triggered by a context menu selection to
1218         allow the propagation of the textDidChangeInTextField event.
1219
1220         * editing/EditorCommand.cpp:
1221         The following methods have been modified to properly set up
1222         the UserTypingGestureAction when the command source is the
1223         menu or a key binding sequence.
1224         (WebCore::executeCut):
1225         (WebCore::executePaste):
1226         (WebCore::executePasteAndMatchStyle):
1227         (WebCore::executePasteAsPlainText):
1228         (WebCore::executeDelete):
1229         * page/ContextMenuController.cpp:
1230         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
1231         call execute command instead of referring to the specific method in
1232         the editor class.
1233
1234 2011-03-28  Oliver Hunt  <oliver@apple.com>
1235
1236         Reviewed by Geoffrey Garen.
1237
1238         instanceof Array test fails when using iframes
1239         https://bugs.webkit.org/show_bug.cgi?id=17250
1240
1241         Update for new function and date apis
1242
1243         Test: fast/js/js-constructors-use-correct-global.html
1244
1245         * WebCore.xcodeproj/project.pbxproj:
1246         * bindings/js/JSDOMBinding.cpp:
1247         (WebCore::jsDateOrNull):
1248         * bindings/js/JSLazyEventListener.cpp:
1249         (WebCore::JSLazyEventListener::initializeJSFunction):
1250
1251 2011-03-28  Beth Dakin  <bdakin@apple.com>
1252
1253         Reviewed by Darin Adler.
1254
1255         Fix for https://bugs.webkit.org/show_bug.cgi?id=57124 When the scroller style is 
1256         changed via delegate method, the page needs a full relayout and repaint
1257         -and corresponding-
1258         <rdar://problem/9059129>
1259
1260         Call into WebKitSystemInterface to associate the new painter with the existing 
1261         painter controller. Reset the scrollbar frame rects to the new thickness -- normally 
1262         this only happens when a scrollbar is created, so we have to reset the thickness 
1263         here to pick up the new theme thickness. Finally, force a full relayout and style 
1264         recall with setNeedsRecalcStyleInAllFrames()
1265         * platform/mac/ScrollAnimatorMac.mm:
1266         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1267
1268         setNeedsRecalcStyleInAllFrames() used to be a static method in Settings.cpp. This 
1269         patch moves it to be a member function on Page so that it can be called from 
1270         FrameView when the scrollbar style changes.
1271         * page/FrameView.cpp:
1272         (WebCore::FrameView::setNeedsRecalcStyleInAllFrames):
1273         * page/FrameView.h:
1274         * page/Page.cpp:
1275         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
1276         * page/Page.h:
1277         * page/Settings.cpp:
1278         (WebCore::Settings::setStandardFontFamily):
1279         (WebCore::Settings::setFixedFontFamily):
1280         (WebCore::Settings::setSerifFontFamily):
1281         (WebCore::Settings::setSansSerifFontFamily):
1282         (WebCore::Settings::setCursiveFontFamily):
1283         (WebCore::Settings::setFantasyFontFamily):
1284         (WebCore::Settings::setMinimumFontSize):
1285         (WebCore::Settings::setMinimumLogicalFontSize):
1286         (WebCore::Settings::setDefaultFontSize):
1287         (WebCore::Settings::setDefaultFixedFontSize):
1288         (WebCore::Settings::setTextAreasAreResizable):
1289         (WebCore::Settings::setAuthorAndUserStylesEnabled):
1290         (WebCore::Settings::setFontRenderingMode):
1291         (WebCore::Settings::setAcceleratedCompositingEnabled):
1292         (WebCore::Settings::setShowDebugBorders):
1293         (WebCore::Settings::setShowRepaintCounter):
1294         * platform/ScrollableArea.h:
1295         (WebCore::ScrollableArea::setNeedsRecalcStyleInAllFrames):
1296
1297 2011-03-28  Dirk Pranke  <dpranke@chromium.org>
1298
1299         RS=Tony Chang.
1300
1301         r81977 moved FontPlatformData.h from
1302         WebCore/platform/graphics/cocoa to platform/graphics. This
1303         change updates the chromium build accordingly.
1304
1305         https://bugs.webkit.org/show_bug.cgi?id=57281
1306
1307         * platform/graphics/chromium/CrossProcessFontLoading.mm:
1308
1309 2011-03-28  Jer Noble  <jer.noble@apple.com>
1310
1311         Reviewed by Darin Adler.
1312
1313         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
1314         https://bugs.webkit.org/show_bug.cgi?id=57249
1315
1316         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1317         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
1318         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1319
1320 2011-03-28  Jer Noble  <jer.noble@apple.com>
1321
1322         Reviewed by Darin Adler.
1323
1324         AVFoundation can indeed support full screen.
1325
1326         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
1327         https://bugs.webkit.org/show_bug.cgi?id=57249
1328
1329         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1330         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): Return true if using
1331             the new full screen APIs.
1332         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1333
1334 2011-03-28  Eric Carlson  <eric.carlson@apple.com>
1335
1336         Reviewed by Darin Adler.
1337
1338         http streams don't always display video with AVFoundation backend
1339         https://bugs.webkit.org/show_bug.cgi?id=57203
1340
1341         No new tests, we don't currently have tests for http live streams. Changes verified manually.
1342
1343         * platform/graphics/MediaPlayer.cpp:
1344         (WebCore::MediaPlayer::MediaPlayer): Initialize m_shouldPrepareToRender.
1345         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call prepareForRendering on new engine
1346             if m_shouldPrepareToRender is set.
1347         (WebCore::MediaPlayer::prepareForRendering): Set m_shouldPrepareToRender.
1348         * platform/graphics/MediaPlayer.h:
1349
1350         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1351         (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): Don't return true until
1352             m_isAllowedToRender has been set.
1353         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Always call setUpVideoRendering,
1354             it has logic to figure out when setup is required.
1355         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Call setUpVideoRendering when we aren't
1356             using the preferred rendering mode because if we get a file's metadata between the
1357             time supportsAcceleratedRendering() and paint() are called, we will allocate a software
1358             renderer even when we prefer a layer backed renderer.
1359         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Return "unknown" until we have metadata.
1360
1361         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
1362         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1363         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use itemKVOProperties() instead of
1364             an explicit list of key path names.
1365         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): Ditto.
1366         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): metadataKeyNames renamed
1367             to assetMetadataKeyNames, return an NSArray instead of a CFArrayRef since that is what the
1368             callers need.
1369         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Return the duration of the 
1370             player item, not the asset, because AVAsset.duration always returns an indefinite time
1371             for all streaming files.
1372         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): metadataKeyNames renamed
1373             to assetMetadataKeyNames.
1374         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Do nothing until
1375             metadata is available.
1376         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
1377         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Split size calculation logic off
1378             into sizeChanged().
1379         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): New. Use AVPlayerItem.presentationSize
1380             until tracks is non-NULL so we have a size as early as possible.
1381         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetMetadataKeyNames): Renamed from metadataKeyNames.
1382         (WebCore::MediaPlayerPrivateAVFoundationObjC::itemKVOProperties): New, return an array of
1383             KVO observable properties.
1384         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to 
1385             presentationSize change.
1386
1387 2011-03-28  Anders Carlsson  <andersca@apple.com>
1388
1389         Reviewed by Sam Weinig.
1390
1391         Search field focus ring is missing
1392         https://bugs.webkit.org/show_bug.cgi?id=57270
1393         <rdar://problem/8765555>
1394
1395         Add an _automaticFocusRingDisabled method which returns YES.
1396
1397         * platform/mac/ThemeMac.mm:
1398         (-[WebCoreFlippedView _automaticFocusRingDisabled]):
1399
1400 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
1401
1402         Reviewed by Darin Adler.
1403
1404         Move more events to EventDispatcher.
1405         https://bugs.webkit.org/show_bug.cgi?id=57247
1406
1407         No functional changes, covered by existing tests.
1408
1409         * dom/EventDispatcher.cpp:
1410         (WebCore::eventTargetRespectingSVGTargetRules): Made a static function,
1411             since it's not used anywhere outside of the EventDispatcher.
1412         (WebCore::EventDispatcher::dispatchScopedEvent): Moved from Node.cpp.
1413         (WebCore::EventDispatcher::dispatchKeyEvent): Ditto.
1414         (WebCore::EventDispatcher::dispatchWheelEvent): Ditto.
1415         (WebCore::EventDispatcher::dispatchEvent): Changed to use eventTargetRespectingSVGTargetRules
1416             as a static function.
1417         * dom/EventDispatcher.h: Updated decls.
1418         * dom/Node.cpp:
1419         (WebCore::Node::dispatchScopedEvent): Replaced with calling EventDispatcher.
1420         (WebCore::Node::dispatchKeyEvent): Ditto.
1421         (WebCore::Node::dispatchWheelEvent): Ditto.
1422
1423 2011-03-28  Adele Peterson  <adele@apple.com>
1424
1425         Reviewed by Eric Seidel.
1426
1427         Fix for <rdar://problem/9112694> REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type
1428         https://bugs.webkit.org/show_bug.cgi?id=57173
1429
1430         Test: editing/spelling/grammar.html
1431
1432         * WebCore.exp.in: Add symbol for new selectionStartHasMarkerFor method.
1433         * editing/Editor.cpp:
1434         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Every use of paragraph is specific to spelling or grammar, 
1435          so to avoid confusion, we should explicitly use spellingParagraph or grammarParagraph.  In the case of this bug, 
1436          when we're consider ambiguous boundary characters (characters that could indicate word boundaries, but are used 
1437          in the middle of words too, like apostrophes), we should use the use the spellingParagraph since the spellingParagraph 
1438          is the only one operated on when this information is used.
1439          (WebCore::Editor::selectionStartHasMarkerFor): Changed from selectionStartHasSpellingMarkerFor so it can check for grammar as well as spelling.
1440         * editing/Editor.h:
1441
1442 2011-03-28  Dan Bernstein  <mitz@apple.com>
1443
1444         Reviewed by Darin Adler.
1445
1446         <rdar://problem/8895977> REGRESSION: multicol crashes with positioned elements
1447         https://bugs.webkit.org/show_bug.cgi?id=48983
1448
1449         Test: fast/multicol/paginated-layer-crash.html
1450
1451         * rendering/RenderLayer.cpp:
1452         (WebCore::RenderLayer::paintPaginatedChildLayer): Bring the logic for finding pagintating layers
1453         into sync with updatePagination() after r68069.
1454         (WebCore::RenderLayer::hitTestPaginatedChildLayer): Ditto.
1455
1456 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
1457
1458         Reviewed by Darin Adler' .
1459
1460         URLSs with non-empty username but empty hostname treat first path segment as hostname, potentially enabling XSS
1461         https://bugs.webkit.org/show_bug.cgi?id=57220
1462
1463         Test: http/tests/uri/username-with-no-hostname.html
1464
1465         * platform/KURL.cpp:
1466         (WebCore::hostPortIsEmptyButUserPassIsNot):
1467         (WebCore::KURL::parse):
1468
1469 2011-03-28  Adam Barth  <abarth@webkit.org>
1470
1471         Reviewed by Eric Seidel.
1472
1473         script-src should block inline event handlers
1474         https://bugs.webkit.org/show_bug.cgi?id=57212
1475
1476         I considered wrapping this into the canExecute check, but that approach
1477         would require passing that function a bunch of context information to
1478         behave correctly once we add support for the "options" directive that
1479         re-enables these features.
1480
1481         Test: http/tests/security/contentSecurityPolicy/script-src-none-inline-event.html
1482
1483         * bindings/js/JSLazyEventListener.cpp:
1484         (WebCore::JSLazyEventListener::initializeJSFunction):
1485             - This function was a mess.  I couldn't resist cleaning it up a
1486               bunch.  Notice that we ASSERT at the beginning of the function
1487               that scriptExecutionContext is a document and that both ways of
1488               getting the global object are the same when document->frame() is
1489               non-zero because the document must be active and there is a
1490               one-to-one relation between Frames and active Documents.
1491         * bindings/v8/V8LazyEventListener.cpp:
1492         (WebCore::V8LazyEventListener::prepareListenerObject):
1493         * page/ContentSecurityPolicy.cpp:
1494         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
1495         * page/ContentSecurityPolicy.h:
1496
1497 2011-03-28  Jeff Miller  <jeffm@apple.com>
1498
1499         Reviewed by Adam Roben.
1500
1501         ResourceError::certificate() should return a PCCERT_CONTEXT
1502         https://bugs.webkit.org/show_bug.cgi?id=57262
1503
1504         * platform/network/cf/ResourceError.h: certificate() now returns a PCCERT_CONTEXT.
1505         * platform/network/cf/ResourceErrorCF.cpp:
1506         (WebCore::ResourceError::certificate): Added.
1507
1508 2011-03-28  David Hyatt  <hyatt@apple.com>
1509
1510         Reviewed by Simon Fraser and Darin Adler.
1511
1512         https://bugs.webkit.org/show_bug.cgi?id=57221, memory corruption/crashes when positioned objects
1513         occur at the end of a line.
1514         
1515         The old code and new code for dealing with a trailing space object midpoint manipulated a raw
1516         array instead of the Vector. Otherwise this corruption would have been caught prior to check-in.
1517         
1518         I have patched the code to only go through the Vector and to make it handle the case that led to
1519         the corruption. Trailing positioned objects can occur both prior to and following the trailing space
1520         object's midpoint, so we have to be prepared to deal with both cases.
1521         
1522         This is already tested by fast/block/positioning/052.html, and that test now properly progresses
1523         like the other positioning tests did.
1524
1525         * rendering/RenderBlockLineLayout.cpp:
1526         (WebCore::RenderBlock::findNextLineBreak):
1527
1528 2011-03-28  Andrei Popescu  <andreip@google.com>
1529
1530         Reviewed by Steve Block.
1531
1532         V8IDBKeyCustom.cpp does not compile with INDEXED_DATABASE disabled
1533         https://bugs.webkit.org/show_bug.cgi?id=57100
1534
1535         Close the ENABLE guard and the namespace in the right order.
1536
1537         No new tests, just cleanup.
1538
1539         * bindings/v8/custom/V8IDBAnyCustom.cpp:
1540         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1541
1542 2011-03-28  Jeff Miller  <jeffm@apple.com>
1543
1544         Reviewed by Adam Roben.
1545
1546         Include certificate when sending a WebCore::ResourceError to UI process on Windows
1547         https://bugs.webkit.org/show_bug.cgi?id=57195
1548
1549         Add support for tracking the certificate in WebCore::ResourceError.
1550
1551         * platform/network/ResourceErrorBase.cpp:
1552         (WebCore::ResourceErrorBase::copy): Call platformCopy() to copy platform-specific fields.
1553         * platform/network/ResourceErrorBase.h:
1554         (WebCore::ResourceErrorBase::platformCopy): Added.
1555         * platform/network/cf/ResourceError.h: Added constructor that takes certificate data, shadowed platformCopy, added m_certificate.
1556         (WebCore::ResourceError::certificate): Added.
1557         * platform/network/cf/ResourceErrorCF.cpp:
1558         (WebCore::ResourceError::ResourceError): Added constructor that takes certificate data.
1559         (WebCore::ResourceError::platformLazyInit): Read any certificate from the userInfo dictionary.
1560         (WebCore::ResourceError::platformCopy): Copy m_certificate.
1561         (WebCore::ResourceError::cfError): Add any certificate data to the userInfo dictionary in the CFErrorRef.
1562
1563 2011-03-28  Jessie Berlin  <jberlin@apple.com>
1564
1565         Rubber-stamped by Adam Roben.
1566
1567         Add an extra newline to the end of the generated Inspector.idl file so that it does not
1568         trigger the Windows "no newline at at end of file" warning.
1569
1570         * inspector/generate-inspector-idl:
1571
1572 2011-03-28  Csaba Osztrogon√°c  <ossy@webkit.org>
1573
1574         Buildfix after r82125.
1575
1576         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
1577         https://bugs.webkit.org/show_bug.cgi?id=57087
1578
1579         * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Convert all char* to QString explicitly.
1580         (WebCore::MediaPlayerPrivateQt::getSupportedTypes):
1581         (WebCore::MediaPlayerPrivateQt::commitLoad):
1582
1583 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1584
1585         Unreviewed, rolling out r82099.
1586         http://trac.webkit.org/changeset/82099
1587         https://bugs.webkit.org/show_bug.cgi?id=57245
1588
1589         Breaks live edits tests on chromium. (Requested by pfeldman on
1590         #webkit).
1591
1592         * inspector/front-end/ScriptsPanel.js:
1593         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
1594         * inspector/front-end/SourceFrame.js:
1595         (WebInspector.SourceFrame.prototype._handleSave):
1596         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
1597
1598 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1599
1600         Reviewed by Yury Semikhatsky.
1601
1602         Web Inspector: brush up and rename debugger domain functions.
1603         https://bugs.webkit.org/show_bug.cgi?id=57240
1604
1605         * inspector/Inspector.json:
1606         * inspector/InspectorAgent.cpp:
1607         (WebCore::InspectorAgent::setFrontend):
1608         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
1609         * inspector/InspectorDebuggerAgent.cpp:
1610         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1611         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1612         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1613         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1614         (WebCore::InspectorDebuggerAgent::editScriptSource):
1615         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1616         (WebCore::InspectorDebuggerAgent::didParseSource):
1617         (WebCore::InspectorDebuggerAgent::failedToParseSource):
1618         (WebCore::InspectorDebuggerAgent::didPause):
1619         (WebCore::InspectorDebuggerAgent::didContinue):
1620         * inspector/InspectorDebuggerAgent.h:
1621         * inspector/front-end/DebuggerModel.js:
1622         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1623         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1624         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
1625         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
1626         (WebInspector.DebuggerDispatcher.prototype.paused):
1627         (WebInspector.DebuggerDispatcher.prototype.resumed):
1628         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
1629         (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
1630         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
1631         * inspector/front-end/ScriptsPanel.js:
1632         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
1633         * inspector/front-end/inspector.js:
1634         (WebInspector.didCreateWorker):
1635         (WebInspector.didDestroyWorker):
1636
1637 2011-03-28  David Kilzer  <ddkilzer@apple.com>
1638
1639         <http://webkit.org/b/57239> Use forward class declaration instead of including header
1640
1641         Reviewed by Dan Bernstein.
1642
1643         Adding a "using namespace WebCore;" statement in a header may
1644         cause issues when <WebCore/Length.h> is included before
1645         <CoreText/CoreText.h>.
1646
1647         Length.h defines the LengthType enum with a 'Fixed' value.
1648         CoreText.h includes MacTypes.h, which has a
1649         "typedef SInt32 Fixed;" statement, and then CoreText.h includes
1650         other headers that also use 'Fixed', but expect the typedef to
1651         be defined, not the enum.  If another header includes
1652         "using namespace WebCore;" before CoreText.h, the
1653         following compiler errors result (paths abbreviated):
1654
1655             CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous
1656             MacTypes.h:184: error: candidates are: typedef SInt32 Fixed
1657             Length.h:37: error:                 WebCore::LengthType WebCore::Fixed
1658             SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type
1659
1660         * platform/mac/HTMLConverter.h: Use forward declaration of
1661         DocumentLoader class instead of including header.  Remove the
1662         unused "using namespace WebCore;" statement.
1663
1664 2011-03-26  Dimitri Glazkov  <dglazkov@chromium.org>
1665
1666         Reviewed by Eric Seidel.
1667
1668         Introduce EventDispatcher, the new common way to fire events.
1669         https://bugs.webkit.org/show_bug.cgi?id=57168
1670
1671         The goal here is two-fold:
1672         1) reduce the need to randomly sprinkle guards around the dispatch code
1673         by creating a well-scoped abstraction for dispatching events.
1674         2) create a place where fiddly event-related things like creating event
1675         contexts for ancestors can be done lazily.
1676
1677         Additionally, with all the free-standing static functions, this code was
1678         just begging to come out of Node.cpp.
1679
1680         The first step is a near-mechanical extraction of mouse-related events
1681         from Node.cpp to EventDispatcher. For now, the call sites are just
1682         replaced with invoking EventDispatcher. Later, we can remove these methods
1683         from Node.
1684
1685         Refactoring, no functional changes.
1686
1687         * Android.mk: Added EventDispatcher to build system.
1688         * CMakeLists.txt: Ditto.
1689         * GNUmakefile.am: Ditto.
1690         * WebCore.gypi: Ditto.
1691         * WebCore.pro: Ditto.
1692         * WebCore.vcproj/WebCore.vcproj: Ditto.
1693         * WebCore.xcodeproj/project.pbxproj: Ditto.
1694         * dom/DOMAllInOne.cpp: Ditto.
1695         * dom/EventDispatcher.cpp: Added.
1696         * dom/EventDispatcher.h: Added.
1697         * dom/Node.cpp:
1698         (WebCore::Node::dispatchScopedEvent): Replaced to use EventDispatcher.
1699         (WebCore::Node::dispatchEvent): Ditto.
1700         (WebCore::Node::dispatchMouseEvent): Ditto.
1701         (WebCore::Node::dispatchSimulatedClick): Ditto.
1702         * dom/Node.h: Updated decls.
1703
1704 2011-03-28  Dan Bernstein  <mitz@apple.com>
1705
1706         Reviewed by Maciej Stachowiak.
1707
1708         <rdar://problem/9003382> Incomplete repaint of overflow in flipped lines writing modes
1709         https://bugs.webkit.org/show_bug.cgi?id=57197
1710
1711         Tests: fast/repaint/overflow-flipped-writing-mode-block.html
1712                fast/repaint/overflow-flipped-writing-mode-table.html
1713
1714         * rendering/RenderBlock.cpp:
1715         (WebCore::RenderBlock::paint): Flip the overflow rect before testing for intersection
1716         with the damage rect.
1717         * rendering/RenderTable.cpp:
1718         (WebCore::RenderTable::paint): Made the intersection check more like the one in
1719         RenderBlock::paint().
1720
1721 2011-03-28  Xiaomei Ji  <xji@chromium.org>
1722
1723         Reviewed by Ryosuke Niwa.
1724
1725         move directionOfEnclosingBlock() to be global so that it could be reused.
1726         https://bugs.webkit.org/show_bug.cgi?id=57233.
1727
1728         Provide global function directionOfEnclosingBlock(Node*) so that it could be
1729         reused in SelectionController and other functionalities that need enclosing
1730         block's direcionality, such as moving caret by word in visual order.
1731       
1732         No new functionality, so no new tests.
1733
1734         * editing/SelectionController.cpp:
1735         (WebCore::SelectionController::directionOfEnclosingBlock):
1736         * editing/htmlediting.cpp:
1737         (WebCore::directionOfEnclosingBlock):
1738         * editing/htmlediting.h:
1739
1740 2011-03-28  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
1741
1742         Reviewed by Benjamin Poulain.
1743
1744         [Qt] fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html fails
1745         https://bugs.webkit.org/show_bug.cgi?id=56825
1746
1747         Fixes for context attribute handling:
1748         - Initialize depth and stencil buffer depending on whether they
1749         are enabled in context attributes.
1750         - Always enable depth buffer when stencil buffer is enabled.
1751         - Disable stencil buffer on OpenGL ES 2.0
1752         - Cleaned up clutter code from initialization. Made code paths 
1753         more sane.
1754         - Clear mask is now set correctly in reshape().
1755
1756         Tests: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
1757
1758         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1759         (WebCore::GraphicsContext3DInternal::isValid):
1760         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
1761         (WebCore::GraphicsContext3DInternal::reshape):
1762         (WebCore::GraphicsContext3DInternal::paint):
1763         (WebCore::GraphicsContext3DInternal::getProcAddress):
1764         (WebCore::GraphicsContext3D::GraphicsContext3D):
1765         (WebCore::GraphicsContext3D::reshape):
1766         (WebCore::GraphicsContext3D::bindFramebuffer):
1767
1768 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1769
1770         Reviewed by Yury Semikhatsky.
1771
1772         Web Inspector: rename network domain events from didHappenSomething to somethingHappened.
1773         https://bugs.webkit.org/show_bug.cgi?id=57226
1774
1775         * inspector/Inspector.json:
1776         * inspector/InspectorResourceAgent.cpp:
1777         (WebCore::InspectorResourceAgent::willSendRequest):
1778         (WebCore::InspectorResourceAgent::markResourceAsCached):
1779         (WebCore::InspectorResourceAgent::didReceiveResponse):
1780         (WebCore::InspectorResourceAgent::didReceiveContentLength):
1781         (WebCore::InspectorResourceAgent::didFinishLoading):
1782         (WebCore::InspectorResourceAgent::didFailLoading):
1783         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1784         (WebCore::InspectorResourceAgent::setInitialContent):
1785         (WebCore::InspectorResourceAgent::didCommitLoad):
1786         (WebCore::InspectorResourceAgent::frameDetachedFromParent):
1787         (WebCore::InspectorResourceAgent::didCreateWebSocket):
1788         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1789         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1790         (WebCore::InspectorResourceAgent::didCloseWebSocket):
1791         * inspector/front-end/NetworkManager.js:
1792         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
1793         (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
1794         (WebInspector.NetworkDispatcher.prototype.responseReceived):
1795         (WebInspector.NetworkDispatcher.prototype.dataReceived):
1796         (WebInspector.NetworkDispatcher.prototype.loadingFinished):
1797         (WebInspector.NetworkDispatcher.prototype.loadingFailed):
1798         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1799         (WebInspector.NetworkDispatcher.prototype.frameDetached):
1800         (WebInspector.NetworkDispatcher.prototype.initialContentSet):
1801         (WebInspector.NetworkDispatcher.prototype.frameNavigated):
1802         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
1803         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
1804         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
1805         (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
1806
1807 2011-03-28  Mikhail Naganov  <mnaganov@chromium.org>
1808
1809         Reviewed by Pavel Feldman.
1810
1811         WebInspector: [Chromium] Delete native CPU profiles and heap snapshots on binding disposal.
1812         https://bugs.webkit.org/show_bug.cgi?id=57099
1813
1814         * bindings/v8/ScriptHeapSnapshot.cpp:
1815         (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
1816         * bindings/v8/ScriptHeapSnapshot.h:
1817         * bindings/v8/ScriptProfile.cpp:
1818         (WebCore::ScriptProfile::~ScriptProfile):
1819         * bindings/v8/ScriptProfile.h:
1820         * inspector/InspectorProfilerAgent.cpp:
1821         (WebCore::InspectorProfilerAgent::resetState):
1822
1823 2011-03-24  Pavel Podivilov  <podivilov@chromium.org>
1824
1825         Reviewed by Yury Semikhatsky.
1826
1827         Web Inspector: fix console messages positions in formatted scripts.
1828         https://bugs.webkit.org/show_bug.cgi?id=57010
1829
1830         * inspector/front-end/DebuggerPresentationModel.js:
1831         (WebInspector.DebuggerPresentationModel):
1832         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1833         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestMapping):
1834         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1835         (WebInspector.DebuggerPresentationModel.prototype.clearConsoleMessages):
1836         (WebInspector.DebuggerPresentationModel.prototype._reset):
1837         * inspector/front-end/ResourceTreeModel.js:
1838         (WebInspector.ResourceTreeModel.prototype.addConsoleMessage):
1839         * inspector/front-end/ScriptsPanel.js:
1840         (WebInspector.ScriptsPanel):
1841         (WebInspector.ScriptsPanel.prototype.addConsoleMessage):
1842         (WebInspector.ScriptsPanel.prototype.clearConsoleMessages):
1843         (WebInspector.ScriptsPanel.prototype._consoleMessageAdded):
1844         (WebInspector.ScriptsPanel.prototype.reset):
1845         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
1846         * inspector/front-end/SourceFile.js:
1847         (WebInspector.SourceFile):
1848         * inspector/front-end/SourceFrame.js:
1849         (WebInspector.SourceFrame.prototype.addMessage):
1850         (WebInspector.SourceFrame.prototype._addExistingMessagesToSource):
1851         (WebInspector.SourceFrame.prototype.addMessageToSource):
1852
1853 2011-03-27  Pavel Feldman  <pfeldman@chromium.org>
1854
1855         Reviewed by Yury Semikhatsky.
1856
1857         Web Inspector: refactor ResourceTreeModel to remove poor dependencies.
1858         https://bugs.webkit.org/show_bug.cgi?id=57186
1859
1860         - ResourceTreeModel is now event target (Object)
1861         - There is no ResourceTreeModel -> UI dependencies
1862         - NetworkManager -> ResourceTreeModel dependencies has been removed
1863         - NetworkManager is no longer dealing with the resources tree, it is only responsible for network events
1864         - ResourceTreeModel requests tree structure from the backend separately
1865         - Cached resources tree payload is now limited to url and type (no headers involved)
1866         - Resources tree is being rendered lazily upon request from the panel.
1867
1868         * inspector/Inspector.json:
1869         * inspector/InspectorResourceAgent.cpp:
1870         (WebCore::InspectorResourceAgent::resourceContent):
1871         (WebCore::InspectorResourceAgent::resourceContentBase64):
1872         (WebCore::buildObjectForFrameTree):
1873         (WebCore::InspectorResourceAgent::enable):
1874         (WebCore::InspectorResourceAgent::getCachedResources):
1875         (WebCore::InspectorResourceAgent::getResourceContent):
1876         * inspector/InspectorResourceAgent.h:
1877         * inspector/InspectorStyleSheet.cpp:
1878         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1879         * inspector/front-end/InspectorFrontendHostStub.js:
1880         (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
1881         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
1882         * inspector/front-end/NetworkManager.js:
1883         (WebInspector.NetworkManager):
1884         (WebInspector.NetworkManager.prototype.frontendReused):
1885         (WebInspector.NetworkManager.prototype.requestContent):
1886         (WebInspector.NetworkDispatcher):
1887         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
1888         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
1889         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
1890         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
1891         * inspector/front-end/NetworkPanel.js:
1892         (WebInspector.NetworkPanel):
1893         (WebInspector.NetworkPanel.prototype._updateSummaryBar):
1894         (WebInspector.NetworkPanel.prototype._onFrameCommitLoad):
1895         * inspector/front-end/ResourceTreeModel.js:
1896         (WebInspector.ResourceTreeModel):
1897         (WebInspector.ResourceTreeModel.prototype.frontendReused):
1898         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
1899         (WebInspector.ResourceTreeModel.prototype._addOrUpdateFrame):
1900         (WebInspector.ResourceTreeModel.prototype.frames):
1901         (WebInspector.ResourceTreeModel.prototype.subframes):
1902         (WebInspector.ResourceTreeModel.prototype.resources):
1903         (WebInspector.ResourceTreeModel.prototype._onCommitLoad):
1904         (WebInspector.ResourceTreeModel.prototype._onFrameDetachedFromParent):
1905         (WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
1906         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
1907         (WebInspector.ResourceTreeModel.prototype.resourceForURL):
1908         (WebInspector.ResourceTreeModel.prototype._bindResourceURL):
1909         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
1910         (WebInspector.ResourceTreeModel.prototype._clearResources):
1911         (WebInspector.ResourceTreeModel.prototype._callForFrameResources):
1912         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
1913         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1914         (WebInspector.ResourceTreeModel.prototype._createResource):
1915         * inspector/front-end/ResourcesPanel.js:
1916         (WebInspector.ResourcesPanel):
1917         (WebInspector.ResourcesPanel.prototype.show):
1918         (WebInspector.ResourcesPanel.prototype._populateResourceTree.populateFrame):
1919         (WebInspector.ResourcesPanel.prototype._populateResourceTree):
1920         (WebInspector.ResourcesPanel.prototype._frameAdded):
1921         (WebInspector.ResourcesPanel.prototype._frameDetached):
1922         (WebInspector.ResourcesPanel.prototype._resourceAdded):
1923         (WebInspector.ResourcesPanel.prototype._frameNavigated):
1924         (WebInspector.FrameTreeElement.prototype.setTitles):
1925         * inspector/front-end/inspector.js:
1926         (WebInspector.frontendReused):
1927
1928 2011-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1929
1930         Reviewed by Eric Seidel.
1931
1932         WebKit's behavior for text-align inherit differs from other browsers
1933         https://bugs.webkit.org/show_bug.cgi?id=56377
1934
1935         The bug was caused by WebKit's resolving text-align: start and text-align: end too early.
1936         As discussed on the bug, when text-align: start and text-align: end are inherited by descendent nodes,
1937         the alignment of the text in those nodes should be determined based on the directionality of the text,
1938         not by the directionality of the ancestor node from which text-align property is inherited.
1939
1940         Fixed the bug by introducing new enum values to ETextAlign: TASTART and TAEND. These two values will
1941         align text to the left in a LTR context and to the right in a RTL context respectively.
1942
1943         * css/CSSPrimitiveValueMappings.h:
1944         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added the support for TASTART and TAEND.
1945         (WebCore::CSSPrimitiveValue::operator ETextAlign): Ditto.
1946         * css/CSSStyleSelector.cpp:
1947         (WebCore::CSSStyleSelector::applyProperty): No longer processes CSSValueStart and CSSValueEnd.
1948         * rendering/RenderBlock.cpp:
1949         (WebCore::RenderBlock::localCaretRect): Added the support for TASTART and TAEND.
1950         * rendering/RenderBlockLineLayout.cpp:
1951         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added the support for TASTART and TAEND.
1952         * rendering/RenderText.cpp:
1953         (WebCore::RenderText::localCaretRect): Ditto.
1954         * rendering/style/RenderStyle.h: ETextAlign now has 10 values and requires 4 bits.
1955         * rendering/style/RenderStyleConstants.h: Added TASTART and TAEND to ETextAlign.
1956
1957 2011-03-28  Pavel Podivilov  <podivilov@chromium.org>
1958
1959         Reviewed by Yury Semikhatsky.
1960
1961         Web Inspector: fix breakpoints positions in formatted scripts.
1962         https://bugs.webkit.org/show_bug.cgi?id=56931
1963
1964         Add async requestMapping method to SourceFile interface as required for populating
1965         breakpoints sidebar pane when in "format all scripts" mode.
1966
1967         * inspector/front-end/DebuggerPresentationModel.js:
1968         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1969         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didRequestSourceMapping):
1970         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
1971         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1972         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1973         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.didRequestSourceMapping):
1974         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
1975         (WebInspector.PresentationBreakpoint): Breakpoint wrapper for UI.
1976         (WebInspector.PresentationBreakpoint.prototype.get sourceFileId):
1977         (WebInspector.PresentationBreakpoint.prototype.get lineNumber):
1978         (WebInspector.PresentationBreakpoint.prototype.get condition):
1979         (WebInspector.PresentationBreakpoint.prototype.get enabled):
1980         (WebInspector.PresentationBreakpoint.prototype.get url):
1981         (WebInspector.PresentationBreakpoint.prototype.get resolved):
1982         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
1983         * inspector/front-end/ScriptFormatter.js:
1984         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
1985         (WebInspector.ScriptFormatter.prototype.formatContent):
1986         * inspector/front-end/SourceFile.js:
1987         (WebInspector.SourceFile.prototype.requestSourceMapping):
1988         (WebInspector.FormattedSourceFile.prototype.requestSourceMapping):
1989         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
1990         (WebInspector.SourceMapping):
1991         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLocation):
1992         (WebInspector.SourceMapping.prototype.sourceLocationToScriptLocation):
1993         (WebInspector.FormattedSourceMapping):
1994         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLocation):
1995         (WebInspector.FormattedSourceMapping.prototype.sourceLocationToScriptLocation):
1996         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
1997
1998 2011-03-28  Nancy Piedra  <nancy.piedra@nokia.com>
1999
2000         Reviewed by Csaba Osztrogon√°c.
2001
2002         This patch fixes linking errors on Qt Webkit Windows MinGW builds.
2003         This patch sets the BUILDING_WEBKIT & QT_MAKEDLL macros so that
2004         QWEBKIT_EXPORT is defined as follows:
2005         #define QWEBKIT_EXPORT Q_DECL_EXPORT
2006
2007         No new tests needed since only changing .pro file.
2008
2009         * WebCore.pro:
2010
2011 2011-03-28  Andrey Adaikin  <aandrey@google.com>
2012
2013         Reviewed by Yury Semikhatsky.
2014
2015         Web Inspector: source frame should show the error to user when live edit is failed
2016         https://bugs.webkit.org/show_bug.cgi?id=57002
2017
2018         * inspector/front-end/ScriptsPanel.js:
2019         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
2020         * inspector/front-end/SourceFrame.js:
2021         (WebInspector.SourceFrame.prototype._handleSave.didSaveScriptSource):
2022         (WebInspector.SourceFrame.prototype._handleSave):
2023         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
2024
2025 2011-03-26  Mario Sanchez Prada  <msanchez@igalia.com>
2026
2027         Reviewed by Martin Robinson.
2028
2029         [GTK] Expose the AtkValue interface for WAI-ARIA sliders
2030         https://bugs.webkit.org/show_bug.cgi?id=56655
2031
2032         Implement AtkValue interface for WAI-ARIA sliders.
2033
2034         Test: platform/gtk/accessibility/aria-slider-required-attributes.html
2035
2036         * accessibility/gtk/AXObjectCacheAtk.cpp:
2037         (WebCore::AXObjectCache::postPlatformNotification): Emit the
2038         'property-change::accessible-value' signal when needed.
2039
2040         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2041         (core): New, returns a core object from an AtkValue.
2042         (webkitAccessibleValueGetCurrentValue): New, implements AtkValue.
2043         (webkitAccessibleValueGetMaximumValue): Ditto.
2044         (webkitAccessibleValueGetMinimumValue): Ditto.
2045         (webkitAccessibleValueSetCurrentValue): Ditto.
2046         (webkitAccessibleValueGetMinimumIncrement): Ditto.
2047         (atkValueInterfaceInit): Ditto.
2048         (GetAtkInterfaceTypeFromWAIType): Add ATK_TYPE_VALUE.
2049         (getInterfaceMaskFromObject): Set the WAI_VALUE bit for sliders.
2050
2051 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
2052
2053         Reviewed by Dan Bernstein.
2054
2055         Assigning location.path to something that doesn't start with / mangles the authority
2056         https://bugs.webkit.org/show_bug.cgi?id=57209
2057         <rdar://problem/9195132>
2058         
2059         Tests: http/tests/uri/assign-path-with-leading-slash.html
2060                http/tests/uri/assign-path-without-leading-slash.html
2061
2062         * platform/KURL.cpp:
2063         (WebCore::KURL::setPath): If the new path does not have a leading slash, add one.
2064
2065 2011-03-28  Ryosuke Niwa  <rniwa@webkit.org>
2066
2067         Reviewed by Eric Seidel.
2068
2069         Extract functions to update logical width from computeInlineDirectionPositionsForLine
2070         https://bugs.webkit.org/show_bug.cgi?id=57213
2071
2072         Extracted updateLogicalWidthForLeftAlignedBlock, updateLogicalWidthForRightAlignedBlock,
2073         and updateLogicalWidthForCenterAlignedBlock from computeInlineDirectionPositionsForLine.
2074
2075         They are used to update logical widths, logical left, and total logical width for left,
2076         right, and center aligned blocks.
2077
2078         * rendering/RenderBlockLineLayout.cpp:
2079         (WebCore::updateLogicalWidthForLeftAlignedBlock):
2080         (WebCore::updateLogicalWidthForRightAlignedBlock):
2081         (WebCore::updateLogicalWidthForCenterAlignedBlock):
2082         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2083
2084 2011-03-28  Evan Martin  <evan@chromium.org>
2085
2086         Reviewed by Ryosuke Niwa.
2087
2088         Refactor duplicate code in HTMLTextElement
2089         https://bugs.webkit.org/show_bug.cgi?id=57215
2090
2091         * html/HTMLTitleElement.cpp:
2092         (WebCore::HTMLTitleElement::childrenChanged):
2093         This method did an equivalent loop to the text() method on
2094         the same object.
2095
2096 2011-03-27  Fumitoshi Ukai  <ukai@chromium.org>
2097
2098         Reviewed by Alexey Proskuryakov.
2099
2100         Don't call WebSocket::didClose() more than once.
2101         https://bugs.webkit.org/show_bug.cgi?id=57081
2102
2103         If WebSocket close() is called, and connection is established, then
2104         it will call didClose() that resets m_channel to 0.
2105         After that, when connection is closed, WebSocketChannel will call
2106         didClose for the WebSocket instance.
2107
2108         Call WebSocketChannel::disconnect() before m_channel = 0 to make sure
2109         WebSocketChannel suppress the second didClose().
2110
2111         Test: http/tests/websocket/tests/close-unref-websocket.html
2112
2113         * websockets/WebSocket.cpp:
2114         (WebCore::WebSocket::didClose):
2115
2116 2011-03-27  Adam Barth  <abarth@webkit.org>
2117
2118         Reviewed by Eric Seidel.
2119
2120         Fix script-src redirect handling
2121         https://bugs.webkit.org/show_bug.cgi?id=57196
2122
2123         Resource-loading requirements in CSP apply to each hop in the redirect
2124         chain.  To make that work properly, we need to move enforcement into
2125         the loader.  Fortunately, we already have a choke-point in the loader
2126         for enforcing this kind of policy.
2127
2128         * dom/ScriptElement.cpp:
2129         (WebCore::ScriptElement::requestScript):
2130         * html/parser/HTMLDocumentParser.cpp:
2131         * html/parser/HTMLDocumentParser.h:
2132         * html/parser/HTMLScriptRunnerHost.h:
2133         * loader/cache/CachedResourceLoader.cpp:
2134         (WebCore::CachedResourceLoader::canRequest):
2135         * page/ContentSecurityPolicy.cpp:
2136         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
2137         * page/ContentSecurityPolicy.h:
2138
2139 2011-03-27  Jer Noble  <jer.noble@apple.com>
2140
2141         Reviewed by Maciej Stachowiak.
2142
2143         Full Screen: disable keyboard access by default
2144         https://bugs.webkit.org/show_bug.cgi?id=56684
2145
2146         Pass whether keyboard access was requested up to ChromeClient when asking
2147         if fullscreen mode is supported.
2148
2149         * dom/Document.cpp:
2150         (WebCore::Document::webkitRequestFullScreenForElement):
2151         * page/ChromeClient.h:
2152         (WebCore::ChromeClient::supportsFullscreenForElement):
2153
2154 2011-03-27  Patrick Gansterer  <paroga@webkit.org>
2155
2156         Reviewed by Andreas Kling.
2157
2158         [CMake] Generate WebKitVersion.h
2159         https://bugs.webkit.org/show_bug.cgi?id=57128
2160
2161         This file will be used for the user agent string by the CMake based ports.
2162
2163         * CMakeLists.txt:
2164
2165 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
2166
2167         Reviewed by Alexey Proskuryakov.
2168
2169         https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
2170         in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
2171
2172         Compile fix only, no actual code change.
2173
2174         * dom/ExceptionCode.h:
2175         * editing/EditorInsertAction.h:
2176         * loader/FrameLoaderTypes.h:
2177         * platform/PlatformKeyboardEvent.h:
2178         * platform/ScrollTypes.h:
2179         * platform/graphics/BitmapImage.h:
2180         * platform/image-decoders/ImageDecoder.h:
2181         * platform/network/ProtectionSpace.h:
2182         * platform/network/ResourceHandleClient.h:
2183         * platform/network/ResourceRequestBase.h:
2184         * platform/text/TextCodec.h:
2185
2186 2011-03-27  Rob Buis  <rwlbuis@gmail.com>
2187
2188         Reviewed by Nikolas Zimmermann.
2189
2190         Text on path positioning at zero startOffset
2191         https://bugs.webkit.org/show_bug.cgi?id=56245
2192
2193         Since for length 0 no previous point is set, choose epsilon
2194         length to get normal at starting point of the path.
2195
2196         Test: svg/text/text-path-middle-align.svg
2197
2198         * platform/graphics/Path.cpp:
2199         (WebCore::Path::normalAngleAtLength):
2200
2201 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
2202
2203         Reviewed by Oliver Hunt.
2204
2205         https://bugs.webkit.org/show_bug.cgi?id=57151, patch derived from set
2206         created by Thiago Macieria in bug https://bugs.webkit.org/show_bug.cgi?id=24932
2207
2208         Fix compile issue on Solaris 10/Sun Studio 12 regarding ambiguity on ?: functions
2209
2210         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2211         (WebCore::JSJavaScriptCallFrame::thisObject):
2212
2213 2011-03-26  Jer Noble  <jer.noble@apple.com>
2214
2215         Unreviewed build fix.
2216
2217         Fix a bug which was causing the "skip back" button to be missing, causing 
2218         the media layout tests to fail.
2219
2220         * rendering/RenderThemeMac.mm:
2221         (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
2222
2223 2011-03-26  Dan Bernstein  <mitz@apple.com>
2224
2225         Reviewed by Maciej Stachowiak.
2226
2227         <rdar://problem/9180716> REGRESSION (r80582): Angle bracket rendered upright in vertical mode
2228         https://bugs.webkit.org/show_bug.cgi?id=57169
2229
2230         Test: fast/blockflow/fallback-orientation.html
2231
2232         * platform/graphics/FontFastPath.cpp:
2233         (WebCore::Font::glyphDataForCharacter): If the font has vertical glyphs, use it, rather
2234         than continuing down the fallback list.
2235
2236 2011-03-26  Maciej Stachowiak  <mjs@apple.com>
2237
2238         Reviewed by Darin Adler.
2239
2240         Follow-up fix for crash with giant inline stylesheets - actually don't crash, and add test
2241         https://bugs.webkit.org/show_bug.cgi?id=56150
2242
2243         Test: fast/css/giant-stylesheet-crash.html
2244
2245         * dom/StyleElement.cpp:
2246         (WebCore::StyleElement::process):
2247
2248 2011-03-22  Jer Noble  <jer.noble@apple.com>
2249
2250         Reviewed by Eric Carlson.
2251
2252         Media controls must use full screen style when in new full screen mode.
2253         https://bugs.webkit.org/show_bug.cgi?id=56851
2254
2255         Add new full screen styles for the full screen media elements.
2256
2257         * DerivedSources.make: Add fullScreenQuickTime.css.
2258         * WebCore.xcodeproj/project.pbxproj: Ditto.
2259         * css/CSSStyleSelector.cpp: Removed loadFullScreenRulesIfNeeded().
2260         (WebCore::CSSStyleSelector::CSSStyleSelector): Ditto.
2261         (WebCore::CSSStyleSelector::styleForElement): Load full screen rules 
2262             if needed.
2263         * css/fullscreenQuickTime.css: Added.
2264         * css/mediaControls.css:
2265         * html/shadow/MediaControls.cpp:
2266         (WebCore::isFullScreen): Added.
2267         (WebCore::MediaControls::create): Add new full screen volume controls.
2268         (WebCore::MediaControls::updateStyle): Ditto.
2269         (WebCore::MediaControls::update): Ditto.
2270         (WebCore::MediaControls::updateVolumeSliderContainer): Ditto.
2271         (WebCore::MediaControls::forwardEvent): Ditto.
2272         * rendering/MediaControlElements.cpp:
2273         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Added.
2274         (WebCore::MediaControlFullscreenVolumeSliderElement::create): Added.
2275         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Added.
2276         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Addet
2277         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): Added.
2278         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Added.
2279         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Added.
2280         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Added.
2281         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): Added.
2282         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Added.
2283         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Added.
2284         * rendering/MediaControlElements.h:
2285             Added m_overridePosition.
2286         (WebCore::MediaControlVolumeSliderContainerElement::setOverridesPosition): Added.
2287         * rendering/MediaControlElements.h:
2288         (WebCore::MediaControlVolumeSliderContainerElement::overridesPosition): Added.
2289         * rendering/RenderTheme.h:
2290         (WebCore::RenderTheme::extraFullScreenStyleSheet): Added.
2291         * rendering/RenderThemeMac.h:
2292         * rendering/RenderThemeMac.mm:
2293         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Added.
2294         (WebCore::RenderThemeMac::shouldRenderMediaControlPart): Render seek forward and backward 
2295             buttons.
2296
2297 2011-03-26  Jer Noble  <jer.noble@apple.com>
2298
2299         Reviewed by Dan Bernstein.
2300
2301         RenderMedia should obey the view's flattening bit.
2302         https://bugs.webkit.org/show_bug.cgi?id=57156
2303
2304         Paint the current frame in software when the associated FrameView
2305         has its flattening bit set.
2306
2307         * rendering/RenderVideo.cpp:
2308         (WebCore::RenderVideo::paintReplaced):
2309
2310 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
2311
2312         Unreviewed build fix for !ENABLE(DOM_STORAGE).
2313
2314         * storage/StorageTracker.cpp:
2315             Added #if ENABLE(DOM_STORAGE) like in the other storage files.
2316
2317 2011-03-26  Kwang Yul Seo  <skyul@company100.net>
2318
2319         Reviewed by Benjamin Poulain.
2320
2321         [Qt] Remove GraphicsLayerTextureMapper::nativeLayer
2322         https://bugs.webkit.org/show_bug.cgi?id=57141
2323
2324         GraphicsLayer::nativeLayer was removed in r73380.
2325
2326         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2327         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2328
2329 2011-03-26  Adam Barth  <abarth@webkit.org>
2330
2331         Reviewed by Eric Seidel.
2332
2333         Teach Content Security Policy how to parse source-list
2334         https://bugs.webkit.org/show_bug.cgi?id=54799
2335
2336         This patch is larger than I would like, but I wasn't sure how to make
2337         it any smaller while still being reasonably testable.  I've left out
2338         some features (such as host wildcarding and 'self') so I can add them
2339         in later patches with tests.
2340
2341         Test: http/tests/security/contentSecurityPolicy/source-list-parsing.html
2342
2343         * bindings/ScriptControllerBase.cpp:
2344         * dom/ScriptElement.cpp:
2345         * html/parser/HTMLDocumentParser.cpp:
2346         * loader/FrameLoader.cpp:
2347             - Add include explicitly now that we're not spamming the include
2348               everywhere.
2349         * dom/Document.cpp:
2350         (WebCore::Document::initSecurityContext):
2351             - We need to pass the SecurityOrigin object to
2352               ContentSecurityPolicy so that it can resolve implicit parts of
2353               source patterns, such as the scheme.
2354         * dom/Document.h:
2355             - Forward declare ContentSecurityPolicy rather than including the
2356               header.  Technically this could be a separate change, but I was
2357               getting annoyed at the world re-builds.
2358         * page/ContentSecurityPolicy.cpp:
2359         (WebCore::skipExactly):
2360         (WebCore::skipUtil):
2361         (WebCore::skipWhile):
2362             - Clean up these parser helper functions.  We might consider moving
2363               them to a more general location.  They're very helpful for
2364               writing secure HTTP header parsers.
2365         (WebCore::CSPSource::CSPSource):
2366             - New class to represent one source in a source-list.
2367         (WebCore::CSPSource::matches):
2368         (WebCore::CSPSource::schemeMatches):
2369         (WebCore::CSPSource::hostMatches):
2370         (WebCore::CSPSource::portMatches):
2371         (WebCore::CSPSource::isSchemeOnly):
2372             - Currently we represent scheme-only sources using with an empty
2373               m_host.  Another approach I considered was using another bool,
2374               but that seemed slighly messier.
2375         (WebCore::CSPSourceList::CSPSourceList):
2376             - CSPSourceList doesn't need to ref SecurityOrigin because
2377               CSPSourceList is owned by ContentSecurityPolicy, which holds a
2378               ref.
2379         (WebCore::CSPSourceList::parse):
2380         (WebCore::CSPSourceList::matches):
2381         (WebCore::CSPSourceList::parseSource):
2382         (WebCore::CSPSourceList::parseScheme):
2383         (WebCore::CSPSourceList::parseHost):
2384         (WebCore::CSPSourceList::parsePort):
2385             - A basic "segment and recurse" parser.  This parser causes us to
2386               take more branches than we need, but I don't think we need to
2387               squeeze every last ouch of performance out of this parser.  This
2388               approach is more simple than some of the other approaches I
2389               tried.
2390         (WebCore::CSPSourceList::addSourceSelf):
2391         (WebCore::CSPDirective::CSPDirective):
2392         (WebCore::CSPDirective::allows):
2393         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
2394         (WebCore::ContentSecurityPolicy::parse):
2395         (WebCore::ContentSecurityPolicy::parseDirective):
2396         (WebCore::ContentSecurityPolicy::addDirective):
2397             - I couldn't resist re-writing this parser to use the helper
2398               functions and to match the style of the source-list parser.
2399         * page/ContentSecurityPolicy.h:
2400         (WebCore::ContentSecurityPolicy::create):
2401             - Accept a SecurityOrigin context object.
2402
2403 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
2404
2405         Unreviewed EFL and WinCE build fix for r81977.
2406
2407         * platform/graphics/FontPlatformData.h:
2408
2409 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
2410
2411         Unreviewed WinCE build fix for r82000.
2412
2413         * platform/wince/FileSystemWinCE.cpp:
2414         (WebCore::openFile): Added missing function.
2415
2416 2011-03-25  Kevin Ollivier  <kevino@theolliviers.com>
2417
2418         [wx] Build fix, don't use the new FPD implementation yet, until we can merge ours with it.
2419
2420         * platform/graphics/FontPlatformData.h:
2421
2422 2011-03-25  Jer Noble  <jer.noble@apple.com>
2423
2424         Reviewed by Eric Carlson.
2425
2426         MediaPlayerPrivateQuickTimeVisualContext should use the Application Cache during load.
2427         https://bugs.webkit.org/show_bug.cgi?id=57047
2428
2429         No new tests.
2430         
2431         When loading a URL, checkk osee if the Appplication Cache has a version of that URL
2432         stored; if so, use the local path to that cached media instead of the remote URL.
2433
2434         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2435         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal):
2436         * platform/graphics/win/QTMovie.cpp:
2437         (QTMovie::loadPath):
2438         * platform/graphics/win/QTMovie.h:
2439
2440 2011-03-25  Dan Bernstein  <mitz@apple.com>
2441
2442         Reviewed by Darin Adler.
2443
2444         <rdar://problem/9134330> Missing expansion before ideograph at the beginning or end of a text run
2445         https://bugs.webkit.org/show_bug.cgi?id=57106
2446
2447         Test: fast/text/justify-ideograph-leading-expansion.html
2448
2449         * platform/graphics/TextRun.h:
2450         Replaced TrailingExpansionBehavior enum with ExpansionBehavior flags.
2451         (WebCore::TextRun::TextRun): Constructors now take an expansionBehavior parameter.
2452         (WebCore::TextRun::allowsLeadingExpansion): Added this accessor.
2453         (WebCore::TextRun::allowsTrailingExpansion): Changed to use the m_expansionBehavior member.
2454         * platform/graphics/WidthIterator.cpp:
2455         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion from the TextRun, allowing
2456         leading expansion when appropriate.
2457         (WebCore::WidthIterator::advance): Moved the last-glyph-in-run check to only apply to expansion
2458         after the glyph, not expansion before the glyph, since that is not trailing expansion. Added code
2459         to handle expansion before the first glyph.
2460         * platform/graphics/mac/ComplexTextController.cpp:
2461         (WebCore::ComplexTextController::ComplexTextController): Initialize m_afterExpansion from the
2462         TextRun, allowing leading expansion when appropriate. Set m_runWidthSoFar to the leading expansion.
2463         (WebCore::ComplexTextController::offsetForPosition): Account for leading expansion.
2464         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Similar to WidthIterator::advance()
2465         * platform/graphics/mac/ComplexTextController.h: Added m_leadingExpansion member variable.
2466         * rendering/InlineBox.h:
2467         (WebCore::InlineBox::InlineBox): Renamed m_hasSelectedChildren to m_hasSelectedChildrenOrCanHaveLeadingExpansion
2468         to reflect the use of this bit by InlineTextBox.
2469         * rendering/InlineTextBox.cpp:
2470         (WebCore::InlineTextBox::selectionRect): Replaced calls to trailingExpansionBehavior() with expansionBehavior().
2471         (WebCore::InlineTextBox::paint): Ditto.
2472         (WebCore::InlineTextBox::paintSelection): Ditto.
2473         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
2474         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
2475         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
2476         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
2477         (WebCore::InlineTextBox::offsetForPosition): Ditto.
2478         (WebCore::InlineTextBox::positionForOffset): Ditto.
2479         * rendering/InlineTextBox.h:
2480         (WebCore::InlineTextBox::canHaveLeadingExpansion): Added this accessor.
2481         (WebCore::InlineTextBox::setCanHaveLeadingExpansion): Ditto.
2482         (WebCore::InlineTextBox::expansionBehavior): Replaced trailingExpansionBehavior() with this function,
2483         which also considers canHaveLeadingExpansion().
2484         * rendering/RenderBlockLineLayout.cpp:
2485         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Call setCanHaveLeadingExpansion() on
2486         text boxes that can have leading expansion. Avoid negative expansion.
2487         * rendering/RootInlineBox.cpp:
2488         * rendering/RootInlineBox.h:
2489         (WebCore::RootInlineBox::hasSelectedChildren): Updated for renaming of the flag.
2490         (WebCore::RootInlineBox::setHasSelectedChildren): Ditto.
2491
2492 2011-03-23  Jer Noble  <jer.noble@apple.com>
2493
2494         Reviewed by Maciej Stachowiak.
2495
2496         MediaPlayerPrivateAVFoundation should use the Application Cache during load.
2497         https://bugs.webkit.org/show_bug.cgi?id=56997
2498
2499         No new tests.
2500
2501         When loading a URL, check to see if the Application Cache has a version of that URL
2502         stored; if so, use the local path to that cached media instead of the remote URL.
2503
2504         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2505         (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Check to see if the media should be loaded
2506             from the application cache.
2507         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2508         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
2509         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2510         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL):
2511         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForCacheResource): Added.
2512         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Split out from createAVPlayerForURL.
2513
2514 2011-03-25  Ben Taylor  <bentaylor.solx86@gmail.com>
2515
2516         Reviewed by Darin Adler.
2517
2518         https://bugs.webkit.org/show_bug.cgi?id=57122. Solaris 10/SunStudio 12 expect
2519         both sides of a ?: operation to have the same types.  Extracted from original
2520         https://bugs.webkit.org/show_bug.cgi?id=24932, patch 13 of 17, and originally
2521         created by Thiago Macieira.
2522
2523         fixes a compile issue on Solaris 10/SunStudio 12
2524
2525         * loader/DocumentLoader.h:
2526         (WebCore::DocumentLoader::serverRedirectSourceForHistory):
2527         * loader/FrameLoader.cpp:
2528         (WebCore::FrameLoader::load):
2529         (WebCore::FrameLoader::loadWithNavigationAction):
2530
2531 2011-02-03  Jer Noble  <jer.noble@apple.com>
2532
2533         Reviewed by Maciej Stachowiak.
2534
2535         MediaPlayerPrivateQTKit should use the Application Cache during load.        
2536         https://bugs.webkit.org/show_bug.cgi?id=53818
2537
2538         No new tests.
2539
2540         When loading a URL, check to see if the Application Cache has a version of that URL
2541         stored; if so, use that data instead of the remote URL.
2542
2543         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2544         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2545         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
2546         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
2547         (WebCore::MediaPlayerPrivateQTKit::loadInternal):
2548
2549 2011-03-25  James Robinson  <jamesr@chromium.org>
2550
2551         Reviewed by Kenneth Russell.
2552
2553         [chromium] Move draw implementations to CCLayerImpl for everything except content layers
2554         https://bugs.webkit.org/show_bug.cgi?id=56793
2555
2556         Moves the implementation of the layer's draw() function from LayerChromium subclasses to CCLayerImpl subclasses for
2557         all layer types except content layers.  This gets us closer to decoupling the composite step itself from updating the layers.
2558
2559         The biggest change in this patch is adding a set of CCLayerImpl subclasses to implement the different drawing routines
2560         and moving the code from each XXXLayerChromium to CCXXXLayerImpl.  In order to render from the CCLayerImpl side all state
2561         needed at draw time also has to be synchronized, which is performed in pushPropertiesTo().
2562
2563         On the LayerRendererChromium side there are a few changes.  I've split the updateContents calls on LayerChromiums into two operations
2564         tentatively named 'paintContentsIfNeeded' and 'updateCompositorResources'.  paintContents() is used for any code that calls into WebKit in order to generate
2565         new pixel data.  It's expected that this call may take a long period of time and may involve "odd" side effects.  updateCompositorResources() is used for
2566         code that needs to update the compositor's texture data or other state.  It is not expected that this callback will take long (since it's just inserting
2567         commands into the GL command stream, ideally) and this call is expected to have access to the compositor's context, unlike paintContents().
2568
2569         The updateAndDrawLayers cycle now looks like this:
2570         1.) update the root content layer
2571         2.) update the root layer scrollbars
2572         3.) for each LayerChromium in tree order:
2573           a.) ensure a CCLayerImpl of the correct type exists for this layer
2574           b.) push all draw time properties from the LayerChromium to the CCLayerImpl
2575           c.) construct the appropriate draw transforms, render surfaces and render surface z-order sublayer lists
2576         4.) for each LayerChromium in tree order, paint the layer's contents
2577         5.) for each LayerChromium in tree order, update the associate compositor resources (textures, etc)
2578         6.) draw the root layer and its scrollbars
2579         7.) for each CCLayerImpl in render surface order, draw it
2580
2581         Step 3 should really happen after step 5, but right now painting a content layer requires knowledge of the render surface properties and draw transforms
2582         in order to paint.  We also currently push layer properties from LayerChromium->CCLayerImpls twice now - once at 3.b and once after 5 so we can pick
2583         up any texture updates.  This will also get fixed when the paint dependency on render surfaces is resolved.
2584
2585         I haven't modified the root layer or content layers in order to minimize conflicts with the other pending work in that area.
2586
2587         Tests: compositing/
2588
2589         * WebCore.gypi:
2590         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2591         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2592         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2593         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2594         (WebCore::CanvasLayerChromium::createCCLayerImpl):
2595         (WebCore::CanvasLayerChromium::pushPropertiesTo):
2596         * platform/graphics/chromium/CanvasLayerChromium.h:
2597         * platform/graphics/chromium/ContentLayerChromium.cpp:
2598         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
2599         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2600         (WebCore::ContentLayerChromium::updateCompositorResources):
2601         (WebCore::ContentLayerChromium::bindContentsTexture):
2602         * platform/graphics/chromium/ContentLayerChromium.h:
2603         * platform/graphics/chromium/ImageLayerChromium.cpp:
2604         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2605         * platform/graphics/chromium/ImageLayerChromium.h:
2606         * platform/graphics/chromium/LayerChromium.cpp:
2607         (WebCore::LayerChromium::LayerChromium):
2608         (WebCore::LayerChromium::cleanupResources):
2609         (WebCore::LayerChromium::setLayerRenderer):
2610         (WebCore::LayerChromium::setName):
2611         (WebCore::LayerChromium::pushPropertiesTo):
2612         (WebCore::LayerChromium::dumpLayer):
2613         (WebCore::LayerChromium::createCCLayerImpl):
2614         (WebCore::LayerChromium::createCCLayerImplIfNeeded):
2615         (WebCore::LayerChromium::ccLayerImpl):
2616         (WebCore::LayerChromium::layerRenderer):
2617         * platform/graphics/chromium/LayerChromium.h:
2618         (WebCore::LayerChromium::paintContentsIfDirty):
2619         (WebCore::LayerChromium::updateCompositorResources):
2620         * platform/graphics/chromium/LayerRendererChromium.cpp:
2621         (WebCore::LayerRendererChromium::updateLayers):
2622         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2623         (WebCore::LayerRendererChromium::paintContentsRecursive):
2624         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
2625         (WebCore::LayerRendererChromium::drawLayer):
2626         (WebCore::LayerRendererChromium::initializeSharedObjects):
2627         * platform/graphics/chromium/LayerRendererChromium.h:
2628         (WebCore::LayerRendererChromium::canvasLayerProgram):
2629         (WebCore::LayerRendererChromium::pluginLayerProgram):
2630         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
2631         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
2632         * platform/graphics/chromium/PluginLayerChromium.cpp:
2633         (WebCore::PluginLayerChromium::createCCLayerImpl):
2634         (WebCore::PluginLayerChromium::setTextureId):
2635         (WebCore::PluginLayerChromium::pushPropertiesTo):
2636         * platform/graphics/chromium/PluginLayerChromium.h:
2637         (WebCore::PluginLayerChromium::textureId):
2638         * platform/graphics/chromium/VideoLayerChromium.cpp:
2639         (WebCore::VideoLayerChromium::createCCLayerImpl):
2640         (WebCore::VideoLayerChromium::updateCompositorResources):
2641         (WebCore::VideoLayerChromium::pushPropertiesTo):
2642         * platform/graphics/chromium/VideoLayerChromium.h:
2643         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2644         (WebCore::WebGLLayerChromium::updateCompositorResources):
2645         * platform/graphics/chromium/WebGLLayerChromium.h:
2646         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2647         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
2648         (WebCore::CCCanvasLayerImpl::~CCCanvasLayerImpl):
2649         (WebCore::CCCanvasLayerImpl::draw):
2650         (WebCore::CCCanvasLayerImpl::dumpLayerProperties):
2651         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2652         (WebCore::CCCanvasLayerImpl::create):
2653         (WebCore::CCCanvasLayerImpl::setTextureId):
2654         (WebCore::CCCanvasLayerImpl::setPremultipliedAlpha):
2655         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2656         (WebCore::CCLayerImpl::descendantsDrawsContent):
2657         (WebCore::CCLayerImpl::updateCompositorResources):
2658         (WebCore::CCLayerImpl::writeIndent):
2659         * platform/graphics/chromium/cc/CCLayerImpl.h:
2660         (WebCore::CCLayerImpl::setAnchorPoint):
2661         (WebCore::CCLayerImpl::setAnchorPointZ):
2662         (WebCore::CCLayerImpl::setMasksToBounds):
2663         (WebCore::CCLayerImpl::setOpacity):
2664         (WebCore::CCLayerImpl::setPosition):
2665         (WebCore::CCLayerImpl::setPreserves3D):
2666         (WebCore::CCLayerImpl::setSublayerTransform):
2667         (WebCore::CCLayerImpl::setTransform):
2668         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2669         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
2670         (WebCore::CCPluginLayerImpl::~CCPluginLayerImpl):
2671         (WebCore::CCPluginLayerImpl::draw):
2672         (WebCore::CCPluginLayerImpl::dumpLayerProperties):
2673         * platform/graphics/chromium/cc/CCPluginLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2674         (WebCore::CCPluginLayerImpl::create):
2675         (WebCore::CCPluginLayerImpl::setTextureId):
2676         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Added.
2677         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
2678         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
2679         (WebCore::CCVideoLayerImpl::setTexture):
2680         (WebCore::CCVideoLayerImpl::draw):
2681         (WebCore::CCVideoLayerImpl::drawYUV):
2682         (WebCore::CCVideoLayerImpl::drawRGBA):
2683         (WebCore::CCVideoLayerImpl::dumpLayerProperties):
2684         * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2685         (WebCore::CCVideoLayerImpl::create):
2686         (WebCore::CCVideoLayerImpl::setSkipsDraw):
2687         (WebCore::CCVideoLayerImpl::setFrameFormat):
2688
2689 2011-03-25  Oliver Hunt  <oliver@apple.com>
2690
2691         Reviewed by Darin Adler.
2692
2693         Allow defineOwnProperty to work on DOMObjects
2694         https://bugs.webkit.org/show_bug.cgi?id=57129
2695
2696         As other engines are allowing defineOwnProperty to be applied
2697         to host objects there's no reason for us to retain this
2698         restriction.
2699
2700         * bindings/js/JSDOMWrapper.cpp:
2701         * bindings/js/JSDOMWrapper.h:
2702
2703 2011-03-25  Andy Estes  <aestes@apple.com>
2704
2705         Reviewed by Adele Peterson.
2706
2707         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
2708         https://bugs.webkit.org/show_bug.cgi?id=49016
2709
2710         AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the 
2711         QuickTime plug-in in web pages. r70748 removed our mapping of classids 
2712         to MIME types, which causes WebKit to fall back from the object to the 
2713         embed tag when QuickTime is embedded by this script. The script emits 
2714         the following embed tag to embed a QuickTime movie with a poster frame: 
2715
2716         <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov"> 
2717
2718         The expectation is that a QuickTime plug-in is instantiated to display the 
2719         poster frame, since QuickTime registers for many common image MIME 
2720         types. This is how Gecko behaves for embed. However, WebKit prefers to 
2721         use its native image rendering for image embeds, in which case no movie 
2722         is played when the poster frame is clicked. 
2723
2724         Fix this by changing embed to check for a plug-in that can handle the 
2725         image type before rendering the image natively. This matches Gecko. 
2726
2727         Test: plugins/embed-prefers-plugins-for-images.html
2728
2729         * html/HTMLEmbedElement.cpp:
2730         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2731         * html/HTMLObjectElement.cpp:
2732         (WebCore::HTMLObjectElement::HTMLObjectElement):
2733         (WebCore::HTMLObjectElement::parametersForPlugin):
2734         * html/HTMLPlugInImageElement.cpp:
2735         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2736         (WebCore::HTMLPlugInImageElement::isImageType):
2737         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2738         * html/HTMLPlugInImageElement.h:
2739         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages):
2740         * loader/EmptyClients.h:
2741         (WebCore::EmptyFrameLoaderClient::objectContentType):
2742         * loader/FrameLoader.cpp:
2743         (WebCore::FrameLoader::defaultObjectContentType):
2744         * loader/FrameLoader.h:
2745         * loader/FrameLoaderClient.h:
2746         * loader/SubframeLoader.cpp:
2747         (WebCore::SubframeLoader::resourceWillUsePlugin):
2748         (WebCore::SubframeLoader::requestPlugin):
2749         (WebCore::SubframeLoader::requestObject):
2750         (WebCore::SubframeLoader::shouldUsePlugin):
2751         * loader/SubframeLoader.h:
2752
2753 2011-03-23  Jer Noble  <jer.noble@apple.com>
2754
2755         Reviewed by Eric Carlson.
2756
2757         Application Cache should save audio/ and video/ mime types as flat files
2758         https://bugs.webkit.org/show_bug.cgi?id=53784
2759         <rdar://problem/8932473>
2760
2761         No new tests, as this behavior is not possible to test without changes to the MediaPlayer engines.
2762
2763         Store certain mime types as flat files alongside the Application Cache database.
2764         This requires plumbing the saved file path from ApplicationCacheStorage through
2765         to ApplicationCacheResource.
2766
2767         (WebCore::ApplicationCacheStorage::openDatabase): Modify the CacheResourceData schema and
2768             add a new DeletedCacheResources table, add a new CacheResourceDataDeleted trigger.
2769         (WebCore::ApplicationCacheStorage::store): Add the new path data when adding new rows in 
2770             CacheResourceData, and store media resources as flat files.
2771         (WebCore::ApplicationCacheStorage::loadCache): Pull the "path" column from CacheResourceData
2772             when loading cache items.
2773         (WebCore::ApplicationCacheStorage::remove): Call checkForDeletedResources.
2774         (WebCore::ApplicationCacheStorage::empty): Ditto.
2775         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
2776         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
2777         (WebCore::ApplicationCacheStorage::checkForDeletedResources): Walk through DeletedCacheResourceData
2778             looking for entries with non-empty "path" columns; if found, delete.
2779         (WebCore::ApplicationCacheStorage::flatFileAreaSize): Walk through CacheResourceData rows
2780             and sum the file size of those rows with flat file storage.
2781         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Call deleteTables() instead of 
2782             clearAllTables() directly.
2783         (WebCore::ApplicationCacheStorage::deleteTables): Call empty() before deleting the tables,
2784             so that flat files get deleted.
2785         (WebCore::ApplicationCacheStorage::shouldStoreResourceAsFlatFile): Added.
2786         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Added.
2787         * loader/appcache/ApplicationCacheStorage.h:
2788         * platform/win/FileSystemWin.cpp:
2789         (WebCore::openFile): Implement openFile on Windows.
2790
2791 2011-03-24  David Hyatt  <hyatt@apple.com>
2792
2793         Reviewed by Dan Bernstein.
2794
2795         https://bugs.webkit.org/show_bug.cgi?id=56909
2796         
2797         Add a simplified normal flow layout path optimization for overflow recomputation
2798         and for positioned objects inside relative positioned containers.
2799
2800         Currently there is an optimized code path for positioned objects, but as soon as
2801         we encounter a normal flow object in the containing block chain, we lose the
2802         optimization.
2803
2804         This patch adds a new type of style difference called SimplifiedLayout that is
2805         returned when only overflow needs to be recomputed. Whenever a transform changes,
2806         this is the hint returned now instead of a full layout.
2807         
2808         In addition, when positioned objects need layout and start marking up the
2809         containing block chain, we now propagate the fact that the layout is simplified
2810         all the way up to the root, even when we encounter normal flow containing
2811         blocks.
2812         
2813         The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout()
2814         and is now used for all of these cases (in addition to what it handled before).
2815         
2816         The simplified layout optimization (even in ToT) did not work correctly when
2817         static distances needed to be recomputed. In order to make static distance
2818         computations work with simplified layout, positioned objects now always compute
2819         their static offsets, even if they explicitly specify left/top.  That way normal
2820         flow layout never has to re-run when the positioned object moves.  This makes
2821         movement of a positioned object along a single non-auto axis much faster when the
2822         other axis is auto. Because this code kicked in more often for absolutely positioned
2823         objects whose original display was inline, I went ahead and fixed the trailing space
2824         issue with those objects.  This causes a bunch of layout tests to progress.
2825
2826         Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html.
2827
2828         * rendering/RenderBlock.cpp:
2829         (WebCore::RenderBlock::layoutBlock):
2830         (WebCore::RenderBlock::adjustPositionedBlock):
2831         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2832         (WebCore::RenderBlock::simplifiedLayout):
2833         * rendering/RenderBlock.h:
2834         * rendering/RenderBlockLineLayout.cpp:
2835         (WebCore::setStaticPositions):
2836         (WebCore::RenderBlock::findNextLineBreak):
2837         * rendering/RenderBox.cpp:
2838         (WebCore::RenderBox::styleDidChange):
2839         (WebCore::RenderBox::positionLineBox):
2840         * rendering/RenderBoxModelObject.cpp:
2841         (WebCore::RenderBoxModelObject::styleWillChange):
2842         * rendering/RenderFlexibleBox.cpp:
2843         (WebCore::RenderFlexibleBox::layoutBlock):
2844         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
2845         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2846         * rendering/RenderObject.cpp:
2847         (WebCore::RenderObject::RenderObject):
2848         (WebCore::RenderObject::adjustStyleDifference):
2849         (WebCore::RenderObject::setStyle):
2850         (WebCore::RenderObject::styleDidChange):
2851         * rendering/RenderObject.h:
2852         (WebCore::RenderObject::needsLayout):
2853         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
2854         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
2855         (WebCore::RenderObject::setNeedsLayout):
2856         (WebCore::RenderObject::setChildNeedsLayout):
2857         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2858         (WebCore::RenderObject::markContainingBlocksForLayout):
2859         * rendering/RenderTable.cpp:
2860         (WebCore::RenderTable::layout):
2861         * rendering/style/RenderStyle.cpp:
2862         (WebCore::RenderStyle::diff):
2863         * rendering/style/RenderStyleConstants.h:
2864         * rendering/svg/RenderSVGText.cpp:
2865         (WebCore::RenderSVGText::layout):
2866
2867 2011-03-25  Martin Robinson  <mrobinson@igalia.com>
2868
2869         Fix the GTK+ build until we can implement the new cross-platform
2870         FontPlatformData.h bits.
2871
2872         * platform/graphics/FontPlatformData.h: Include the proper old font headers.
2873         (WebCore::FontPlatformData::FontPlatformData): Eliminate GTK+ specific bits of this file
2874         which reference our obsolete font implementation.
2875         (WebCore::FontPlatformData::hash): Ditto.
2876
2877 2011-03-25  Steve Falkenburg  <sfalken@apple.com>
2878
2879         Reviewed by Brian Weinstein.
2880
2881         Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
2882         https://bugs.webkit.org/show_bug.cgi?id=57119
2883         <rdar://problem/9054148>
2884         
2885         This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
2886         not available in WebKit. The plug-in is fairly widespread, since it was included in
2887         a Windows Update push at one point.
2888
2889         * plugins/win/PluginPackageWin.cpp:
2890         (WebCore::PluginPackage::isPluginBlacklisted): Blacklist npwpf.dll.
2891
2892 2011-03-25  Tony Chang  <tony@chromium.org>
2893
2894         Try to fix the chromium mac build.
2895         We used the mac FontPlatformData on chromium mac.
2896
2897         * WebCore.gyp/WebCore.gyp:
2898         * WebCore.gypi:
2899         * platform/graphics/FontPlatformData.h:
2900
2901 2011-03-25  Tony Chang  <tony@chromium.org>
2902
2903         Build fix:
2904         have chromium and qt use the correct FontPlatformData.h
2905         https://bugs.webkit.org/show_bug.cgi?id=57115
2906
2907         * platform/graphics/FontPlatformData.h:
2908
2909 2011-03-25  Beth Dakin  <bdakin@apple.com>
2910
2911         Reviewed by Dave Hyatt.
2912
2913         Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow 
2914         areas paint behind positive z-index content
2915         -and corresponding-
2916         <rdar://problem/9070500>
2917
2918         Since overlay scrollbars don't clip the scrollable content like other scrollbars do, 
2919         the only way to get them to paint on top of all possible scrollable content is to 
2920         make them paint on top of everything. To do this, this patch adds a second trip 
2921         through the layer tree if it contains overlay scrollbars that need painting.
2922
2923         After calling paint() on the rootLayer, call paintOverlayScrollers() if 
2924         containsDirtyOverlayScrollbars() is true. 
2925         * page/FrameView.cpp:
2926         (WebCore::FrameView::paintContents):
2927
2928         RenderLayer has two new member variable. m_containsDirtyOverlayScrollbars is a bool 
2929         that is set on the root layer when it has child layers that need overlay scrollbars 
2930         to be painted. m_cachedOverlayScrollbarOffset is an IntPoint to cache the tx and ty 
2931         of the overlay scrollbars on the first (normal) pass through the layer tree. This 
2932         prevents us from having to re-enter the render tree during the second (overlay-only) 
2933         pass. Finally, there is also a new paint flag: PaintLayerPaintingOverlayScrollbars.
2934         * rendering/RenderLayer.h:
2935         (WebCore::RenderLayer::containsDirtyOverlayScrollbars):
2936         (WebCore::RenderLayer::setContainsDirtyOverlayScrollbars):
2937         * rendering/RenderLayer.cpp:
2938         (WebCore::RenderLayer::RenderLayer):
2939         (WebCore::RenderLayer::paintOverflowControls):
2940         (WebCore::RenderLayer::paintOverlayScrollbars):
2941         (WebCore::RenderLayer::paintLayer):
2942
2943 2011-03-25  Jessie Berlin  <jberlin@apple.com>
2944
2945         Reviewed by Sam Weinig.
2946
2947         WebKit2: Need to be able to set and get the Cookie Storage Policy.
2948         https://bugs.webkit.org/show_bug.cgi?id=50780
2949
2950         * platform/network/cf/CookieStorageCFNet.cpp:
2951         (WebCore::privateCookieStorage):
2952         Rename privateBrowsingCookieStorage to privateCookieStorage.
2953         (WebCore::currentCookieStorage):
2954         Ditto.
2955         (WebCore::setCurrentCookieStorage):
2956         Ditto.
2957         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2958         Ditto.
2959         (WebCore::defaultCookieStorage):
2960         Return the default cookie storage.
2961         (WebCore::privateBrowsingCookieStorage):
2962         Return privateCookieStorage().get()
2963         * platform/network/cf/CookieStorageCFNet.h:
2964
2965 2011-03-25  Emil A Eklund  <eae@chromium.org>
2966
2967         Reviewed by Dimitri Glazkov.
2968
2969         Text field "onchange" event is triggered if actual value unchanged
2970         https://bugs.webkit.org/show_bug.cgi?id=36314
2971
2972         Change RenderTextControl::subtreeHasChanged to only return true if the
2973         subtree has changed since the last event was triggered.
2974
2975         * html/HTMLFormControlElement.cpp:
2976         (WebCore::HTMLTextFormControlElement::insertedIntoDocument):
2977         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2978         * html/HTMLFormControlElement.h:
2979         (WebCore::HTMLTextFormControlElement::setTextAsOfLastFormControlChangeEvent):
2980         * html/HTMLInputElement.cpp:
2981         (WebCore::HTMLInputElement::setChecked):
2982         (WebCore::HTMLInputElement::setValue):
2983         * html/HTMLTextAreaElement.cpp:
2984         (WebCore::HTMLTextAreaElement::setValue):
2985         (WebCore::HTMLTextAreaElement::setNonDirtyValue):
2986
2987 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
2988
2989         Reviewed by David Hyatt.
2990
2991         Clean up FontPlatformData structure so that a single implementation
2992         is used across all ports.  This first patch works for the Windows
2993         build (both CG and WinCairo), and Cocoa.
2994
2995         * WebCore.vcproj/WebCore.vcproj:
2996         * platform/graphics/FontPlatformData.cpp: Added.
2997         (WebCore::FontPlatformData::FontPlatformData):
2998         (WebCore::FontPlatformData::operator=):
2999         * platform/graphics/FontPlatformData.h: Added.
3000         (WebCore::toCTFontRef):
3001         (WebCore::FontPlatformData::FontPlatformData):
3002         (WebCore::FontPlatformData::hfont):
3003         (WebCore::FontPlatformData::useGDI):
3004         (WebCore::FontPlatformData::font):
3005         (WebCore::FontPlatformData::cgFont):
3006         (WebCore::FontPlatformData::size):
3007         (WebCore::FontPlatformData::setSize):
3008         (WebCore::FontPlatformData::syntheticBold):
3009         (WebCore::FontPlatformData::syntheticOblique):
3010         (WebCore::FontPlatformData::isColorBitmapFont):
3011         (WebCore::FontPlatformData::orientation):
3012         (WebCore::FontPlatformData::textOrientation):
3013         (WebCore::FontPlatformData::widthVariant):
3014         (WebCore::FontPlatformData::setOrientation):
3015         (WebCore::FontPlatformData::scaledFont):
3016         (WebCore::FontPlatformData::fontFace):
3017         (WebCore::FontPlatformData::hash):
3018         (WebCore::FontPlatformData::operator==):
3019         (WebCore::FontPlatformData::isHashTableDeletedValue):
3020         (WebCore::FontPlatformData::hashTableDeletedFontValue):
3021         * platform/graphics/cg/FontPlatformData.h: Removed.
3022         * platform/graphics/cocoa/FontPlatformData.h: Removed.
3023         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3024         (WebCore::~FontPlatformData):
3025         (WebCore::FontPlatformData::platformDataInit):
3026         (WebCore::FontPlatformData::platformDataAssign):
3027         * platform/graphics/win/FontPlatformDataCGWin.cpp:
3028         (WebCore::FontPlatformData::FontPlatformData):
3029         (WebCore::FontPlatformData::~FontPlatformData):
3030         (WebCore::FontPlatformData::platformDataInit):
3031         (WebCore::FontPlatformData::platformDataAssign):
3032         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
3033         (WebCore::FontPlatformData::FontPlatformData):
3034         (WebCore::FontPlatformData::~FontPlatformData):
3035         (WebCore::FontPlatformData::platformDataInit):
3036         (WebCore::FontPlatformData::platformDataAssign):
3037         * platform/graphics/win/FontPlatformDataWin.cpp:
3038         (WebCore::FontPlatformData::FontPlatformData):
3039         * platform/graphics/win/cairo/FontPlatformData.h: Removed.
3040
3041 2011-03-25  Enrica Casucci  <enrica@apple.com>
3042
3043         Reviewed by Oliver Hunt.
3044
3045         Pasteboard data's RTF data doesn't always include URLs via NSLinkAttributeName.
3046         https://bugs.webkit.org/show_bug.cgi?id=57107
3047         <rdar://problem/9084267>
3048
3049         If the selection is at the beginning of content inside an anchor tag
3050         we move the selection start to include the anchor.
3051         
3052         * platform/mac/PasteboardMac.mm:
3053         (WebCore::Pasteboard::writeSelection): Modified to change the selection
3054         start according to the new rule.
3055
3056 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
3057
3058         Reviewed by Yury Semikhatsky.
3059
3060         Web Inspector: refactor Network domain's frame tree API
3061         https://bugs.webkit.org/show_bug.cgi?id=57103
3062
3063         * inspector/Inspector.json:
3064         * inspector/InspectorResourceAgent.cpp:
3065         (WebCore::buildObjectForFrameResource):
3066         (WebCore::buildObjectForCachedResource):
3067         (WebCore::InspectorResourceAgent::willSendRequest):
3068         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3069         (WebCore::buildObjectForFrame):
3070         (WebCore::buildObjectForFrameTree):
3071         (WebCore::InspectorResourceAgent::didCommitLoad):
3072         (WebCore::InspectorResourceAgent::enable):
3073         * inspector/front-end/NetworkManager.js:
3074         (WebInspector.NetworkManager.prototype.requestContent):
3075         (WebInspector.NetworkDispatcher):
3076         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
3077         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
3078         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
3079         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
3080         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
3081         (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket):
3082         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
3083         (WebInspector.NetworkDispatcher.prototype._addFramesRecursively):
3084         (WebInspector.NetworkDispatcher.prototype._createResource):
3085         * inspector/front-end/ResourceTreeModel.js:
3086         (WebInspector.ResourceTreeModel.prototype.addOrUpdateFrame):
3087         (WebInspector.ResourceTreeModel.prototype.didCommitLoadForFrame):
3088         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
3089         (WebInspector.ResourceTreeModel.prototype._clearResources):
3090         * inspector/front-end/ResourcesPanel.js:
3091         (WebInspector.ResourcesPanel.prototype.addOrUpdateFrame):
3092         (WebInspector.ResourcesPanel.prototype.addResourceToFrame):
3093
3094 2011-03-25  Dave Hyatt  <hyatt@apple.com>
3095
3096         Reviewed by Adele Peterson.
3097
3098         REGRESSION(r77257): Only first page of a document is printed
3099         https://bugs.webkit.org/show_bug.cgi?id=56958
3100
3101         Test: printing/page-count-layout-overflow.html
3102
3103         * page/FrameView.cpp:
3104         (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
3105             to the right place.
3106
3107 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
3108
3109         Reviewed by Andreas Kling.
3110
3111         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
3112         https://bugs.webkit.org/show_bug.cgi?id=57087
3113
3114         Use explicit conversion for string to avoid depending on the default codec
3115         installed by the user code.
3116
3117         * bridge/qt/qt_pixmapruntime.cpp:
3118         (JSC::Bindings::QtPixmapToDataUrlMethod::invoke):
3119         (JSC::Bindings::QtPixmapInstance::valueOf):
3120         * platform/qt/LanguageQt.cpp:
3121         (WebCore::platformDefaultLanguage):
3122         * platform/qt/PasteboardQt.cpp:
3123         (WebCore::Pasteboard::writeSelection):
3124         * plugins/qt/PluginPackageQt.cpp:
3125         (WebCore::initializeGtk):
3126         * plugins/qt/PluginViewQt.cpp:
3127         (WebCore::getPluginDisplay):
3128
3129 2011-03-25  Chang Shu  <cshu@webkit.org>
3130
3131         Reviewed by Ryosuke Niwa.
3132
3133         rename Node::isContentEditable and all call sites to rendererIsEditable
3134         https://bugs.webkit.org/show_bug.cgi?id=54290
3135
3136         This is part of the effort to separate JS API HTMLElement isContentEditable from
3137         internal Node::rendererIsEditable.
3138
3139         Code refactoring. No new tests.
3140
3141         * accessibility/AccessibilityRenderObject.cpp:
3142         (WebCore::AccessibilityRenderObject::isReadOnly):
3143         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3144         * dom/Document.cpp:
3145         (WebCore::acceptsEditingFocus):
3146         * dom/Node.cpp:
3147         (WebCore::Node::rendererIsEditable):
3148         (WebCore::Node::shouldUseInputMethod):
3149         (WebCore::Node::canStartSelection):
3150         (WebCore::Node::rootEditableElement):
3151         * dom/Node.h:
3152         (WebCore::Node::isContentEditable):
3153         (WebCore::Node::rendererIsEditable):
3154         (WebCore::Node::rendererIsRichlyEditable):
3155         * dom/Position.cpp:
3156         (WebCore::nextRenderedEditable):
3157         (WebCore::previousRenderedEditable):
3158         (WebCore::Position::atEditingBoundary):
3159         (WebCore::Position::parentEditingBoundary):
3160         (WebCore::Position::upstream):
3161         (WebCore::Position::downstream):
3162         (WebCore::Position::isCandidate):
3163         * dom/PositionIterator.cpp:
3164         (WebCore::PositionIterator::isCandidate):
3165         * editing/AppendNodeCommand.cpp:
3166         (WebCore::AppendNodeCommand::AppendNodeCommand):
3167         (WebCore::AppendNodeCommand::doApply):
3168         (WebCore::AppendNodeCommand::doUnapply):
3169         * editing/ApplyStyleCommand.cpp:
3170         (WebCore::containsNonEditableRegion):
3171         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3172         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
3173         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
3174         * editing/CompositeEditCommand.cpp:
3175         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
3176         * editing/DeleteButtonController.cpp:
3177         (WebCore::isDeletableElement):
3178         (WebCore::enclosingDeletableElement):
3179         * editing/DeleteFromTextNodeCommand.cpp:
3180         (WebCore::DeleteFromTextNodeCommand::doApply):
3181         (WebCore::DeleteFromTextNodeCommand::doUnapply):
3182         * editing/DeleteSelectionCommand.cpp:
3183         (WebCore::DeleteSelectionCommand::removeNode):
3184         * editing/Editor.cpp:
3185         (WebCore::Editor::canDeleteRange):
3186         (WebCore::Editor::markMisspellingsOrBadGrammar):
3187         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3188         * editing/EditorCommand.cpp:
3189         (WebCore::verticalScrollDistance):
3190         * editing/FormatBlockCommand.cpp:
3191         (WebCore::enclosingBlockToSplitTreeTo):
3192         * editing/IndentOutdentCommand.cpp:
3193         (WebCore::IndentOutdentCommand::outdentParagraph):
3194         * editing/InsertIntoTextNodeCommand.cpp:
3195         (WebCore::InsertIntoTextNodeCommand::doApply):
3196         (WebCore::InsertIntoTextNodeCommand::doUnapply):
3197         * editing/InsertNodeBeforeCommand.cpp:
3198         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3199         (WebCore::InsertNodeBeforeCommand::doApply):
3200         (WebCore::InsertNodeBeforeCommand::doUnapply):
3201         * editing/JoinTextNodesCommand.cpp:
3202         (WebCore::JoinTextNodesCommand::doApply):
3203         (WebCore::JoinTextNodesCommand::doUnapply):
3204         * editing/MergeIdenticalElementsCommand.cpp:
3205         (WebCore::MergeIdenticalElementsCommand::doApply):
3206         (WebCore::MergeIdenticalElementsCommand::doUnapply):
3207         * editing/RemoveNodeCommand.cpp:
3208         (WebCore::RemoveNodeCommand::doApply):
3209         (WebCore::RemoveNodeCommand::doUnapply):
3210         * editing/ReplaceSelectionCommand.cpp:
3211         (WebCore::ReplacementFragment::ReplacementFragment):
3212         * editing/SelectionController.cpp:
3213         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
3214         (WebCore::SelectionController::setSelectionFromNone):
3215         * editing/SplitElementCommand.cpp:
3216         (WebCore::SplitElementCommand::executeApply):
3217         (WebCore::SplitElementCommand::doUnapply):
3218         * editing/SplitTextNodeCommand.cpp:
3219         (WebCore::SplitTextNodeCommand::doApply):
3220         (WebCore::SplitTextNodeCommand::doUnapply):
3221         (WebCore::SplitTextNodeCommand::doReapply):
3222         * editing/SplitTextNodeContainingElementCommand.cpp:
3223         (WebCore::SplitTextNodeContainingElementCommand::doApply):
3224         * editing/VisiblePosition.cpp:
3225         (WebCore::VisiblePosition::canonicalPosition):
3226         * editing/WrapContentsInDummySpanCommand.cpp:
3227         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
3228         (WebCore::WrapContentsInDummySpanCommand::doReapply):
3229         * editing/htmlediting.cpp:
3230         (WebCore::highestEditableRoot):
3231         (WebCore::lowestEditableAncestor):
3232         (WebCore::isEditablePosition):
3233         (WebCore::isRichlyEditablePosition):
3234         (WebCore::firstEditablePositionAfterPositionInRoot):
3235         (WebCore::extendRangeToWrappingNodes):
3236         (WebCore::enclosingNodeWithTag):
3237         (WebCore::enclosingNodeOfType):
3238         (WebCore::highestEnclosingNodeOfType):
3239         (WebCore::canMergeLists):
3240         * editing/visible_units.cpp:
3241         (WebCore::previousLeafWithSameEditability):
3242         (WebCore::previousLinePosition):
3243         (WebCore::nextLeafWithSameEditability):
3244         (WebCore::nextLinePosition):
3245         (WebCore::startOfParagraph):
3246         (WebCore::endOfParagraph):
3247         * html/HTMLAnchorElement.cpp:
3248         (WebCore::HTMLAnchorElement::supportsFocus):
3249         (WebCore::HTMLAnchorElement::defaultEventHandler):
3250         (WebCore::HTMLAnchorElement::setActive):
3251         (WebCore::HTMLAnchorElement::canStartSelection):
3252         (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
3253         * html/HTMLBodyElement.cpp:
3254         (WebCore::HTMLBodyElement::supportsFocus):
3255         * html/HTMLElement.cpp:
3256         (WebCore::HTMLElement::supportsFocus):
3257         (WebCore::HTMLElement::isContentEditable):
3258         (WebCore::HTMLElement::contentEditable):
3259         * html/HTMLElement.h:
3260         * page/DragController.cpp:
3261         (WebCore::DragController::operationForLoad):
3262         (WebCore::DragController::canProcessDrag):
3263         * page/EventHandler.cpp:
3264         (WebCore::EventHandler::handleMouseReleaseEvent):
3265         (WebCore::EventHandler::selectCursor):
3266         * page/FocusController.cpp:
3267         (WebCore::relinquishesEditingFocus):
3268         * rendering/HitTestResult.cpp:
3269         (WebCore::HitTestResult::isContentEditable):
3270         * rendering/RenderBlock.cpp:
3271         (WebCore::positionForPointRespectingEditingBoundaries):
3272         (WebCore::RenderBlock::hasLineIfEmpty):
3273         * rendering/RenderBlockLineLayout.cpp:
3274         (WebCore::RenderBlock::addOverflowFromInlineChildren):
3275         * rendering/RenderBox.cpp:
3276         (WebCore::RenderBox::canBeProgramaticallyScrolled):
3277         * rendering/RenderObject.cpp:
3278         (WebCore::RenderObject::createVisiblePosition):
3279         * rendering/RootInlineBox.cpp:
3280         (WebCore::isEditableLeaf):
3281         * svg/SVGAElement.cpp:
3282         (WebCore::SVGAElement::supportsFocus):
3283
3284 2011-03-25  Maciej Stachowiak  <mjs@apple.com>
3285
3286         Reviewed by Antti Koivisto.
3287
3288         Crash when a wbr element is inserted inside mroot
3289         https://bugs.webkit.org/show_bug.cgi?id=56352
3290
3291         Test: mathml/wbr-in-mroot-crash.html
3292
3293         * rendering/mathml/RenderMathMLRoot.cpp:
3294         (WebCore::RenderMathMLRoot::layout): Look for the first box model child of the first
3295         child, instead of just assuming.
3296
3297 2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
3298
3299         Reviewed by Pavel Feldman.
3300
3301         XML Viewer: extensions can't render original XML
3302         https://bugs.webkit.org/show_bug.cgi?id=56263
3303
3304         Added source xml to transformed document, renamed onload function.
3305
3306         * xml/XMLTreeViewer.cpp:
3307         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
3308         * xml/XMLViewer.xsl:
3309
3310 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
3311
3312         Reviewed by Andreas Kling.
3313
3314         [Qt] Get rid of the invalid string conversion with ::fromAscii()
3315         https://bugs.webkit.org/show_bug.cgi?id=57102
3316
3317         Replace ::fromAscii() with ::fromLatin1() to make sure the codec does not depend on the user code.
3318
3319         * platform/network/qt/QNetworkReplyHandler.cpp:
3320         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3321         * platform/qt/CookieJarQt.cpp:
3322         (WebCore::cookies):
3323         (WebCore::cookieRequestHeaderFieldValue):
3324
3325 2011-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3326
3327         Unreviewed, rolling out r81953.
3328         http://trac.webkit.org/changeset/81953
3329         https://bugs.webkit.org/show_bug.cgi?id=57096
3330
3331         "inspector test breakage: part 2/2" (Requested by apavlov on
3332         #webkit).
3333
3334         * inspector/Inspector.json:
3335         * inspector/InspectorCSSAgent.cpp:
3336         (WebCore::InspectorCSSAgent::getAllStyles):
3337         * inspector/InspectorCSSAgent.h:
3338         * inspector/InspectorStyleSheet.cpp:
3339         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3340         * inspector/InspectorStyleSheet.h:
3341         * inspector/front-end/AuditRules.js:
3342         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
3343         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
3344         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
3345         * inspector/front-end/CSSStyleModel.js:
3346         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
3347         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
3348         (WebInspector.CSSStyleModel.prototype._onRevert):
3349         (WebInspector.CSSStyleSheet):
3350         (WebInspector.CSSStyleSheet.prototype.setText):
3351
3352 2011-03-15  Alexander Pavlov  <apavlov@chromium.org>
3353
3354         Reviewed by Pavel Feldman.
3355
3356         Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js
3357         https://bugs.webkit.org/show_bug.cgi?id=56310
3358
3359         Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing
3360         "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned
3361         by CSSAgent.getStyleSheet() anymore.
3362
3363         Test: inspector/styles/get-set-stylesheet-text.html
3364
3365         * inspector/Inspector.json:
3366         * inspector/InspectorCSSAgent.cpp:
3367         (WebCore::InspectorCSSAgent::getAllStyleSheets):
3368         * inspector/InspectorCSSAgent.h:
3369         * inspector/InspectorStyleSheet.cpp:
3370         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3371         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3372         * inspector/InspectorStyleSheet.h:
3373         * inspector/front-end/AuditRules.js:
3374         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
3375         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
3376         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
3377         * inspector/front-end/CSSStyleModel.js:
3378         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
3379         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
3380         (WebInspector.CSSStyleModel.prototype._onRevert):
3381         (WebInspector.CSSStyleSheet):
3382         (WebInspector.CSSStyleSheet.prototype.setText):
3383
3384 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
3385
3386         Reviewed by Yury Semikhatsky.
3387
3388         Web Inspector: extension server should not convert all resources to HAR when there are no extensions.
3389         https://bugs.webkit.org/show_bug.cgi?id=57044
3390
3391         * inspector/front-end/ExtensionServer.js:
3392         (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
3393         (WebInspector.ExtensionServer.prototype._hasSubscribers):
3394
3395 2011-03-25  Leo Yang  <leo.yang@torchmobile.com.cn>
3396
3397         Reviewed by Nikolas Zimmermann.
3398
3399         SVG <use> element performance improvement
3400         https://bugs.webkit.org/show_bug.cgi?id=57077
3401
3402         SVG <use> element was expanding nesting <use> and <symbol> elements
3403         in an inefficient way. After it expanded an <use> or a <symbol>
3404         element it would restart expanding from the shadow tree root.
3405         This behavior was leading about 160 millions of calls to
3406         expandUseElementInShadowTree or expandSymbolElementInShadowTree for
3407         a single shadow tree which is illustrated by
3408         http://upload.wikimedia.org/wikipedia/commons/4/4e/Sierpinski_carpet_6.svg.
3409         But the effective calls, which really expand <use> or <symbol>
3410         elements, were about 5200; others were passing-by calls, which are
3411         recursively down to the children.
3412
3413         This patch is altering the expanding path to reduce the passing-by
3414         calls. It will expand elements in sibling chain where there is an
3415         effective call, because the effective call replaces element which is
3416         expanded and the replacement results lose of the sibling chain of
3417         the replaced on the upper recursion stack. With this patch the
3418         passing-by calls are reduced from about 160 millions to about 30
3419         thousands.
3420
3421         No functionality change, no new tests.
3422
3423         * svg/SVGUseElement.cpp:
3424         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
3425         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
3426         * svg/SVGUseElement.h:
3427
3428 2011-03-25  Dominic Cooney  <dominicc@google.com>
3429
3430         Reviewed by Kent Tamura.
3431
3432         Makes keygen support autofocus attribute.
3433         https://bugs.webkit.org/show_bug.cgi?id=57091
3434
3435         Test: fast/forms/autofocus-keygen.html
3436
3437         * html/HTMLFormControlElement.cpp:
3438         (WebCore::HTMLFormControlElement::attach):
3439
3440 2011-03-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3441
3442         Reviewed by Antonio Gomes.
3443
3444         [EFL] Add sound / mute button to MediaControl UI
3445         https://bugs.webkit.org/show_bug.cgi?id=56726
3446
3447         Add sound / mute button to MediaControl UI.
3448
3449         * platform/efl/RenderThemeEfl.cpp:
3450         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
3451         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
3452         (WebCore::RenderThemeEfl::paintMediaMuteButton):
3453         * platform/efl/RenderThemeEfl.h:
3454
3455 2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
3456
3457         Reviewed by Darin Adler.
3458
3459         Introduce WTF HexNumber.h
3460         https://bugs.webkit.org/show_bug.cgi?id=56099
3461
3462         Introduce a set of functions that ease converting from a bye or a number to a hex string,
3463         replacing several of these conversions and String::format("%x") usages all over WebCore.
3464
3465         * ForwardingHeaders/wtf/HexNumber.h: Added.
3466         * css/CSSOMUtils.cpp:
3467         (WebCore::serializeCharacterAsCodePoint):
3468         * css/CSSParser.cpp:
3469         (WebCore::quoteCSSString):
3470         * inspector/InspectorResourceAgent.cpp:
3471         (WebCore::createReadableStringFromBinary):
3472         * platform/FileSystem.cpp:
3473         (WebCore::encodeForFileName):
3474         * platform/KURL.cpp:
3475         (WebCore::appendEscapedChar):
3476         * platform/UUID.cpp:
3477         (WebCore::createCanonicalUUIDString):
3478         * platform/graphics/Color.cpp:
3479         (WebCore::Color::serialized):
3480         * platform/network/FormDataBuilder.cpp:
3481         (WebCore::FormDataBuilder::encodeStringAsFormData):
3482         * rendering/RenderTreeAsText.cpp:
3483         (WebCore::quoteAndEscapeNonPrintables):
3484
3485 2011-03-24  Stephanie Lewis  <slewis@apple.com>
3486
3487         Reviewed by Geoff Garen.
3488
3489         <rdar://problem/9146716> REGRESSION: ~10 MB increase in memory under CachedScripts
3490         Add back a call to destroy decoded data after access.  Keep the SourceProviderCache 
3491         around as long as their are still clients to use it.
3492
3493         No new tests because there is no change in behavior.  Current tests pass.
3494
3495         * loader/cache/CachedScript.cpp:
3496         (WebCore::CachedScript::script):
3497         (WebCore::CachedScript::destroyDecodedData):
3498
3499 2011-03-24  Stephanie Lewis  <slewis@apple.com>
3500
3501         Reviewed by Geoff Garen.
3502
3503         https://bugs.webkit.org/show_bug.cgi?id=57073
3504         Rework the AtomicHTMLConstructor to reserve&n