SVG CSS property types with <number> don't support exponents
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-18  Dirk Schulze  <krit@webkit.org>
2
3         SVG CSS property types with <number> don't support exponents
4         https://bugs.webkit.org/show_bug.cgi?id=52542
5
6         Reviewed by Nikolas Zimmermann.
7
8         Parse numbers in SVG presentation attributes with SVG parser to support scientific notations.
9         The SVG parser is already well tested and has some extra checks for edge like protection from
10         overflow.
11         
12         The patch is based upon a patch of Bear Travis.
13
14         Test: svg/css/scientific-numbers.html
15
16         * css/CSSParser.cpp:
17         (WebCore::CSSParser::lex): Use SVG parser to parse numbers of SVG attributes.
18         * svg/SVGParserUtilities.cpp:
19         (WebCore::parseSVGNumber): Added accessor to call from CSSParser with double value.
20         (WebCore):
21         * svg/SVGParserUtilities.h:
22         (WebCore):
23
24
25 2012-07-18  Pavel Feldman  <pfeldman@chromium.org>
26
27         Web Inspector: beautify the paused in debugger message, make it configurable from the front-end.
28         https://bugs.webkit.org/show_bug.cgi?id=91628
29
30         Reviewed by Vsevolod Vlasov.
31
32         Made message smaller, using consistent font;
33         Made message configurable from the front-end.
34
35         * English.lproj/localizedStrings.js:
36         * inspector/DOMNodeHighlighter.cpp:
37         (WebCore::InspectorOverlay::InspectorOverlay):
38         (WebCore::InspectorOverlay::setPausedInDebuggerMessage):
39         (WebCore::InspectorOverlay::update):
40         (WebCore::InspectorOverlay::drawPausedInDebugger):
41         * inspector/DOMNodeHighlighter.h:
42         (InspectorOverlay):
43         * inspector/Inspector.json:
44         * inspector/InspectorDebuggerAgent.cpp:
45         (WebCore::InspectorDebuggerAgent::setOverlayMessage):
46         (WebCore):
47         (WebCore::InspectorDebuggerAgent::clear):
48         * inspector/InspectorDebuggerAgent.h:
49         (InspectorDebuggerAgent):
50         * inspector/PageDebuggerAgent.cpp:
51         (WebCore::PageDebuggerAgent::setOverlayMessage):
52         * inspector/PageDebuggerAgent.h:
53         (PageDebuggerAgent):
54         * inspector/front-end/DebuggerModel.js:
55         (WebInspector.DebuggerModel.prototype._setDebuggerPausedDetails):
56
57 2012-07-18  Douglas Stockwell  <dstockwell@chromium.org>
58
59         WebCore::StylePropertySet::addParsedProperties - crash
60         https://bugs.webkit.org/show_bug.cgi?id=91153
61
62         Reviewed by Andreas Kling.
63
64         WebKitCSSKeyframeRule::style exposed an immutable StylePropertySet.
65         Modified to create a mutable copy on demand.
66
67         Test: fast/css/css-keyframe-style-mutate-crash.html
68
69         * css/StyleResolver.cpp:
70         (WebCore::StyleResolver::collectMatchingRulesForList):
71         * css/WebKitCSSKeyframeRule.cpp:
72         (WebCore::StyleKeyframe::mutableProperties): Added, creates a mutable copy of properties as required.
73         (WebCore::WebKitCSSKeyframeRule::style):
74         * css/WebKitCSSKeyframeRule.h:
75         (WebCore::StyleKeyframe::properties): Made const, use mutableProperties to mutate.
76
77 2012-07-18  Huang Dongsung  <luxtella@company100.net>
78
79         [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect.
80         https://bugs.webkit.org/show_bug.cgi?id=91595
81
82         Reviewed by Noam Rosenthal.
83
84         Internal review by Kwang Yul Seo.
85
86         Currently, TextureMapperLayer creates an ImageBuffer as big as
87         m_state.needsDisplayRect if m_state.needsDispaly is false. The size of
88         m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may
89         consume more memory than the size of the layerRect. It even can cause crash if
90         m_state.needsDisplayRect is too big.
91
92         No new tests, covered by existing tests.
93
94         * platform/graphics/texmap/TextureMapperLayer.cpp:
95         (WebCore::TextureMapperLayer::updateBackingStore):
96
97 2012-07-18  Jason Liu  <jason.liu@torchmobile.com.cn>
98
99         [BlackBerry] We should update the status in NetworkJob if there is a new one from libcurl.
100         https://bugs.webkit.org/show_bug.cgi?id=91475
101
102         Reviewed by Yong Li.
103
104         Libcurl sometimes sends multiple status messages, we need to keep the last 
105         one in NetworkJob.
106         We originally had the m_statusReceived check, then we found out that libcurl 
107         sometimes sent additional 401 codes and added the 401 exception to the check, 
108         and now we're removing the whole check(so we don't need the exception either).
109
110         RIM PR# 163172
111         Reviewed internally by Joe Mason.
112
113         No new tests. This is caused by libcurl's multiple status messages.
114         So we don't need to write a test case for webkit.
115
116         * platform/network/blackberry/NetworkJob.cpp:
117         (WebCore::NetworkJob::handleNotifyStatusReceived):
118
119 2012-07-18  Kevin Ellis  <kevers@chromium.org>
120
121         TOUCH_ADJUSTMENT is too aggressive when snapping to large elements.
122         https://bugs.webkit.org/show_bug.cgi?id=91262
123
124         Reviewed by Antonio Gomes.
125
126         Constrains the extent to which the touch point can be adjusted when
127         generating synthetic mouse events when TOUCH_ADJUSTEMNT is enabled.
128         Previously, the target position snapped to the center of the target
129         element, which can be far removed from the touch position when tapping
130         on or near a large element.  The refined strategy is to leave the
131         adjusted position unchanged if tapping within the element or to snap
132         to the center of the overlap region if the touch point lies outside the
133         bounds of the element, but the touch area and element bounds overlap.
134         For non-rectilineary bounds, a point lying outside the element boundary
135         is pulled towards the center of the element, by an amount limited by
136         the radius of the touch area.
137
138         Tests: touchadjustment/big-div.html
139                touchadjustment/rotated-node.html
140
141         * page/TouchAdjustment.cpp:
142         (WebCore::TouchAdjustment::contentsToWindow):
143         (TouchAdjustment):
144         (WebCore::TouchAdjustment::snapTo):
145         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
146
147 2012-07-18  Sergey Rogulenko  <rogulenko@google.com>
148
149         Web Inspector: adding pause icon for JavaScript debugging
150         https://bugs.webkit.org/show_bug.cgi?id=90880
151
152         Reviewed by Pavel Feldman.
153
154         Refactored DOMNodeHighlighter into InspectorOverlay class and added a feature to show a "pause" screen when
155         the Javascript debugger is paused.
156
157         * inspector/DOMNodeHighlighter.cpp:
158         (WebCore::InspectorOverlay::InspectorOverlay):
159         (WebCore::InspectorOverlay::paint):
160         (WebCore::InspectorOverlay::drawOutline):
161         (WebCore::InspectorOverlay::getHighlight):
162         (WebCore::InspectorOverlay::setPausedInDebugger):
163         (WebCore::InspectorOverlay::hideHighlight):
164         (WebCore):
165         (WebCore::InspectorOverlay::highlightNode):
166         (WebCore::InspectorOverlay::setHighlightData):
167         (WebCore::InspectorOverlay::clearHighlightData):
168         (WebCore::InspectorOverlay::highlightedNode):
169         (WebCore::InspectorOverlay::update):
170         (WebCore::InspectorOverlay::drawHighlight):
171         (WebCore::InspectorOverlay::drawPausedInDebugger):
172         * inspector/DOMNodeHighlighter.h:
173         (WebCore):
174         (InspectorOverlay):
175         (WebCore::InspectorOverlay::create):
176         * inspector/InspectorController.cpp:
177         (WebCore::InspectorController::InspectorController):
178         (WebCore::InspectorController::drawHighlight):
179         (WebCore::InspectorController::getHighlight):
180         (WebCore::InspectorController::highlightedNode):
181         * inspector/InspectorController.h:
182         (WebCore):
183         (InspectorController):
184         * inspector/InspectorDOMAgent.cpp:
185         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
186         (WebCore::InspectorDOMAgent::~InspectorDOMAgent):
187         (WebCore::InspectorDOMAgent::handleMousePress):
188         (WebCore::InspectorDOMAgent::mouseDidMoveOverElement):
189         (WebCore::InspectorDOMAgent::setSearchingForNode):
190         (WebCore::InspectorDOMAgent::setHighlightDataFromConfig):
191         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
192         (WebCore::InspectorDOMAgent::highlightRect):
193         (WebCore::InspectorDOMAgent::highlightNode):
194         (WebCore::InspectorDOMAgent::highlightFrame):
195         (WebCore::InspectorDOMAgent::hideHighlight):
196         * inspector/InspectorDOMAgent.h:
197         (WebCore):
198         (WebCore::InspectorDOMAgent::create):
199         (InspectorDOMAgent):
200         * inspector/InspectorDebuggerAgent.h:
201         (InspectorDebuggerAgent):
202         * inspector/InspectorPageAgent.cpp:
203         (WebCore::InspectorPageAgent::create):
204         (WebCore::InspectorPageAgent::InspectorPageAgent):
205         (WebCore::InspectorPageAgent::didPaint):
206         * inspector/InspectorPageAgent.h:
207         (WebCore):
208         * inspector/PageDebuggerAgent.cpp:
209         (WebCore::PageDebuggerAgent::create):
210         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
211         (WebCore::PageDebuggerAgent::disable):
212         (WebCore):
213         (WebCore::PageDebuggerAgent::didPause):
214         (WebCore::PageDebuggerAgent::didContinue):
215         * inspector/PageDebuggerAgent.h:
216         (WebCore):
217         (PageDebuggerAgent):
218
219 2012-07-17  Andrey Kosyakov  <caseq@chromium.org>
220
221         Web Inspector: intern strings when processing timeline records
222         https://bugs.webkit.org/show_bug.cgi?id=91531
223
224         Reviewed by Pavel Feldman.
225
226         - added StringPool that is capable of interning strings;
227         - used it in TimelineModel to process all incoming records;
228
229         * inspector/front-end/TimelineModel.js:
230         (WebInspector.TimelineModel):
231         (WebInspector.TimelineModel.prototype._addRecord):
232         (WebInspector.TimelineModel.prototype.reset):
233         * inspector/front-end/utilities.js:
234
235 2012-07-18  Scott Graham  <scottmg@chromium.org>
236
237         Use cl to preprocess IDL for Chromium Windows generate_supplemental_dependency
238         https://bugs.webkit.org/show_bug.cgi?id=91548
239
240         Reviewed by Kentaro Hara.
241
242         Use cl.exe as preprocessor for IDL files rather than cygwin gcc. Cuts
243         two minute execution time on Windows by a bit better than 50%.
244
245         No new tests.
246
247         * WebCore.gyp/WebCore.gyp:
248         * bindings/scripts/preprocessor.pm:
249         (applyPreprocessor):
250
251 2012-07-18  Pavel Feldman  <pfeldman@chromium.org>
252
253         Web Inspector: remove search replace from behind experiment, polish the behavior
254         https://bugs.webkit.org/show_bug.cgi?id=91519
255
256         Reviewed by Vsevolod Vlasov.
257
258         - This change makes replace loop with no boundary, removes the loop parameter
259           from jumpToNext/Previous;
260         - Lays out replace as a second row
261         - Fixes replace all with no search matches
262         - Splits Search and Search and Replace
263         - Introduces explicit Next / Previous buttons in the search mode
264         - Introduces editRange on the TextEditor so that it was preserving the undo stack
265           (we'll need to fix editor so that it does not require it).
266
267         * English.lproj/localizedStrings.js:
268         * inspector/front-end/ConsolePanel.js:
269         (WebInspector.ConsolePanel.prototype.performSearch):
270         (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult):
271         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
272         * inspector/front-end/ElementsPanel.js:
273         (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult):
274         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
275         * inspector/front-end/ExtensionPanel.js:
276         (WebInspector.ExtensionPanel.prototype.performSearch):
277         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
278         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
279         * inspector/front-end/JavaScriptSourceFrame.js:
280         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
281         * inspector/front-end/NetworkPanel.js:
282         (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult):
283         (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult):
284         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
285         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
286         * inspector/front-end/Panel.js:
287         (WebInspector.Panel.prototype.performSearch):
288         (WebInspector.Panel.prototype.jumpToNextSearchResult):
289         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
290         * inspector/front-end/ProfilesPanel.js:
291         (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult):
292         (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult):
293         * inspector/front-end/ResourcesPanel.js:
294         (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
295         (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
296         * inspector/front-end/ScriptsPanel.js:
297         (WebInspector.ScriptsPanel.prototype._editorClosed):
298         (WebInspector.ScriptsPanel.prototype._editorSelected):
299         (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
300         (WebInspector.ScriptsPanel.prototype.performSearch):
301         (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
302         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
303         (WebInspector.ScriptsPanel.prototype.replaceSelectionWith):
304         (WebInspector.ScriptsPanel.prototype.replaceAllWith):
305         * inspector/front-end/SearchController.js:
306         (WebInspector.SearchController):
307         (WebInspector.SearchController.prototype.cancelSearch):
308         (WebInspector.SearchController.prototype.resetSearch):
309         (WebInspector.SearchController.prototype.handleShortcut):
310         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
311         (WebInspector.SearchController.prototype._updateReplaceVisibility):
312         (WebInspector.SearchController.prototype._onKeyDown):
313         (WebInspector.SearchController.prototype._onNextButtonSearch):
314         (WebInspector.SearchController.prototype._onPrevButtonSearch):
315         (WebInspector.SearchController.prototype._performSearch):
316         (WebInspector.SearchController.prototype._updateReplaceDetailsVisibility):
317         (WebInspector.SearchController.prototype._replace):
318         (WebInspector.SearchController.prototype._replaceAll):
319         * inspector/front-end/Settings.js:
320         (WebInspector.ExperimentsSettings):
321         * inspector/front-end/SourceFrame.js:
322         (WebInspector.SourceFrame.prototype.beforeTextChanged):
323         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
324         (WebInspector.SourceFrame.prototype.performSearch):
325         (WebInspector.SourceFrame.prototype.replaceSearchMatchWith):
326         (WebInspector.SourceFrame.prototype.replaceAllWith):
327         (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged):
328         * inspector/front-end/TextEditor.js:
329         (WebInspector.TextEditor.prototype.editRange):
330         * inspector/front-end/inspector.css:
331         (.toolbar-search-replace .search-replace):
332         (.toolbar-search):
333         (.toolbar-search-replace):
334         (.toolbar-search-close-button):
335         (.toolbar-search-close-button:hover):
336         (.toolbar-search-close-button:active):
337         (.toolbar-search input[type="checkbox"]):
338         (.toolbar-search-replace .toolbar-replace-control):
339
340 2012-07-18  YoungTaeck Song  <youngtaeck.song@samsung.com>
341
342         [WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt
343         https://bugs.webkit.org/show_bug.cgi?id=91584
344
345         Reviewed by Noam Rosenthal.
346
347         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
348         Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled.
349
350         * CMakeLists.txt:
351         * PlatformEfl.cmake:
352         * platform/graphics/GraphicsContext3D.h:
353         (GraphicsContext3D):
354         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
355         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
356
357 2012-07-18  Zoltan Horvath  <zoltan@webkit.org>
358
359         [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt
360         https://bugs.webkit.org/show_bug.cgi?id=91600
361
362         Reviewed by Andreas Kling.
363
364         Use NativeImageQt::defaultFormatForAlphaEnabledImages() and NativeImageQt::defaultFormatForOpaqueImages()
365         instead of the direct imagetypes at the appropriate places.
366
367         Covered by existing tests.
368
369         * platform/graphics/qt/GraphicsContext3DQt.cpp:
370         (WebCore::GraphicsContext3D::paintToCanvas):
371         * platform/graphics/qt/PathQt.cpp:
372         (WebCore::scratchContext):
373         * platform/graphics/texmap/TextureMapperGL.cpp:
374         (WebCore::TextureMapperGL::drawRepaintCounter):
375         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
376         (WebCore::BitmapTextureImageBuffer::updateContents):
377
378 2012-07-18  Andrey Kosyakov  <caseq@chromium.org>
379
380         Web Inspector: create timeline detail records lazily
381         https://bugs.webkit.org/show_bug.cgi?id=91513
382
383         Reviewed by Pavel Feldman.
384
385         - only create timeline record details when these are used;
386
387         * inspector/front-end/TimelinePanel.js:
388         (WebInspector.TimelineRecordListRow.prototype.update):
389         * inspector/front-end/TimelinePresentationModel.js:
390         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
391         (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails):
392         (WebInspector.TimelinePresentationModel.Record.prototype.details):
393
394 2012-07-18  Simon Hausmann  <simon.hausmann@nokia.com>
395
396         [ANGLE] On QT, use Bison and Flex during ANGLE build
397         https://bugs.webkit.org/show_bug.cgi?id=91108
398
399         Reviewed by Kenneth Rohde Christiansen.
400
401         Add derived source generators for the two angle bison parsers and flex based lexers.
402
403         * DerivedSources.pri:
404         * Target.pri:
405
406 2012-07-18  Dominik Röttsches  <dominik.rottsches@intel.com>
407
408         [EFL][WK2] Too early assertion failure if default theme is not available
409         https://bugs.webkit.org/show_bug.cgi?id=91608
410
411         Reviewed by Kenneth Rohde Christiansen.
412
413         After bug 90107 we're setting a default theme path, which leads to a
414         themeChanged() call initializing edje in createEdje() - if that theme
415         path is not available we run into a premature assertion failure.
416         We need to give the embedder a chance to override the default theme path
417         before failing - so only the usages of m_edje should be guarded with assertions.
418
419         No new tests, no change in rendering behavior.
420
421         * platform/efl/RenderThemeEfl.cpp:
422         (WebCore::RenderThemeEfl::themePartCacheEntryReset): Adding an assertion to ensure m_edje is present - so that all usages of m_edje are now guarded.
423         (WebCore::RenderThemeEfl::createEdje): Not hitting assertion if theme path doesn't contain the theme object file, allowing the embedder to override with a new path.
424
425 2012-07-18  Vsevolod Vlasov  <vsevik@chromium.org>
426
427         IndexedDB: IDBLevelDBBackingStore compilation fails because of unused variable.
428         https://bugs.webkit.org/show_bug.cgi?id=91612
429
430         Reviewed by Pavel Feldman.
431
432         Replaced ASSERT with ASSERT_UNUSED.
433
434         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
435         (WebCore::IDBLevelDBBackingStore::getObjectStores):
436
437 2012-07-18  Yoshifumi Inoue  <yosin@chromium.org>
438
439         REGRESSION(r117738) [Forms] Default step base should be 0 (=1970-01) for input type month
440         https://bugs.webkit.org/show_bug.cgi?id=91603
441
442         Reviewed by Kent Tamura.
443
444         This patch restores default step base value to 0 (=1970-01) as before
445         r117738.
446
447         No new tests. Existing test(fast/forms/month/month-stepup-stepdown-from-renderer.html)
448         covers this case, although it is disabled.
449
450         * html/MonthInputType.cpp:
451         (WebCore::MonthInputType::createStepRange): Changed default value of
452         step base to defaultMonthStepBase instead of DateComponents::minimumMonth().
453
454 2012-07-18  Ryuan Choi  <ryuan.choi@samsung.com>
455
456         [EFL] Cursor is not drawn when opengl_x11 backend is choosen.
457         https://bugs.webkit.org/show_bug.cgi?id=89142
458
459         Reviewed by Simon Hausmann.
460
461         If theme based cursor is not given, WebKit/Efl only uses Ecore_X based
462         cursor as a fallback after checked whether current engine is using EcoreX.
463         This patch adds opengl_x11 which is one of Ecore_X based engine in check
464         lists to draw fallback cursor.
465
466         * platform/efl/EflScreenUtilities.cpp:
467         (WebCore::isUsingEcoreX):
468
469 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
470
471         REGRESSION(r122345): HTMLCollection::length() sometimes returns a wrong value
472         https://bugs.webkit.org/show_bug.cgi?id=91587
473
474         Reviewed by Benjamin Poulain.
475
476         The bug was caused by my douchey code that set the length cache to be the *offset*
477         of the last item in a HTMLCollection. Clearly, the length of a collection that contains
478         the last item at offset n is n + 1. Fixed that.
479
480         Also removed the call to setLengthCache in HTMLCollection::length since it must have set
481         by previous calls to itemBeforeOrAfterCachedItem already. This will allow us to catch
482         regressions like this in ports that use JSC bindings as well.
483
484         Test: fast/dom/htmlcollection-length-after-item.html
485
486         * html/HTMLCollection.cpp:
487         (WebCore::HTMLCollection::length):
488         (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem):
489
490 2012-07-18  Yoshifumi Inoue  <yosin@chromium.org>
491
492         Decimal::toString should not round integer value.
493         https://bugs.webkit.org/show_bug.cgi?id=91481
494
495         Reviewed by Kent Tamura.
496
497         This patch makes Decimal::toString not to round an integer value
498         before converting string.
499
500         Tests: WebKit/chromium/tests/DecimalTest.cpp: DecimalTest.toString
501
502         * platform/Decimal.cpp:
503         (WebCore::Decimal::toString): When the value is an integer, we don't
504         round coefficient to be DBL_DIG(15) digits because double can
505         represent an integer without rounding error.
506
507 2012-07-18  Luke Macpherson   <macpherson@chromium.org>
508
509         Fix null pointer dereference introduced by Changeset 121874.
510         https://bugs.webkit.org/show_bug.cgi?id=91578
511
512         Reviewed by Pavel Feldman.
513
514         In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that
515         dereferences the return value of ownerDocument() without doing a null check. This was a bad idea.
516
517         No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null.
518
519         * inspector/InspectorStyleSheet.cpp:
520         (WebCore::InspectorStyleSheet::ensureSourceData):
521
522 2012-07-17  Yoshifumi Inoue  <yosin@chromium.org>
523
524         Decimal constructor with 99999999999999999 loses last digit
525         https://bugs.webkit.org/show_bug.cgi?id=91579
526
527         Reviewed by Kent Tamura.
528
529         This patch changes maximum coefficient value handling in Decimal::EncodedData
530         constructor not to lose the last digit. It was used ">=" operator for
531         comparison instead of ">" operator.
532
533         Tests: WebKit/chromium/tests/DecimalTest.cpp
534
535         * platform/Decimal.cpp:
536         (WebCore::Decimal::EncodedData::EncodedData): Replace ">=" to ">" for
537         not getting rid of the last digit for maximum coefficient value.
538
539 2012-07-17  Ilya Tikhonovsky  <loislo@chromium.org>
540
541         Unreviewed Web Inspector: followup fix for r122920.
542
543         Add collected Loaders size to InspectorMemoryBlock
544
545         * inspector/InspectorMemoryAgent.cpp:
546         (MemoryBlockName):
547         (WebCore):
548
549 2012-07-17  Ilya Tikhonovsky  <loislo@chromium.org>
550
551         Web Inspector: show loaders memory consumption on the memory chart.
552         https://bugs.webkit.org/show_bug.cgi?id=90686
553
554         Reviewed by Pavel Feldman.
555
556         Size of FrameLoader, DocumentLoader, ResourceLoader and their resources should be shown on the memory pie chart.
557
558         It is covered by existing WebInspector performance tests infrastructure.
559
560         * WebCore.exp.in:
561         * dom/MemoryInstrumentation.h:
562         (MemoryInstrumentation):
563         (WebCore::MemoryInstrumentation::addRawBuffer):
564         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
565         (WebCore):
566         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
567         (WebCore::MemoryClassInfo::addRawBuffer):
568         (WebCore::MemoryInstrumentation::addInstrumentedHashSet):
569         (WebCore::MemoryInstrumentation::addVector):
570         * inspector/InspectorMemoryAgent.cpp:
571         (WebCore):
572         (WebCore::domTreeInfo):
573         * loader/DocumentLoader.cpp:
574         (WebCore::DocumentLoader::reportMemoryUsage):
575         (WebCore):
576         * loader/DocumentLoader.h:
577         (WebCore):
578         (DocumentLoader):
579         * loader/FrameLoader.cpp:
580         (WebCore::FrameLoader::reportMemoryUsage):
581         (WebCore):
582         * loader/FrameLoader.h:
583         (WebCore):
584         (FrameLoader):
585         * loader/ResourceLoader.cpp:
586         (WebCore::ResourceLoader::reportMemoryUsage):
587         (WebCore):
588         * loader/ResourceLoader.h:
589         (WebCore):
590         (ResourceLoader):
591         * page/Frame.cpp:
592         (WebCore::Frame::reportMemoryUsage):
593         (WebCore):
594         * page/Frame.h:
595         (WebCore):
596         (Frame):
597         * platform/SharedBuffer.cpp:
598         (WebCore::SharedBuffer::reportMemoryUsage):
599         (WebCore):
600         * platform/SharedBuffer.h:
601         (WebCore):
602         (SharedBuffer):
603
604 2012-07-17  Kent Tamura  <tkent@chromium.org>
605
606         Fix an assertion failure in CalendarPickerElement::hostInput().
607         https://bugs.webkit.org/show_bug.cgi?id=91568
608
609         Reviewed by Hajime Morita.
610
611         Test: fast/forms/date/calendar-picker-type-change-onclick.html
612
613         * html/shadow/CalendarPickerElement.cpp:
614         (WebCore::CalendarPickerElement::defaultEventHandler):
615         It's possible that this function is called when the element is detached
616         from the document tree.
617
618 2012-07-17  Kent Tamura  <tkent@chromium.org>
619
620         Form state: Make a new class handling HashMap<FormElementKey, Deque<>>
621         https://bugs.webkit.org/show_bug.cgi?id=91480
622
623         Reviewed by Hajime Morita.
624
625         This is a preparation of Bug 91209, "Form state restore: Need to
626         identify a from by its content."
627
628         Make a new class which is responsible to handle "HashMap<FormElementKey,
629         Deque<FormControlState>, FormElementKeyHash, FormElementKeyHashTraits>."
630         Also, move the FormElementKey class declaration and related structs from
631         FormController.h to FormController.cpp because FormElementKey is used
632         only in FormController.cpp.
633
634         No new tests. Just a refactoring.
635
636         * html/FormController.cpp:
637         (WebCore::FormElementKey): Moeved from FormController.h.
638         (WebCore::FormElementKey::FormElementKey):
639         Moved from the bottom of FormController.cpp
640         (WebCore::FormElementKey::~FormElementKey): ditto.
641         (WebCore::FormElementKey::operator=): ditto.
642         (WebCore::FormElementKey::ref): ditto.
643         (WebCore::FormElementKey::deref): ditto.
644         (WebCore::operator==): Moved from FormController.h
645         (FormElementKeyHash): ditto.
646         (WebCore::FormElementKeyHash::equal): ditto.
647         (WebCore::FormElementKeyHash::hash):
648         Moved from the bottom of FormController.cpp
649         (WebCore::FormElementKeyHashTraits::constructDeletedValue):
650         Moved from FormController.h
651         (WebCore::FormElementKeyHashTraits::isDeletedValue): ditto.
652
653         (WebCore::SavedFormState): Added.
654         (WebCore::SavedFormState::isEmpty):
655         (WebCore::SavedFormState::SavedFormState): Added. The constructor.
656         (WebCore::SavedFormState::create): Added. A factory function.
657         (WebCore::SavedFormState::appendControlState):
658         Moved some code from FormController::setStateForNewFormElements.
659         (WebCore::SavedFormState::takeControlState):
660         Moved some code from FormController::takeStateForFormElement.
661
662         (WebCore::FormController::setStateForNewFormElements):
663         - Creates SavedFormState if needed.
664         - Uses SavedFormState::appendControlState.
665         (WebCore::FormController::takeStateForFormElement):
666         Uses SavedFormState.
667         * html/FormController.h:
668         (FormController):
669
670 2012-07-17  MORITA Hajime <morrita@google.com>
671
672         [Shadow DOM] Some distribution invalidation can drop necessary reattachment.
673         https://bugs.webkit.org/show_bug.cgi?id=88843
674
675         Reviewed by Dimitri Glazkov.
676
677         Following scenario caused this problem:
678
679         - Inserting a Text node as a shadow child triggers invalidateDistribution(),
680           which doen't reattach the shadow's host element.
681         - Then inserting a <content> element after that triggers another invalidateDistribution(),
682           which should reattach its host because <content> can affect not only distribution of new nodes,
683           but also existing distribution.
684         - Since the first invalidateDistribution() has marked the distribution as invalidated,
685           the second invalidateDistribution() call returns early without any reattachment,
686           even though it needs one.
687
688         This change adds InvalidationType parameter to invalidateDistribution(), which asks ElementShadow to
689         reattach the host regardless of its validity state. InsertionPoint::insertedInto() uses
690         this flag to ensure that its insertion always results a reattachment.
691
692         Test: fast/dom/shadow/content-after-style.html
693
694         * dom/ElementShadow.cpp:
695         (WebCore::ElementShadow::addShadowRoot): Passes InvalidationType.
696         (WebCore::ElementShadow::removeAllShadowRoots): Passes InvalidationType.
697         (WebCore::ElementShadow::invalidateDistribution): Added a InvalidationType parameter.
698         * dom/ElementShadow.h:
699         * html/shadow/InsertionPoint.cpp:
700         (WebCore::InsertionPoint::insertedInto): Passes InvalidationType.
701
702 2012-07-17  Jon Lee  <jonlee@apple.com>
703
704         Teach CodeGenerator to support for static, readonly, attributes
705         https://bugs.webkit.org/show_bug.cgi?id=88920
706         <rdar://problem/11650330>
707
708         Reviewed by Oliver Hunt.
709
710         Update the parser to be able to accept the static keyword for attribute. We will treat static attributes
711         like custom static functions. They call the implementing class directly, and pass in the ExecState as a script context.
712
713         * bindings/scripts/CodeGeneratorJS.pm:
714         (GetAttributeGetterName): Factor out the construction of the attribute getter function name.
715         (GetAttributeSetterName): Factor out the construction of the attribute setter function name.
716         (GenerateHeader): Determine that a class has read-write properties only if there is a read-write attribute that
717         is not static.
718         (GenerateAttributesHashTable): Skip static attributes in the object hash table. They will be added to the constructor
719         hash table.
720         (GenerateImplementation): Look for static attributes to add to the constructor hash table. Make a call to the static
721         function in the class.
722         * bindings/scripts/IDLParser.pm:
723         (ParseInterface): Update the processing because of the regex change.
724         * bindings/scripts/IDLStructure.pm: Update the attribute regex.
725         * bindings/scripts/test/JS/JSTestObj.cpp: Update test results.
726         * bindings/scripts/test/JS/JSTestObj.h: Update test results.
727         * bindings/scripts/test/TestObj.idl: Add test cases.
728
729 2012-07-17  Kenichi Ishibashi  <bashi@chromium.org>
730
731         [Chromium] Rename HarfBuzzFace to HarfBuzzNGFace
732         https://bugs.webkit.org/show_bug.cgi?id=91458
733
734         Reviewed by Tony Chang.
735
736         There are HarfbuzzFace class (for old-harfbuzz) and HarfBuzzFace (for harfbuzz-ng) class. The difference is too subtle. Make them more distinct.
737
738         No new tests. No changes in behavior.
739
740         * WebCore.gyp/WebCore.gyp: Rename HarfBuzzFace to HarfBuzzNGFace.
741         * WebCore.gypi: Ditto.
742         * platform/graphics/FontPlatformData.h: Ditto.
743         (FontPlatformData):
744         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
745         (WebCore::FontPlatformData::harfbuzzFace):
746         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
747         (WebCore::FontPlatformData::harfbuzzFace):
748         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
749         (FontPlatformData):
750         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp.
751         (WebCore):
752         (WebCore::floatToHarfBuzzPosition):
753         (WebCore::getGlyph):
754         (WebCore::getGlyphHorizontalAdvance):
755         (WebCore::getGlyphHorizontalOrigin):
756         (WebCore::getGlyphExtents):
757         (WebCore::harfbuzzCoreTextGetFontFuncs):
758         (WebCore::releaseTableData):
759         (WebCore::harfbuzzCoreTextGetTable):
760         (WebCore::HarfBuzzNGFace::createFace):
761         (WebCore::HarfBuzzNGFace::createFont):
762         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
763         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp.
764         (WebCore):
765         (WebCore::SkiaScalarToHarfbuzzPosition):
766         (WebCore::SkiaGetGlyphWidthAndExtents):
767         (WebCore::harfbuzzGetGlyph):
768         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
769         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
770         (WebCore::harfbuzzGetGlyphExtents):
771         (WebCore::harfbuzzSkiaGetFontFuncs):
772         (WebCore::harfbuzzSkiaGetTable):
773         (WebCore::destroyPaint):
774         (WebCore::HarfBuzzNGFace::createFace):
775         (WebCore::HarfBuzzNGFace::createFont):
776         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
777         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp.
778         (WebCore):
779         (WebCore::harfbuzzFaceCache):
780         (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
781         (WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
782         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.h.
783         (WebCore):
784         (HarfBuzzNGFace):
785         (WebCore::HarfBuzzNGFace::create):
786         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
787         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
788
789 2012-07-17  Kinuko Yasuda  <kinuko@chromium.org>
790
791         Record metrics to measure the usage of Blob([ArrayBuffer]) to eventually deprecate it
792         https://bugs.webkit.org/show_bug.cgi?id=90534
793
794         Reviewed by Jian Li.
795
796         We are removing ArrayBuffer support in Blob constructor (in favor of
797         ArrayBufferView) but before doing that we should record its use relative to ArrayBufferView.
798         http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
799
800         No new tests as this has no functional changes.
801
802         * fileapi/WebKitBlobBuilder.cpp:
803         (WebCore::WebKitBlobBuilder::append):
804
805 2012-07-17  Joshua Bell  <jsbell@chromium.org>
806
807         IndexedDB: Key generator state not maintained across connections
808         https://bugs.webkit.org/show_bug.cgi?id=91456
809
810         Reviewed by Tony Chang.
811
812         Explicitly store key generator state for each object store in the backing store,
813         rather than deriving it from the maximum key in the data (which violates the spec
814         if data is deleted).
815
816         This change eliminates a (fragile) per-store cache of the value to simplify the
817         code. A cache could be re-introduced, requiring an "onbeforecommit" hook for
818         object stores, but it seems cleaner to save that for a follow-up patch.
819
820         Test: storage/indexeddb/key-generator.html
821
822         * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states.
823         (IDBBackingStore):
824         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
825         (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored).
826         (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state.
827         (WebCore):
828         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
829         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally
830         checking to see if the new value is greater than the old. (If caller got the value via
831         getKeyGeneratorCurrentNumber it is safe to skip the check.)
832         * Modules/indexeddb/IDBLevelDBBackingStore.h:
833         (IDBLevelDBBackingStore):
834         * Modules/indexeddb/IDBLevelDBCoding.cpp:
835         * Modules/indexeddb/IDBLevelDBCoding.h:
836         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
837         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache.
838         (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task.
839         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
840         (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below.
841         (WebCore::IDBObjectStoreBackendImpl::generateKey):
842         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
843         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
844         (IDBObjectStoreBackendImpl):
845
846 2012-07-17  Joshua Bell  <jsbell@chromium.org>
847
848         IndexedDB: Key generator state not maintained across connections
849         https://bugs.webkit.org/show_bug.cgi?id=91456
850
851         Reviewed by Tony Chang.
852
853         Explicitly store key generator state for each object store in the backing store,
854         rather than deriving it from the maximum key in the data (which violates the spec
855         if data is deleted).
856
857         This change eliminates a (fragile) per-store cache of the value to simplify the
858         code. A cache could be re-introduced, requiring an "onbeforecommit" hook for
859         object stores, but it seems cleaner to save that for a follow-up patch.
860
861         Test: storage/indexeddb/key-generator.html
862
863         * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states.
864         (IDBBackingStore):
865         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
866         (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored).
867         (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state.
868         (WebCore):
869         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
870         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally
871         checking to see if the new value is greater than the old. (If caller got the value via
872         getKeyGeneratorCurrentNumber it is safe to skip the check.)
873         * Modules/indexeddb/IDBLevelDBBackingStore.h:
874         (IDBLevelDBBackingStore):
875         * Modules/indexeddb/IDBLevelDBCoding.cpp:
876         * Modules/indexeddb/IDBLevelDBCoding.h:
877         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
878         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache.
879         (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task.
880         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
881         (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below.
882         (WebCore::IDBObjectStoreBackendImpl::generateKey):
883         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
884         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
885         (IDBObjectStoreBackendImpl):
886
887 2012-07-17  Alec Flett  <alecflett@chromium.org>
888
889         IndexedDB: createIndex should throw INVALID_ACCESS_ERR instead of NOT_SUPPORTED_ERR
890         https://bugs.webkit.org/show_bug.cgi?id=91553
891
892         Reviewed by Tony Chang.
893
894         Update createIndex to throw an INVALID_ACCESS_ERR
895         as per the IndexedDB spec.
896
897         No new tests: existing tests have been updated
898
899         * Modules/indexeddb/IDBDatabaseException.cpp:
900         (WebCore):
901         * Modules/indexeddb/IDBDatabaseException.h:
902         * Modules/indexeddb/IDBObjectStore.cpp:
903         (WebCore::IDBObjectStore::createIndex):
904
905 2012-07-17  Adam Barth  <abarth@webkit.org>
906
907         DragImageChromiumMac.cpp is never compiled and can be removed
908         https://bugs.webkit.org/show_bug.cgi?id=91545
909
910         Reviewed by Tony Chang.
911
912         This file would only be compiled on chromium-mac, but it's excluded
913         from that build. This is likely left over from the CG configuration.
914
915         * WebCore.gyp/WebCore.gyp:
916         * WebCore.gypi:
917         * platform/chromium/DragImageChromiumMac.cpp: Removed.
918
919 2012-07-17  Roger Fong  <roger_fong@apple.com>
920
921         Assertion failure/crash on Windows when using a font in an SVG 
922         element with an unresaonbly large font size
923         https://bugs.webkit.org/show_bug.cgi?id=91273
924         Radar: <rdar://problem/8355401>
925
926         Reviewed by Tim Horton.
927
928         When using a font in an SVG element with an unreasonably large 
929         font size in Windows, WebKit crashes. The problem has to do with 
930         font sizes overflowing into negative values in the Windows specific code.
931         The fix is to cap the font sizes to something reasonable when the font style is getting processed. 
932         The fix will apply to both CSS and SVG so that behaviour is consistent.
933
934         Test: svg/text/font-size-too-large-crash.svg
935
936         * css/StyleBuilder.cpp:
937         (WebCore::ApplyPropertyFontSize::applyValue):
938         This is where the font size capping now occurs. Caps size to 1000000.
939         Both CSS and SVG reach the font size capping code here.
940         
941         * css/StyleResolver.cpp:
942         (WebCore::StyleResolver::collectMatchingRulesForList):
943         Capping here removed, moved to StyleBuilder.cpp.
944
945 2012-07-17  David Barr  <davidbarr@chromium.org>
946
947         Add parsing and style application for css3-images image-orientation
948         https://bugs.webkit.org/show_bug.cgi?id=89624
949
950         Reviewed by Tony Chang.
951
952         The css3-images module is at candidate recommendation.
953         http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
954
955         Test: fast/css/image-orientation/image-orientation.html
956
957         * css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation.
958         (WebCore): Add CSSPropertyImageOrientation to computedProperties.
959         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings.
960         * css/CSSParser.cpp: Add parsing rule for image-orientation.
961         (WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle.
962         * css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum.
963         (WebCore): Add conditional include for ImageOrientation.h.
964         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles.
965         (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations.
966         * css/CSSProperty.cpp: Add CSSPropertyImageOrientation.
967         (WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited.
968         * css/CSSPropertyNames.in: Add image-orientation.
969         * css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation.
970         (WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum.
971         * css/StyleResolver.cpp: Handle CSSPropertyImageOrientation.
972         (WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder.
973         * rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation.
974         * rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation.
975         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors.
976         (WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison.
977         * rendering/style/StyleRareInheritedData.h: Add m_imageOrientation.
978         (StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum.
979
980 2012-07-17  Adrienne Walker  <enne@google.com>
981
982         REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
983         https://bugs.webkit.org/show_bug.cgi?id=91525
984
985         Reviewed by Julien Chaffraix.
986
987         Fix by doing an early out check.  This is intended to fix the crash in
988         http://crbug.com/137161.
989
990         No new test, because unfortunately a layout test is ill-suited to
991         reproing this kind of Document creation/destruction bug.
992
993         * rendering/RenderObject.cpp:
994         (WebCore::RenderObject::willRenderImage):
995
996 2012-07-17  Emil A Eklund  <eae@chromium.org>
997
998         vertical-align: middle causes overflow with subpixel layout
999         https://bugs.webkit.org/show_bug.cgi?id=91464
1000
1001         Reviewed by Eric Seidel.
1002
1003         Using vertical-align: middle in combination with an overflow value other
1004         than visible can cause the overflow height to be computed incorrectly.
1005
1006         Test: fast/sub-pixel/vertical-align-middle-overflow.html
1007
1008         * rendering/RootInlineBox.cpp:
1009         (WebCore::RootInlineBox::verticalPositionForBox):
1010         Round verticalPosition after calculation instead of flooring the result
1011         of the xHeight calculation. By flooring it the resulting value is in
1012         effect rounded up which can cause the height of the box to grow by one.
1013         By rounding the resulting value thevertical position is more accurate and
1014         the off by one error is avoided.
1015
1016 2012-07-17  Philip Rogers  <pdr@google.com>
1017
1018         Move zero-length-subpaths from RenderSVGShape to RenderSVGPath
1019         https://bugs.webkit.org/show_bug.cgi?id=90716
1020
1021         Reviewed by Nikolas Zimmermann.
1022
1023         Previously zero-length-subpath code was present in RenderSVGShape but it is
1024         only needed in RenderSVGPath. This patch moves the zero-length-subpath code
1025         to RenderSVGPath.
1026
1027         In this change, we gain:
1028         1) Ellipses, Circles, and Rects will no longer carry an empty Vector nor
1029            checks for zero-length subpaths which (per the spec) they cannot have.
1030         2) RenderSVGShape, the superclass of all shape rendering, has been
1031            drastically simplified by removing 70 lines of code that only applies
1032            to Path rendering. This generally aids in code understandability.
1033
1034         The patch is primarily a straightforward code move but useStrokeStyleToFill
1035         needs further explanation:
1036         Zero-length-subpaths are drawn using rectangular and circular paths which
1037         are filled.
1038         Previously in RenderSVGShape::fillAndStrokePath, strokePath was called for
1039         the main path with ApplyToStrokeMode and then strokePath was called for
1040         each zero-length-subpath with ApplyToFillMode.
1041         ApplyToFillMode had the effect of setting the context's stroke style to
1042         the fill style so zero-length-subpaths were "filled" with the stroke style.
1043         After this patch, the context is only setup once (which is faster!) using
1044         ApplyToStrokeMode so we manually set the stroke style to the fill style
1045         using useStrokeStyleToFill.
1046
1047         No new tests, just a refactoring.
1048
1049         * rendering/svg/RenderSVGPath.cpp:
1050         (WebCore::RenderSVGPath::updateShapeFromElement):
1051         (WebCore):
1052         (WebCore::RenderSVGPath::calculateUpdatedStrokeBoundingBox):
1053         (WebCore::useStrokeStyleToFill):
1054         (WebCore::RenderSVGPath::strokeShape):
1055         (WebCore::RenderSVGPath::shapeDependentStrokeContains):
1056         (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
1057         (WebCore::RenderSVGPath::zeroLengthLinecapPath):
1058         (WebCore::RenderSVGPath::zeroLengthSubpathRect):
1059         (WebCore::RenderSVGPath::updateZeroLengthSubpaths):
1060         * rendering/svg/RenderSVGPath.h:
1061         (RenderSVGPath):
1062         * rendering/svg/RenderSVGShape.cpp:
1063         (WebCore::RenderSVGShape::updateShapeFromElement):
1064         (WebCore::RenderSVGShape::strokeShape):
1065         (WebCore::RenderSVGShape::strokeContains):
1066         (WebCore):
1067         (WebCore::RenderSVGShape::fillShape):
1068         (WebCore::RenderSVGShape::fillAndStrokeShape):
1069         (WebCore::RenderSVGShape::paint):
1070         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
1071         * rendering/svg/RenderSVGShape.h:
1072         (WebCore::RenderSVGShape::hasPath):
1073         (WebCore::RenderSVGShape::hasNonScalingStroke):
1074         (RenderSVGShape):
1075         (WebCore::RenderSVGShape::strokeBoundingBox):
1076
1077 2012-07-17  Ryosuke Niwa  <rniwa@webkit.org>
1078
1079         invalidateNodeListCachesInAncestors walks up ancestors even when an attribute that doesn't invalidate node lists changes
1080         https://bugs.webkit.org/show_bug.cgi?id=91530
1081
1082         Reviewed by Ojan Vafai.
1083
1084         The bug was caused by invalidateNodeListCachesInAncestors not calling Document::shouldInvalidateNodeListCaches with
1085         attrName. Done that.
1086         
1087         This chance revealed a bug in shouldInvalidateTypeOnAttributeChange that we weren't checking form attribute changes for
1088         RadioNodeList and HTMLCollection, so fixed the bug.
1089
1090         Also renamed Document::clearNodeListCaches to invalidateNodeListCaches to match the name convention used elsewhere,
1091         and added a new version of DynamicNodeListCacheBase::invalidateCache that takes attrName to reduce the code duplication.
1092
1093         Test: fast/forms/elements-invalidate-on-form-attribute-invalidation.html
1094
1095         * dom/Document.cpp:
1096         (WebCore::Document::invalidateNodeListCaches):
1097         * dom/Document.h:
1098         (Document):
1099         * dom/DynamicNodeList.h:
1100         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1101         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
1102         * dom/Node.cpp:
1103         (WebCore::Node::invalidateNodeListCachesInAncestors):
1104         (WebCore::NodeListsNodeData::invalidateCaches):
1105
1106 2012-07-17  Max Vujovic  <mvujovic@adobe.com>
1107
1108         Update ANGLE in WebKit
1109         https://bugs.webkit.org/show_bug.cgi?id=89039
1110
1111         Reviewed by Dean Jackson and Mark Rowe.
1112
1113         Update ANGLE to r1170, with the following modifications:
1114
1115         (1) Use Bison 2.3 instead of Bison 2.4.2 to generate ExpressionParser.cpp and
1116         glslang_tab.cpp. I had to modify ExpressionParser.y to make it compatible with Bison
1117         2.3. The changes have been contributed back to ANGLE in r1224.
1118
1119         (2) Continue to recognize QNX as POSIX in ANGLE. This has been contributed back to ANGLE
1120         in r1223.
1121
1122         (3) Rename ANGLE/src/compiler/preprocessor/new/Diagnostic.cpp to DiagnosticBase.cpp.
1123         Rename ANGLE/src/compiler/preprocessor/new/DirectiveHandler.cpp to DirectiveHandlerBase.cpp.
1124
1125         With the introduction of ANGLE's new preprocessor, there were two files named Diagnostic.cpp
1126         in ANGLE under different folders. This caused problems on the QT build when their object
1127         files, both named Diagnostic.o, tried to go in the same folder. Renaming one of them to
1128         DiagnosticBase.cpp avoids this conflict. The same situation occurred with
1129         DirectiveHandler.cpp. I will work on contributing this change back to ANGLE for future
1130         updates.
1131
1132         (4) Add the following lines to glslang.y and ExpressionParser.y:
1133         #define YYENABLE_NLS 0
1134         #define YYLTYPE_IS_TRIVIAL 1
1135
1136         Bison 2.3 doesn't first check that these macros are defined before reading their value,
1137         which causes the QT build to fail.
1138
1139         We work around this issue in the same way in CSSGrammar.y.
1140
1141         I will work on contributing this change back to ANGLE.
1142
1143         No new tests. No change in behavior.
1144
1145         * CMakeLists.txt:
1146         * GNUmakefile.list.am:
1147         * Target.pri:
1148
1149 2012-07-17  Stephen Chenney  <schenney@chromium.org>
1150
1151         Crash in SVGStopElement::stopColorIncludingOpacity
1152         https://bugs.webkit.org/show_bug.cgi?id=90814
1153
1154         Reviewed by Dirk Schulze.
1155
1156         No new tests as there should be no change in functionality.
1157
1158         * svg/SVGStopElement.cpp:
1159         (WebCore::SVGStopElement::stopColorIncludingOpacity): Added a check for null
1160         renderer and style. It is hard to see how this is happening because
1161         the code is only invoked if the parent gradient has a renderer, and it seems
1162         the stop element should always have a renderer when the parent has a renderer.
1163         Still, it obviously can happen and does so frequently enough to generate multiple
1164         Chromium crash reports per day. The fix is marked with a FIXME, as we expect to
1165         remove this code entirely soon.
1166
1167 2012-07-17  Emil A Eklund  <eae@chromium.org>
1168
1169         Incorrect offset used for scrollWidth/Height calculation
1170         https://bugs.webkit.org/show_bug.cgi?id=91461
1171
1172         Reviewed by Eric Seidel.
1173
1174         Due to a different offset being used to calculate the scrollWidth/Height
1175         and pixelSnappedClientWidth/Height the scroll value can be off by one in
1176         same cases. This can causes scrollbars to appear even when there is no
1177         overflow.
1178
1179         Test: fast/sub-pixel/block-with-margin-overflow.html
1180
1181         * rendering/RenderBox.cpp:
1182         (WebCore::RenderBox::scrollWidth):
1183         Change location offset passed to snapSizeToPixel to include x() to match
1184         offset used by pixelSnappedClientWidth.
1185         
1186         (WebCore::RenderBox::scrollHeight):
1187         Change location offset passed to snapSizeToPixel to include y() to match
1188         offset used by pixelSnappedClientHeight.
1189
1190         * rendering/RenderLayer.cpp:
1191         (WebCore::RenderLayer::clampScrollOffset):
1192         Change calculation to use pixelSnappedClientWidth/Height as it is
1193         subtracted from the pixel snapped scrollWidth/Height values.
1194         
1195         (WebCore::RenderLayer::scrollWidth):
1196         (WebCore::RenderLayer::scrollHeight):
1197         Change RenderLayer versions of scrollWidth/Height to include x()/y() as
1198         per the RenderBox versions.
1199
1200 2012-07-17  Hans Muller  <hmuller@adobe.com>
1201
1202         Rename CSS Exclusions CSSWrapShape class properties to match Exclusion shape function parameters
1203         https://bugs.webkit.org/show_bug.cgi?id=89669
1204
1205         Reviewed by Dirk Schulze.
1206
1207         Renamed left,top properties in the exclusion shape types to better match the specification
1208         http://dev.w3.org/csswg/css3-exclusions/#shapes-from-svg-syntax:
1209
1210         WrapShapeRectangle, CSSWrapShapeRectangle - left,top should be x, y
1211         WrapShapeCircle, CSSWrapShapeCircle - left,top should be centerX, centerY
1212         WrapShapeEllipse, CSSWrapShapeEllipse - left,top should be centerX, centerY
1213
1214         No new tests or tests revisions were needed, the existing tests cover these APIs.
1215
1216         * css/CSSParser.cpp:
1217         (WebCore::CSSParser::parseExclusionShapeRectangle):
1218         (WebCore::CSSParser::parseExclusionShapeCircle):
1219         (WebCore::CSSParser::parseExclusionShapeEllipse):
1220         * css/CSSWrapShapes.cpp:
1221         (WebCore::CSSWrapShapeRectangle::cssText):
1222         (WebCore::CSSWrapShapeCircle::cssText):
1223         (WebCore::CSSWrapShapeEllipse::cssText):
1224         * css/CSSWrapShapes.h:
1225         (WebCore::CSSWrapShapeRectangle::x):
1226         (WebCore::CSSWrapShapeRectangle::y):
1227         (WebCore::CSSWrapShapeRectangle::setX):
1228         (WebCore::CSSWrapShapeRectangle::setY):
1229         (CSSWrapShapeRectangle):
1230         (WebCore::CSSWrapShapeCircle::centerX):
1231         (WebCore::CSSWrapShapeCircle::centerY):
1232         (WebCore::CSSWrapShapeCircle::setCenterX):
1233         (WebCore::CSSWrapShapeCircle::setCenterY):
1234         (CSSWrapShapeCircle):
1235         (WebCore::CSSWrapShapeEllipse::centerX):
1236         (WebCore::CSSWrapShapeEllipse::centerY):
1237         (WebCore::CSSWrapShapeEllipse::setCenterX):
1238         (WebCore::CSSWrapShapeEllipse::setCenterY):
1239         (CSSWrapShapeEllipse):
1240         * css/WrapShapeFunctions.cpp:
1241         (WebCore::valueForWrapShape):
1242         (WebCore::wrapShapeForValue):
1243         * rendering/style/WrapShapes.h:
1244         (WebCore::WrapShapeRectangle::x):
1245         (WebCore::WrapShapeRectangle::y):
1246         (WebCore::WrapShapeRectangle::setX):
1247         (WebCore::WrapShapeRectangle::setY):
1248         (WrapShapeRectangle):
1249         (WebCore::WrapShapeCircle::centerX):
1250         (WebCore::WrapShapeCircle::centerY):
1251         (WebCore::WrapShapeCircle::setCenterX):
1252         (WebCore::WrapShapeCircle::setCenterY):
1253         (WrapShapeCircle):
1254         (WebCore::WrapShapeEllipse::centerX):
1255         (WebCore::WrapShapeEllipse::centerY):
1256         (WebCore::WrapShapeEllipse::setCenterX):
1257         (WebCore::WrapShapeEllipse::setCenterY):
1258         (WrapShapeEllipse):
1259
1260 2012-07-16  Pavel Feldman  <pfeldman@chromium.org>
1261
1262         Web Inspector: implement search / replace in source files (behind experiment flag)
1263         https://bugs.webkit.org/show_bug.cgi?id=91394
1264
1265         Reviewed by Vsevolod Vlasov.
1266
1267         This change adds "loop" parameter to the go to next / previous search + adds a UI component
1268         for search / replace of text in the sources panel. New UI component is behind the experiment.
1269
1270         * English.lproj/localizedStrings.js:
1271         * inspector/front-end/ConsolePanel.js:
1272         (WebInspector.ConsolePanel.prototype.performSearch):
1273         (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult):
1274         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
1275         * inspector/front-end/ElementsPanel.js:
1276         (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult):
1277         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
1278         * inspector/front-end/ExtensionPanel.js:
1279         (WebInspector.ExtensionPanel.prototype.performSearch):
1280         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
1281         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
1282         * inspector/front-end/JavaScriptSourceFrame.js:
1283         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1284         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1285         * inspector/front-end/NetworkPanel.js:
1286         (WebInspector.NetworkLogView.prototype._sortItems):
1287         (WebInspector.NetworkLogView.prototype._updateFilter):
1288         (WebInspector.NetworkLogView.prototype.performSearch):
1289         (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult):
1290         (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult):
1291         (WebInspector.NetworkPanel.prototype.performSearch):
1292         * inspector/front-end/Panel.js:
1293         (WebInspector.Panel.prototype.performSearch):
1294         (WebInspector.Panel.prototype.jumpToNextSearchResult):
1295         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
1296         (WebInspector.Panel.prototype.canSearchAndReplace):
1297         (WebInspector.Panel.prototype.replaceSelectionWith):
1298         (WebInspector.Panel.prototype.replaceAllWith):
1299         * inspector/front-end/ProfilesPanel.js:
1300         (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult):
1301         (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult):
1302         * inspector/front-end/ResourcesPanel.js:
1303         (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
1304         (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
1305         * inspector/front-end/ScriptsPanel.js:
1306         (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
1307         (WebInspector.ScriptsPanel.prototype.performSearch):
1308         (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
1309         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
1310         (WebInspector.ScriptsPanel.prototype.canSearchAndReplace):
1311         (WebInspector.ScriptsPanel.prototype.replaceSelectionWith):
1312         (WebInspector.ScriptsPanel.prototype.replaceAllWith):
1313         * inspector/front-end/SearchController.js:
1314         (WebInspector.SearchController):
1315         (WebInspector.SearchController.prototype.cancelSearch):
1316         (WebInspector.SearchController.prototype.disableSearchUntilExplicitAction):
1317         (WebInspector.SearchController.prototype.handleShortcut):
1318         (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
1319         (WebInspector.SearchController.prototype.activePanelChanged):
1320         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
1321         (WebInspector.SearchController.prototype.showSearchField):
1322         (WebInspector.SearchController.prototype._onKeyDown):
1323         (WebInspector.SearchController.prototype._onInput):
1324         (WebInspector.SearchController.prototype._onNextButtonSearch):
1325         (WebInspector.SearchController.prototype._onPrevButtonSearch):
1326         (WebInspector.SearchController.prototype._performSearch):
1327         (WebInspector.SearchController.prototype._toggleReplaceVisibility):
1328         (WebInspector.SearchController.prototype._replace):
1329         (WebInspector.SearchController.prototype._replaceAll):
1330         * inspector/front-end/Settings.js:
1331         (WebInspector.ExperimentsSettings):
1332         * inspector/front-end/SourceFrame.js:
1333         (WebInspector.SourceFrame.createSearchRegex):
1334         (WebInspector.SourceFrame.prototype.beforeTextChanged):
1335         (WebInspector.SourceFrame.prototype.replaceSearchMatchWith):
1336         (WebInspector.SourceFrame.prototype.replaceAllWith):
1337         (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged):
1338         (WebInspector.TextEditorDelegateForSourceFrame.prototype.commitEditing):
1339         * inspector/front-end/StylesPanel.js:
1340         (WebInspector.StyleSourceFrame.prototype.afterTextChanged):
1341         * inspector/front-end/TextEditor.js:
1342         (WebInspector.TextEditor.prototype._commitEditing):
1343         * inspector/front-end/TextEditorModel.js:
1344         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1345         * inspector/front-end/inspector.css:
1346         (.search-replace):
1347         (.search-replace:focus):
1348         (.toolbar-search-navigation-controls):
1349         (.toolbar-search-navigation.enabled):
1350         (.toolbar-search):
1351         (.toolbar-search input[type="checkbox"]):
1352         (.toolbar-search button):
1353         (.toolbar-search button:active):
1354         (.toolbar-search-control):
1355         (.toolbar-replace-control):
1356         (.toolbar-search-navigation.enabled:active):
1357         (.toolbar-search-navigation.toolbar-search-navigation-prev):
1358         (.toolbar-search-navigation.toolbar-search-navigation-prev.enabled:active):
1359         (.toolbar-search-navigation.toolbar-search-navigation-next):
1360         (.toolbar-search-navigation.toolbar-search-navigation-next.enabled:active):
1361         (.drawer-header-close-button):
1362         (.inspector-footer):
1363
1364 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
1365
1366         [Qt][V8] Remove the V8 related codepaths and configuration
1367         https://bugs.webkit.org/show_bug.cgi?id=90863
1368
1369         Reviewed by Simon Hausmann.
1370
1371         No new tests because no new functionality.
1372
1373         * DerivedSources.pri:
1374         * Target.pri:
1375         * WebCore.gypi:
1376         * WebCore.pri:
1377         * bindings/v8/ScriptCachedFrameData.cpp:
1378         * bindings/v8/ScriptCachedFrameData.h:
1379         * bindings/v8/ScriptController.cpp:
1380         * bindings/v8/ScriptController.h:
1381         (ScriptController):
1382         * bindings/v8/ScriptControllerQt.cpp: Removed.
1383         * bindings/v8/V8GCController.cpp:
1384         (WebCore::V8GCController::checkMemoryUsage):
1385         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1386         (WebCore::histogramEnumeration):
1387         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1388         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1389         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1390         * config.h:
1391
1392 2012-07-17  Zoltan Horvath  <zoltan@webkit.org>
1393
1394         [QT] REGRESSION (r122720): svg/filters/feSpecularLight-premultiplied.svg
1395         https://bugs.webkit.org/show_bug.cgi?id=91390
1396
1397         Reviewed by Zoltan Herczeg.
1398
1399         Fix the regression by using the proper imagetype conversion in ImageBuffer::platformTransformColorSpace.
1400
1401         The test is unskipped.
1402
1403         * platform/graphics/qt/ImageBufferQt.cpp:
1404         (WebCore::ImageBuffer::platformTransformColorSpace):
1405
1406 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
1407
1408         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
1409         https://bugs.webkit.org/show_bug.cgi?id=91196
1410
1411         Reviewed by Pavel Feldman.
1412
1413         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
1414         now returning the InspectorFrontendChannel. Also refactored
1415         InspectorController::connectFrontend() to receive
1416         InspectorFrontendChannel.
1417
1418         No new test as code refactoring done.
1419
1420         * inspector/InspectorClient.h:
1421         (WebCore):
1422         (InspectorClient):
1423         * inspector/InspectorController.cpp:
1424         (WebCore::InspectorController::InspectorController):
1425         (WebCore::InspectorController::connectFrontend):
1426         (WebCore::InspectorController::show):
1427         (WebCore::InspectorController::reconnectFrontend):
1428         * inspector/InspectorController.h:
1429         (WebCore):
1430         (InspectorController):
1431         * loader/EmptyClients.h:
1432         (WebCore::EmptyInspectorClient::openInspectorFrontend):
1433         (WebCore::EmptyInspectorClient::hideHighlight):
1434
1435 2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1436
1437         Unreviewed, rolling out r122834.
1438         http://trac.webkit.org/changeset/122834
1439         https://bugs.webkit.org/show_bug.cgi?id=91492
1440
1441         it broke the chromium (Requested by kkristof on #webkit).
1442
1443         * DerivedSources.pri:
1444         * Target.pri:
1445         * WebCore.pri:
1446         * bindings/v8/ScriptCachedFrameData.cpp:
1447         (WebCore):
1448         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1449         (WebCore::ScriptCachedFrameData::domWindow):
1450         (WebCore::ScriptCachedFrameData::restore):
1451         (WebCore::ScriptCachedFrameData::clear):
1452         * bindings/v8/ScriptCachedFrameData.h:
1453         (WebCore):
1454         (ScriptCachedFrameData):
1455         (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
1456         * bindings/v8/ScriptController.cpp:
1457         * bindings/v8/ScriptController.h:
1458         (ScriptController):
1459         * bindings/v8/ScriptControllerQt.cpp: Copied from Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp.
1460         (WebCore):
1461         (WebCore::ScriptController::qtScriptEngine):
1462         * bindings/v8/V8GCController.cpp:
1463         (WebCore::V8GCController::checkMemoryUsage):
1464         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1465         (WebCore):
1466         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1467         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1468         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1469         * config.h:
1470
1471 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
1472
1473         [Qt][V8] Remove the V8 related codepaths and configuration
1474         https://bugs.webkit.org/show_bug.cgi?id=90863
1475
1476         Reviewed by Simon Hausmann.
1477
1478         No new tests, because there is no new functionality.
1479
1480         * DerivedSources.pri:
1481         * Target.pri:
1482         * WebCore.pri:
1483         * bindings/v8/ScriptCachedFrameData.cpp:
1484         * bindings/v8/ScriptCachedFrameData.h:
1485         * bindings/v8/ScriptController.cpp:
1486         * bindings/v8/ScriptController.h:
1487         (ScriptController):
1488         * bindings/v8/ScriptControllerQt.cpp: Removed.
1489         * bindings/v8/V8GCController.cpp:
1490         (WebCore::V8GCController::checkMemoryUsage):
1491         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1492         (WebCore::histogramEnumeration):
1493         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1494         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1495         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1496         * config.h:
1497
1498 2012-07-17  Kwang Yul Seo  <skyul@company100.net>
1499
1500         "in body" insertion mode, "any other end tag" step 2.1 is updated
1501         https://bugs.webkit.org/show_bug.cgi?id=91473
1502
1503         Reviewed by Eric Seidel.
1504
1505         The HTML5 spec is updated to change the 'end tag' processing to not imply
1506         its own end tag, since that makes no sense. Step 2.1 now says
1507         "Generate implied end tags, except for elements with the same tag name as the token."
1508         Modified to follow the updated spec. Also removed the first FIXME because now
1509         ElementRecord can't be deleted by the preceeding call.
1510
1511         This patch does not actually change the behavior because of the previous
1512         check (aborts if generateImpliedEndTags has already popped the node for the token),
1513         so no new tests.
1514
1515         * html/parser/HTMLTreeBuilder.cpp:
1516         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1517
1518 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org> 
1519
1520         [Regression] Infinite loop in document.elementFromPoint
1521         https://bugs.webkit.org/show_bug.cgi?id=90820
1522
1523         Reviewed by Nikolas Zimmermann.
1524
1525         Node::shadowAncestorNode returns the caller node itself for SVGElement. However,
1526         since we have already implemented event retargeting algorithm in Shadow DOM, we don't have to
1527         take a special care of SVGElement for Node.shadowAncestorNode() now.
1528
1529         This patch will removes the special care code and fixes infinite loop in document.elementFromPoint().
1530
1531         Test: svg/hittest/svg-use-element-from-point.html
1532
1533         * dom/Node.cpp:
1534         (WebCore::Node::shadowAncestorNode):
1535
1536 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org>
1537
1538         Shadow DOM for img element
1539         https://bugs.webkit.org/show_bug.cgi?id=90532
1540
1541         Reviewed by Hajime Morita.
1542
1543         This patch adds Shadow DOM support for img element.
1544
1545         According to the Shadow DOM spec, img element should behave like having a user agent Shadow DOM.
1546         However, if we add Shadow DOM to img by default, it will cause performance regression and memory bloat.
1547
1548         So, we would like to postpone adding a Shadow DOM to img until when we really need it. In other words,
1549         we add our User Agent Shadow DOM to img just before a user adds Author Shadow DOM.
1550
1551         The User Agent Shadow DOM for img has only one element, which displays an image. If img has
1552         a Shadow DOM, img will behave like <span style="display: inline-block"> by default. The display style can
1553         be chagned using CSS though.
1554
1555         This patch also adds ImageLoaderClient. The element we render an image and the element we take an argument
1556         from were the same, however not they might be different. We would like to encapsulate the fact into
1557         ImageLoaderClient.
1558
1559         Tests: fast/dom/shadow/shadowdom-for-image-alt-update.html
1560                fast/dom/shadow/shadowdom-for-image-alt.html
1561                fast/dom/shadow/shadowdom-for-image-content.html
1562                fast/dom/shadow/shadowdom-for-image-dynamic.html
1563                fast/dom/shadow/shadowdom-for-image-event-click.html
1564                fast/dom/shadow/shadowdom-for-image-in-shadowdom.html
1565                fast/dom/shadow/shadowdom-for-image-map.html
1566                fast/dom/shadow/shadowdom-for-image-style.html
1567                fast/dom/shadow/shadowdom-for-image-with-multiple-shadow.html
1568                fast/dom/shadow/shadowdom-for-image-with-width-and-height.html
1569                fast/dom/shadow/shadowdom-for-image.html
1570
1571         * CMakeLists.txt:
1572         * GNUmakefile.list.am:
1573         * Target.pri:
1574         * WebCore.gypi:
1575         * WebCore.vcproj/WebCore.vcproj:
1576         * WebCore.xcodeproj/project.pbxproj:
1577         * css/html.css:
1578         (img):
1579         * html/HTMLImageElement.cpp:
1580         (WebCore::ImageElement::setImageIfNecessary):
1581         (WebCore):
1582         (WebCore::ImageElement::createRendererForImage):
1583         (WebCore::HTMLImageElement::willAddAuthorShadowRoot): When we don't have a user agent Shadow DOM yet
1584         we add it.
1585         (WebCore::HTMLImageElement::createShadowSubtree):
1586         (WebCore::HTMLImageElement::imageElement):
1587         (WebCore::HTMLImageElement::parseAttribute):
1588         (WebCore::HTMLImageElement::createRenderer): If a user agent Shadow DOM is attached, we create
1589         Renderer from style, instead of creating RenderImage.
1590         (WebCore::HTMLImageElement::attach):
1591         (WebCore::HTMLImageElement::innerElement):
1592         * html/HTMLImageElement.h:
1593         (WebCore):
1594         (ImageElement):
1595         (HTMLImageElement):
1596         (WebCore::HTMLImageElement::sourceElement):
1597         (WebCore::HTMLImageElement::refSourceElement):
1598         (WebCore::HTMLImageElement::derefSourceElement):
1599         (WebCore::HTMLImageElement::imageRenderer):
1600         (WebCore::HTMLImageElement::imageLoader):
1601         (WebCore::isHTMLImageElement):
1602         (WebCore::toHTMLImageElement):
1603         * html/HTMLImageLoader.cpp:
1604         (WebCore::HTMLImageLoader::HTMLImageLoader):
1605         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1606         (WebCore::HTMLImageLoader::sourceURI):
1607         (WebCore::HTMLImageLoader::notifyFinished):
1608         * html/HTMLImageLoader.h:
1609         (HTMLImageLoader):
1610         * html/HTMLInputElement.h:
1611         * html/HTMLObjectElement.h:
1612         * html/HTMLPlugInElement.h:
1613         * html/HTMLTagNames.in:
1614         * html/HTMLVideoElement.h:
1615         * html/shadow/ImageInnerElement.cpp: Added.
1616         (WebCore):
1617         (WebCore::ImageInnerElement::ImageInnerElement):
1618         (WebCore::ImageInnerElement::hostImage):
1619         (WebCore::ImageInnerElement::imageLoader):
1620         (WebCore::ImageInnerElement::attach):
1621         (WebCore::ImageInnerElement::createRenderer):
1622         * html/shadow/ImageInnerElement.h: Added.
1623         (WebCore):
1624         (ImageInnerElement):
1625         (WebCore::ImageInnerElement::imageRenderer):
1626         (WebCore::ImageInnerElement::create):
1627         (WebCore::isImageInnerElement):
1628         (WebCore::toImageInnerElement):
1629         * loader/ImageLoader.cpp:
1630         (WebCore::ImageLoader::ImageLoader):
1631         (WebCore::ImageLoader::~ImageLoader):
1632         (WebCore):
1633         (WebCore::ImageLoader::document):
1634         (WebCore::ImageLoader::updateFromElement):
1635         (WebCore::ImageLoader::notifyFinished):
1636         (WebCore::ImageLoader::renderImageResource):
1637         (WebCore::ImageLoader::updatedHasPendingLoadEvent):
1638         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1639         (WebCore::ImageLoader::dispatchPendingLoadEvent):
1640         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1641         * loader/ImageLoader.h:
1642         (WebCore):
1643         (ImageLoader):
1644         (WebCore::ImageLoader::client):
1645         * loader/ImageLoaderClient.h: Added.
1646         (WebCore):
1647         (ImageLoaderClient): Provides the necessary interfaces to ImageLoader.
1648         (WebCore::ImageLoaderClient::~ImageLoaderClient):
1649         (ImageLoaderClientBase):
1650         (WebCore::ImageLoaderClientBase::sourceElement):
1651         (WebCore::ImageLoaderClientBase::imageElement):
1652         (WebCore::ImageLoaderClientBase::refSourceElement):
1653         (WebCore::ImageLoaderClientBase::derefSourceElement):
1654         * rendering/RenderImage.cpp:
1655         (WebCore::RenderImage::paintIntoRect):
1656         (WebCore::RenderImage::imageMap):
1657         (WebCore::RenderImage::updateAltText):
1658         (WebCore::RenderImage::hostImageElement):
1659         (WebCore):
1660         * rendering/RenderImage.h:
1661         (WebCore):
1662         (RenderImage):
1663         * rendering/RenderObject.cpp:
1664         (WebCore::RenderObject::shouldRespectImageOrientation):
1665         * svg/SVGImageElement.h:
1666         (SVGImageElement):
1667         * svg/SVGImageLoader.cpp:
1668         (WebCore::SVGImageLoader::SVGImageLoader):
1669         (WebCore::SVGImageLoader::dispatchLoadEvent):
1670         (WebCore::SVGImageLoader::sourceURI):
1671         * svg/SVGImageLoader.h:
1672         (SVGImageLoader):
1673
1674 2012-07-17  Kent Tamura  <tkent@chromium.org>
1675
1676         Internals: Remove injectPagePopupController()
1677         https://bugs.webkit.org/show_bug.cgi?id=91471
1678
1679         Reviewed by Hajime Morita.
1680
1681         r122558 introduced injectPagePopupController(), however we'd like to
1682         avoid adding such JavaScript binding code. We can avoid it by exposing a
1683         PagePopupController for a mock and injecting the following code to the
1684         popup document:
1685
1686         <script>window.pagePopupController = window.internals.pagePopupController</script>
1687
1688         No new tests. This is a kind of refactoring.
1689
1690         * testing/InternalSettings.cpp:
1691         (WebCore::InternalSettings::pagePopupController):
1692         Added. Accessor for PagePopupControler owned by the MockPagePopupDriver.
1693         * testing/InternalSettings.h:
1694         (InternalSettings): Declare pagePopupController() for Internals::pagePopupController().
1695         * testing/Internals.cpp:
1696         (WebCore::Internals::pagePopupController):
1697         Added. This uses InternalSettings::pagePopupController().
1698         * testing/Internals.h:
1699         (Internals): Declare pagePopupController() for Internals.idl.
1700         * testing/Internals.idl: Declare pagePopupController.
1701
1702         * testing/MockPagePopupDriver.cpp:
1703         Moved m_pagePopupController from MockPagePopup to MockPagePopupDriver.
1704         (WebCore::MockPagePopup::MockPagePopup):
1705         Added a script element to prepare window.pagePopupController.
1706         Removed a callsite of injectPagePopupController().
1707         (WebCore::MockPagePopupDriver::openPagePopup):
1708         (WebCore::MockPagePopupDriver::closePagePopup):
1709         * testing/MockPagePopupDriver.h:
1710         (WebCore::MockPagePopupDriver::pagePopupController):
1711         Accessor for a PagePopupController object.
1712         (MockPagePopupDriver): Add RefPtr<PagePopupController> data member.
1713
1714         * testing/v8/WebCoreTestSupport.cpp: Remove injectPagePopupController().
1715         * testing/v8/WebCoreTestSupport.h: ditto.
1716
1717 2012-07-17  Ryuan Choi  <ryuan.choi@samsung.com>
1718
1719         [EFL] Move codes related to theme setting from Widget to RenderTheme
1720         https://bugs.webkit.org/show_bug.cgi?id=89842
1721
1722         Reviewed by Kenneth Rohde Christiansen.
1723
1724         WebKit/Efl uses custom theme for Scrollbar, RenderTheme and Cursor.
1725         However, theme information itself is in WidgetEfl so it is accessed by
1726         calling recursive function.
1727         Because theme is managed by each page, this patch moves codes related to
1728         theme from WidgetEfl to RenderThemeEfl which is contained by page.
1729
1730         * platform/Widget.h: Removed functions related to theme.
1731         * platform/efl/RenderThemeEfl.cpp:
1732         (WebCore::RenderThemeEfl::setThemePath): Added to set theme path.
1733         (WebCore::RenderThemeEfl::createEdje): Updated method to use RenderThemeEfl's theme.
1734         (WebCore::RenderThemeEfl::RenderThemeEfl):
1735         * platform/efl/RenderThemeEfl.h:
1736         (WebCore::RenderThemeEfl::themePath): Added to get theme path
1737         * platform/efl/ScrollbarEfl.cpp: Updated method to use RenderThemeEfl's theme.
1738         (ScrollbarEfl::setParent):
1739         * platform/efl/WidgetEfl.cpp: Removed codes related theme.
1740         (WidgetPrivate):
1741
1742 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org>
1743
1744         HTMLMediaElement should not use Element::ensureShadowRoot()
1745         https://bugs.webkit.org/show_bug.cgi?id=77936
1746
1747         Reviewed by Hajime Morita.
1748
1749         a video element and an audio element add UserAgentShadowRoot dynamically, and they assume that it's the oldest ShadowRoot.
1750         However an AuthorShadowRoot could be added by a user before a video element and an audio element add UserAgentShadowRoot.
1751         It breaks the assumption that the UserAgentShadowRoot is the oldest.
1752
1753         If the UserAgentShadowRoot is not the oldest, the AuthorShadowRoot a page author added might be ignored.
1754         Since the timing to add UserAgentShadowRoot is not known by a user, the fact that UserAgentShadorRoot is
1755         not the oldest will cause inconsistent behavior.
1756
1757         Adding AuthorShadowRoot to a video element and an audio element is allowed by this patch.
1758
1759         Test: fast/dom/shadow/shadowdom-for-media.html
1760
1761         * dom/ShadowRoot.cpp:
1762         (WebCore::allowsAuthorShadowRoot):
1763         * html/HTMLMediaElement.cpp:
1764         (WebCore::HTMLMediaElement::createShadowSubtree):
1765         (WebCore):
1766         (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
1767         (WebCore::HTMLMediaElement::createMediaControls):
1768         * html/HTMLMediaElement.h:
1769         (HTMLMediaElement):
1770
1771 2012-07-16  Daniel Bates  <dbates@webkit.org>
1772
1773         Attempt to fix the Chromium Mac build after <http://trac.webkit.org/changeset/122802>
1774         (https://bugs.webkit.org/show_bug.cgi?id=91451)
1775  
1776         Remove unused private instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
1777         This instance variable has remained unused since it was added in
1778         <http://trac.webkit.org/changeset/116718> (https://bugs.webkit.org/show_bug.cgi?id=85725).
1779
1780         I'm unclear as to why the Chromium Mac build began to complain about this
1781         unused instance variable following <http://trac.webkit.org/changeset/122802>, since this
1782         code has been in the tree for a while and we previously instantiated AbsoluteQuadsGeneratorContext
1783         with wasFixed (even though it wasn't used). Regardless, we should remove the unused
1784         instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
1785
1786         * rendering/RenderInline.cpp:
1787         (WebCore): Remove AbsoluteQuadsGeneratorContext::m_wasFixed.
1788         (WebCore::RenderInline::absoluteQuads):
1789
1790 2012-07-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1791
1792         Add RegisterProtocolHandlerClient to the Modules/protocolhandler
1793         https://bugs.webkit.org/show_bug.cgi?id=90940
1794
1795         Reviewed by Hajime Morita.
1796
1797         As a step to let protocol handler be moved to the modules, RegisterProtocolHandlerClient needs
1798         to be added to the Modules/protocolhandler. Because ChromeClient has some virtual functions for
1799         protocol handlers, virtual functions should be moved to RegisterProtocolHandlerClient.
1800
1801         In addition, NavigatorRegisterProtocolHandler should be supplementable.
1802
1803         No new tests. Covered by existing tests.
1804
1805         * GNUmakefile.list.am:
1806         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp:
1807         (WebCore::NavigatorRegisterProtocolHandler::from):
1808         (WebCore::NavigatorRegisterProtocolHandler::create):
1809         (WebCore):
1810         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
1811         (WebCore::customHandlersStateString):
1812         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
1813         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
1814         (WebCore::NavigatorRegisterProtocolHandler::supplementName):
1815         (WebCore::provideRegisterProtocolHandlerTo):
1816         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h:
1817         (WebCore):
1818         (NavigatorRegisterProtocolHandler):
1819         (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
1820         (WebCore::NavigatorRegisterProtocolHandler::client):
1821         * Modules/protocolhandler/RegisterProtocolHandlerClient.h: Added.
1822         (WebCore):
1823         (RegisterProtocolHandlerClient):
1824         * WebCore.gypi:
1825         * loader/EmptyClients.h:
1826         * page/ChromeClient.h:
1827         (ChromeClient):
1828         * platform/network/soup/CookieJarSoup.cpp:
1829         (WebCore::setCookies):
1830         (WebCore::getRawCookies):
1831
1832 2012-07-16  Pete Williamson  <petewil@google.com>
1833
1834         Changed the behavior of iconURLs to always recalculate the list.
1835         https://bugs.webkit.org/show_bug.cgi?id=88665
1836
1837         Reviewed by Kent Tamura.
1838
1839         As it turns out, it can contain stale URLs in the case that some script
1840         manipulates the DOM, which breaks scripts trying to reset the favicon
1841         URL. Also added a method in Internals to allow tests to get the list of
1842         icon
1843
1844         Tests: fast/dom/icon-url-change.html
1845                fast/dom/icon-url-list.html
1846
1847         * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
1848         * dom/Document.cpp:
1849         (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
1850         (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
1851         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
1852         * dom/Document.h:
1853         (Document): removed the addIconURL method which is no longer used
1854         * html/HTMLLinkElement.cpp:
1855         (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
1856         (WebCore):
1857         (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
1858         * html/HTMLLinkElement.h:
1859         (HTMLLinkElement): declared the icon type and size accessors
1860         * testing/Internals.cpp:
1861         (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
1862         (WebCore):
1863         * testing/Internals.h:
1864         (Internals): declared the method for unit testing the icon URL list
1865         * testing/Internals.idl: exported the Document::iconURLs function
1866
1867 2012-07-16  Hajime Morrita  <morrita@chromium.org>
1868
1869         WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
1870         https://bugs.webkit.org/show_bug.cgi?id=90764
1871
1872         Reviewed by Adam Barth.
1873
1874         Defined WEBCORE_TESTING based on USE(EXPORT_MACROS_FOR_TESTING) and
1875         applied it to FrameDestructionObserver.
1876
1877         * bindings/js/JSDOMGlobalObject.h: Removed conflicting symbols
1878         * page/FrameDestructionObserver.h: Added WEBKIT_TESTING
1879         (FrameDestructionObserver):
1880         * platform/PlatformExportMacros.h:
1881
1882 2012-07-16  Kiran Muppala  <cmuppala@apple.com>
1883
1884         REGRESSION: RenderInline::absoluteQuads produces incorrect results for fixed position.
1885         https://bugs.webkit.org/show_bug.cgi?id=91451
1886
1887         Reviewed by Simon Fraser.
1888
1889         RenderInline::absoluteQuads relies on copies of RenderGeometryMap,
1890         created indirectly by passing AbsoluteQuadsGeneratorContext object by
1891         value.  These copies are unsafe because the individual transform steps
1892         within the geometry map include a owned poitner to their respective
1893         transform.
1894
1895         Modify the callee methods to take context by reference and disable
1896         copy constructor for RenderGeometryMap.
1897
1898         Test: fast/inline/inline-fixed-position-boundingbox.html
1899
1900         * rendering/RenderGeometryMap.h:
1901         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): Add missing
1902         m_offset to copy constructor initialization list.
1903         (RenderGeometryMap): Disable copy constructor.
1904         * rendering/RenderInline.cpp: Pass context object by reference.
1905         (WebCore::RenderInline::generateLineBoxRects): 
1906         (WebCore::RenderInline::generateCulledLineBoxRects):
1907         (WebCore::RenderInline::absoluteRects):
1908         (WebCore::RenderInline::absoluteQuads):
1909         (WebCore::RenderInline::linesBoundingBox):
1910         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1911         (WebCore::RenderInline::addFocusRingRects):
1912         * rendering/RenderInline.h:
1913         (RenderInline::generateLineBoxRects): Update method declarations to
1914         show pass by reference context parameter.
1915         (RenderInline::generateCulledLineBoxRects): Ditto.
1916
1917 2012-07-16  Hayato Ito  <hayato@chromium.org>
1918
1919         Some events should be always stopped at shadow boundary.
1920         https://bugs.webkit.org/show_bug.cgi?id=90436
1921
1922         Reviewed by Ryosuke Niwa.
1923
1924         The spec is here:
1925         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped
1926
1927         Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html
1928
1929         * dom/EventDispatcher.cpp:
1930         (WebCore::EventDispatcher::determineDispatchBehavior):
1931
1932 2012-07-16  Yoshifumi Inoue  <yosin@chromium.org>
1933
1934         REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month" should return number of month since January 1970
1935         https://bugs.webkit.org/show_bug.cgi?id=91211
1936
1937         Reviewed by Kent Tamura.
1938
1939         This patch changes BaseDateAndTimeInputType::valueAsDouble() to call
1940         virtual function parseToNumber() which "month" input type overrides
1941         instead of non-virtual function parseToDouble() which returns number
1942         of milliseconds.
1943
1944         No new tests. Existing test (fast/form/month/input-valueasnumber-month.html) coverts this, although it is disabled.
1945
1946         * html/BaseDateAndTimeInputType.cpp:
1947         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Changed to call parseToNumber().
1948         (WebCore::BaseDateAndTimeInputType::parseToNumber): Changed to what parseToDouble() did.
1949         * html/BaseDateAndTimeInputType.h:
1950         (BaseDateAndTimeInputType): Remove parseToDouble().
1951
1952 2012-07-16  Adrienne Walker  <enne@google.com>
1953
1954         [chromium] Turn off ScrollbarLayerChromium for Windows due to bad alpha values
1955         https://bugs.webkit.org/show_bug.cgi?id=91438
1956
1957         Reviewed by Kenneth Russell.
1958
1959         r120509 turned on blending for scrollbar thumbs. Unfortunately for
1960         Windows XP scrollbar thumbs, their alpha channel is bogus and so the
1961         thumb ends up being completely transparent. This should ultimately be
1962         fixed in Chromium theme code, but in the meantime this patch turns
1963         off the use of ScrollbarLayerChromium.
1964
1965         This change makes Windows scrollbars fall back to using normal
1966         ContentLayerChromiums and being painted all in one layer on the main
1967         thread rather than being painted separately and composited on the
1968         compositor thread.
1969
1970         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1971         (WebCore::createScrollbarLayer):
1972
1973 2012-07-16  Koji Ishii  <kojiishi@gmail.com>
1974
1975         Vertical alternate glyph (GSUB) support for OpenTypeVerticalData
1976         https://bugs.webkit.org/show_bug.cgi?id=81389
1977
1978         Reviewed by Tony Chang.
1979
1980         This patch adds support for reading 'GSUB' OpenType table to get
1981         vertical alternate glyphs.
1982         http://www.microsoft.com/typography/otspec/gsub.htm
1983
1984         Like bug 81326, this code isn't on any code path yet.
1985
1986         Tests: WebKit/chromium/tests/OpenTypeVerticalDataTest.cpp
1987
1988         * platform/graphics/opentype/OpenTypeTypes.h:
1989         (WebCore::OpenType::validateTable): Moved from OpenTypeVerticalData.cpp for unit tests.
1990         (OpenType):
1991         (TableBase): Ditto.
1992         (WebCore::OpenType::TableBase::isValidEnd):
1993         (WebCore::OpenType::TableBase::validatePtr):
1994         (WebCore::OpenType::TableBase::validateOffset):
1995         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1996         (OpenType): Added several OpenType tables used by 'GSUB' table.
1997         (CoverageTable):
1998         (Coverage1Table):
1999         (Coverage2Table):
2000         (RangeRecord):
2001         (SubstitutionSubTable):
2002         (WebCore::OpenType::SubstitutionSubTable::coverage):
2003         (SingleSubstitution2SubTable):
2004         (LookupTable):
2005         (WebCore::OpenType::LookupTable::getSubstitutions):
2006         (LookupList):
2007         (WebCore::OpenType::LookupList::lookup):
2008         (FeatureTable):
2009         (WebCore::OpenType::FeatureTable::getGlyphSubstitutions):
2010         (FeatureList):
2011         (FeatureRecord):
2012         (WebCore::OpenType::FeatureList::feature):
2013         (LangSysTable):
2014         (WebCore::OpenType::LangSysTable::feature):
2015         (ScriptTable):
2016         (LangSysRecord):
2017         (WebCore::OpenType::ScriptTable::defaultLangSys):
2018         (ScriptList):
2019         (ScriptRecord):
2020         (WebCore::OpenType::ScriptList::script):
2021         (WebCore::OpenType::ScriptList::defaultScript):
2022         (WebCore::OpenType::ScriptList::defaultLangSys):
2023         (GSUBTable):
2024         (WebCore::OpenType::GSUBTable::scriptList):
2025         (WebCore::OpenType::GSUBTable::featureList):
2026         (WebCore::OpenType::GSUBTable::lookupList):
2027         (WebCore::OpenType::GSUBTable::defaultLangSys):
2028         (WebCore::OpenType::GSUBTable::feature):
2029         (WebCore::OpenType::GSUBTable::getVerticalGlyphSubstitutions):
2030         (WebCore::OpenTypeVerticalData::OpenTypeVerticalData):
2031         (WebCore::OpenTypeVerticalData::loadMetrics): Split code to load metrics from ctor.
2032         (WebCore::OpenTypeVerticalData::loadVerticalGlyphSubstitutions): Load the vertical alternate Glyph substitution table.
2033         (WebCore):
2034         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs): Substitute Glyph IDs with vertical alternate Glyph IDs.
2035         * platform/graphics/opentype/OpenTypeVerticalData.h:
2036         (OpenTypeVerticalData): Added m_verticalGlyphMap.
2037
2038 2012-07-16  Vincent Scheib  <scheib@chromium.org>
2039
2040         Fix spelling of EnforceIFrameAllowFullScreenRequirement and ExemptIFrameAllowFullScreenRequirement.
2041         https://bugs.webkit.org/show_bug.cgi?id=91437
2042
2043         Reviewed by Adrienne Walker.
2044
2045         Document contained spelling errors of 'FulScreen' instead of 'FullScreen'
2046         for the FullScreenCheckType enumeration.
2047
2048         No test changes needed.
2049
2050         * dom/Document.cpp:
2051         (WebCore::Document::requestFullScreenForElement):
2052         * dom/Document.h:
2053         * dom/Element.cpp:
2054         (WebCore::Element::webkitRequestFullscreen):
2055         (WebCore::Element::webkitRequestFullScreen):
2056         * html/HTMLMediaElement.cpp:
2057         (WebCore::HTMLMediaElement::enterFullscreen):
2058         * html/shadow/MediaControlElements.cpp:
2059         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2060
2061 2012-07-16  MORITA Hajime  <morrita@google.com>
2062
2063         Comment on WebCore::HTMLMediaElement::childShouldCreateRenderer() should explain why
2064         https://bugs.webkit.org/show_bug.cgi?id=91174
2065
2066         Reviewed by Kent Tamura.
2067
2068         Clarified the explanation.
2069
2070         * html/HTMLMediaElement.cpp:
2071         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
2072
2073 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2074
2075         Unreviewed, rolling out r120033.
2076         http://trac.webkit.org/changeset/120033
2077         https://bugs.webkit.org/show_bug.cgi?id=91454
2078
2079         Broke background gradients (Requested by smfr on #webkit).
2080
2081         * platform/graphics/GeneratorGeneratedImage.cpp:
2082         (WebCore::GeneratorGeneratedImage::draw):
2083
2084 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2085
2086         IndexedDB: Implement spec updates to IDBTransaction.error
2087         https://bugs.webkit.org/show_bug.cgi?id=91409
2088
2089         Reviewed by Tony Chang.
2090
2091         The Indexed DB spec was updated to resolve some edge cases around the
2092         IDBTransaction.error attribute. It was agreed that accessing error should
2093         never throw, error should be null if the transaction is not finished or
2094         abort() was explicitly called, an appropriate error should be returned if
2095         a commit failed, and a generic AbortError should be used if a request
2096         callback throws. These cases are now handled per spec, except that a reason
2097         is not provided for the commit failure (it's always UnknownError).
2098
2099         Test: storage/indexeddb/transaction-error.html
2100               storage/indexeddb/transaction-abort.html
2101
2102         * Modules/indexeddb/IDBRequest.cpp:
2103         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
2104         re-abort the transaction if dispatching in response to an abort.
2105         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
2106         only if not already aborting, and set it's error to AbortError.
2107         * Modules/indexeddb/IDBTransaction.cpp:
2108         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
2109         * Modules/indexeddb/IDBTransaction.h:
2110         (WebCore::IDBTransaction::db): Move impl to header file.
2111         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
2112         (IDBTransaction):
2113         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
2114
2115 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2116
2117         IndexedDB: Implement spec updates to IDBTransaction.error
2118         https://bugs.webkit.org/show_bug.cgi?id=91409
2119
2120         Reviewed by Tony Chang.
2121
2122         The Indexed DB spec was updated to resolve some edge cases around the
2123         IDBTransaction.error attribute. It was agreed that accessing error should
2124         never throw, error should be null if the transaction is not finished or
2125         abort() was explicitly called, an appropriate error should be returned if
2126         a commit failed, and a generic AbortError should be used if a request
2127         callback throws. These cases are now handled per spec, except that a reason
2128         is not provided for the commit failure (it's always UnknownError).
2129
2130         Test: storage/indexeddb/transaction-error.html
2131               storage/indexeddb/transaction-abort.html
2132
2133         * Modules/indexeddb/IDBRequest.cpp:
2134         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
2135         re-abort the transaction if dispatching in response to an abort.
2136         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
2137         only if not already aborting, and set it's error to AbortError.
2138         * Modules/indexeddb/IDBTransaction.cpp:
2139         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
2140         * Modules/indexeddb/IDBTransaction.h:
2141         (WebCore::IDBTransaction::db): Move impl to header file.
2142         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
2143         (IDBTransaction):
2144         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
2145
2146 2012-07-16  Alec Flett  <alecflett@chromium.org>
2147
2148         IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
2149         https://bugs.webkit.org/show_bug.cgi?id=90923
2150
2151         Reviewed by Darin Fisher.
2152
2153         Refactor IndexWriter to depend only on IDBIndexMetadata and on
2154         (databaseId, objectStoreId, indexId) so that it can talk directly
2155         to the backing store, and also eventually be moved into the renderer.
2156
2157         This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
2158         as a replacement for IDBObjectStoreBackendInterface::put, already
2159         stubbed out in the chromium port. It will fully replace put()
2160         after both chromium and webkit sides have reached alignment.
2161
2162         No new tests as this is just a refactor and existing tests cover
2163         correctness.
2164
2165         * Modules/indexeddb/IDBCursor.cpp:
2166         (WebCore::IDBCursor::setValueReady):
2167         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2168         * Modules/indexeddb/IDBIndexBackendImpl.h:
2169         * Modules/indexeddb/IDBObjectStore.h:
2170         (IDBObjectStore):
2171         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2172         (WebCore::IDBObjectStoreBackendImpl::put):
2173         (WebCore):
2174         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
2175         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2176         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
2177         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2178         (IDBObjectStoreBackendImpl):
2179         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
2180         * Modules/indexeddb/IDBRequest.cpp:
2181         (WebCore::IDBRequest::onSuccess):
2182
2183 2012-07-16  Adrienne Walker  <enne@google.com>
2184
2185         [chromium] Unify compositor quad transforms into content space
2186         https://bugs.webkit.org/show_bug.cgi?id=91350
2187
2188         Reviewed by Kenneth Russell.
2189
2190         For the purpose of simplification and as a first step towards removing
2191         any transform that takes a centered rect, remove the ability of layers
2192         to override the quad transform. All quads and quad transforms operate
2193         on content space with the origin in the top left.
2194
2195         The gutter quads used to use the root layer (that doesn't draw
2196         content) as the layer to create the shared quad state from. This is
2197         now created manually as a layer without bounds should never in general
2198         need a shared quad state created for it.
2199
2200         No change in functionality; tested by existing layout and unit tests.
2201
2202         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2203         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2204         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2205         (WebCore::CCLayerImpl::createSharedQuadState):
2206         * platform/graphics/chromium/cc/CCLayerImpl.h:
2207         (CCLayerImpl):
2208         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2209         (WebCore::CCRenderPass::appendQuadsToFillScreen):
2210         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2211         (WebCore::CCSolidColorLayerImpl::appendQuads):
2212         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2213         (CCSolidColorLayerImpl):
2214         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2215         (WebCore::CCTextureLayerImpl::appendQuads):
2216         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2217         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2218         (CCTiledLayerImpl):
2219         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2220         (WebCore::CCVideoLayerImpl::appendQuads):
2221
2222 2012-07-16  Adrienne Walker  <enne@google.com>
2223
2224         [chromium] Unify compositor quad transforms into content space
2225         https://bugs.webkit.org/show_bug.cgi?id=91350
2226
2227         Reviewed by Kenneth Russell.
2228
2229         For the purpose of simplification and as a first step towards removing
2230         any transform that takes a centered rect, remove the ability of layers
2231         to override the quad transform. All quads and quad transforms operate
2232         on content space with the origin in the top left.
2233
2234         The gutter quads used to use the root layer (that doesn't draw
2235         content) as the layer to create the shared quad state from. This is
2236         now created manually as a layer without bounds should never in general
2237         need a shared quad state created for it.
2238
2239         No change in functionality; tested by existing layout and unit tests.
2240
2241         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2242         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2243         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2244         (WebCore::CCLayerImpl::createSharedQuadState):
2245         * platform/graphics/chromium/cc/CCLayerImpl.h:
2246         (CCLayerImpl):
2247         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2248         (WebCore::CCRenderPass::appendQuadsToFillScreen):
2249         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2250         (WebCore::CCSolidColorLayerImpl::appendQuads):
2251         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2252         (CCSolidColorLayerImpl):
2253         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2254         (WebCore::CCTextureLayerImpl::appendQuads):
2255         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2256         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2257         (CCTiledLayerImpl):
2258         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2259         (WebCore::CCVideoLayerImpl::appendQuads):
2260
2261 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2262
2263         IndexedDB: Resolve test and IDL FIXMEs for a handful of landed patches
2264         https://bugs.webkit.org/show_bug.cgi?id=91423
2265
2266         Reviewed by Tony Chang.
2267
2268         IDBObjectStore.createIndex() had a hack to handle a null keyPath argument for the
2269         DOMString[] overload and treat it as the string "null". Now that IDL arrays are not
2270         nullable by default following r121817 this hack can be removed and the binding layer
2271         will automagically coerce to DOMString.
2272
2273         Test: storage/indexeddb/keypath-basics.html
2274
2275         * Modules/indexeddb/IDBObjectStore.cpp:
2276         (WebCore::IDBObjectStore::createIndex): Remove special case for null in DOMString[] overload.
2277         * Modules/indexeddb/IDBObjectStore.idl: Remove Nullable suffix from DOMString[] overload
2278         so that the DOMString overload will match null.
2279
2280 2012-07-16  Bear Travis  <betravis@adobe.com>
2281
2282         Resolve CSS Exclusions shapeInside, shapeOutside properties to Length based WrapShape classes
2283         https://bugs.webkit.org/show_bug.cgi?id=89670
2284
2285         Reviewed by Dirk Schulze.
2286
2287         Layout of CSS Exclusions requires length based WrapShape classes,
2288         rather than the existing CSSValue based CSSWrapShape classes. This
2289         patch adds length based WrapShape analogs to the CSSWrapShapes, and
2290         modifies RenderStyle to use a WrapShape instead of a CSSWrapShape.
2291         The translation between WrapShape and CSSWrapShape classes
2292         is handled by helper functions in the new WrapShapeFunctions files.
2293         StyleBuilder resolves CSSWrapShapes to WrapShapes for layout use.
2294         CSSComputedStyleDeclaration translates WrapShapes to CSSWrapShapes
2295         for style use.
2296
2297         There are existing tests that cover the style serialization / resolution
2298         in fast/exclusions/parsing-wrap-shape-inside.html and
2299         fast/exclusions/parsing/wrap-shape-outside.html
2300
2301         Test: fast/exclusions/parsing-wrap-shape-lengths.html
2302
2303         * CMakeLists.txt: Build system changes for adding new files
2304         * GNUmakefile.list.am: Ditto
2305         * Target.pri: Ditto
2306         * WebCore.gypi: Ditto
2307         * WebCore.vcproj/WebCore.vcproj: Ditto
2308         * WebCore.xcodeproj/project.pbxproj: Ditto
2309         * css/CSSComputedStyleDeclaration.cpp: Translate WrapShapes back to CSSWrapShapes
2310         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2311         * css/CSSWrapShapes.h: Mostly changing functions to be const
2312         (WebCore::CSSWrapShapeRectangle::type):
2313         (WebCore::CSSWrapShapeCircle::type):
2314         (WebCore::CSSWrapShapeEllipse::type):
2315         (WebCore::CSSWrapShapePolygon::getXAt):
2316         (WebCore::CSSWrapShapePolygon::getYAt):
2317         (WebCore::CSSWrapShapePolygon::values):
2318         (WebCore::CSSWrapShapePolygon::type):
2319         * css/StyleBuilder.cpp: Resolve CSSWrapShapes to WrapShapes
2320         (WebCore):
2321         (WebCore::ApplyPropertyWrapShape::setValue):
2322         (WebCore::ApplyPropertyWrapShape::applyValue):
2323         (WebCore::ApplyPropertyWrapShape::createHandler):
2324         * css/WrapShapeFunctions.cpp: Added.
2325         (WebCore):
2326         (WebCore::valueForWrapShape):
2327         (WebCore::convertToLength):
2328         (WebCore::wrapShapeForValue):
2329         * css/WrapShapeFunctions.h: Added.
2330         (WebCore):
2331         * rendering/style/RenderStyle.h:
2332         * rendering/style/StyleRareNonInheritedData.h:
2333         (StyleRareNonInheritedData):
2334         * rendering/style/WrapShapes.h: Added.
2335         (WebCore):
2336         (WrapShape):
2337         (WebCore::WrapShape::~WrapShape):
2338         (WebCore::WrapShape::WrapShape):
2339         (WrapShapeRectangle):
2340         (WebCore::WrapShapeRectangle::create):
2341         (WebCore::WrapShapeRectangle::left):
2342         (WebCore::WrapShapeRectangle::top):
2343         (WebCore::WrapShapeRectangle::width):
2344         (WebCore::WrapShapeRectangle::height):
2345         (WebCore::WrapShapeRectangle::cornerRadiusX):
2346         (WebCore::WrapShapeRectangle::cornerRadiusY):
2347         (WebCore::WrapShapeRectangle::setLeft):
2348         (WebCore::WrapShapeRectangle::setTop):
2349         (WebCore::WrapShapeRectangle::setWidth):
2350         (WebCore::WrapShapeRectangle::setHeight):
2351         (WebCore::WrapShapeRectangle::setCornerRadiusX):
2352         (WebCore::WrapShapeRectangle::setCornerRadiusY):
2353         (WebCore::WrapShapeRectangle::type):
2354         (WebCore::WrapShapeRectangle::WrapShapeRectangle):
2355         (WrapShapeCircle):
2356         (WebCore::WrapShapeCircle::create):
2357         (WebCore::WrapShapeCircle::left):
2358         (WebCore::WrapShapeCircle::top):
2359         (WebCore::WrapShapeCircle::radius):
2360         (WebCore::WrapShapeCircle::setLeft):
2361         (WebCore::WrapShapeCircle::setTop):
2362         (WebCore::WrapShapeCircle::setRadius):
2363         (WebCore::WrapShapeCircle::type):
2364         (WebCore::WrapShapeCircle::WrapShapeCircle):
2365         (WrapShapeEllipse):
2366         (WebCore::WrapShapeEllipse::create):
2367         (WebCore::WrapShapeEllipse::top):
2368         (WebCore::WrapShapeEllipse::left):
2369         (WebCore::WrapShapeEllipse::radiusX):
2370         (WebCore::WrapShapeEllipse::radiusY):
2371         (WebCore::WrapShapeEllipse::setTop):
2372         (WebCore::WrapShapeEllipse::setLeft):
2373         (WebCore::WrapShapeEllipse::setRadiusX):
2374         (WebCore::WrapShapeEllipse::setRadiusY):
2375         (WebCore::WrapShapeEllipse::type):
2376         (WebCore::WrapShapeEllipse::WrapShapeEllipse):
2377         (WrapShapePolygon):
2378         (WebCore::WrapShapePolygon::create):
2379         (WebCore::WrapShapePolygon::windRule):
2380         (WebCore::WrapShapePolygon::values):
2381         (WebCore::WrapShapePolygon::getXAt):
2382         (WebCore::WrapShapePolygon::getYAt):
2383         (WebCore::WrapShapePolygon::setWindRule):
2384         (WebCore::WrapShapePolygon::appendPoint):
2385         (WebCore::WrapShapePolygon::type):
2386         (WebCore::WrapShapePolygon::WrapShapePolygon):
2387
2388 2012-07-16  Simon Fraser  <simon.fraser@apple.com>
2389
2390         Fix compositing layers in columns when in paginated mode
2391         https://bugs.webkit.org/show_bug.cgi?id=91425
2392
2393         Reviewed by Dave Hyatt.
2394
2395         Enhance a hack that was added to allow composited layers to
2396         display in columns to work for paginated mode, where the
2397         RenderView is renderer with columns.
2398
2399         Test: compositing/columns/composited-in-paginated.html
2400
2401         * rendering/RenderLayer.cpp:
2402         (WebCore::RenderLayer::updateLayerPosition):
2403
2404 2012-07-16  Emil A Eklund  <eae@chromium.org>
2405
2406         Inconsistent rounding in table layout causes background color to bleed through
2407         https://bugs.webkit.org/show_bug.cgi?id=91410
2408
2409         Reviewed by Eric Seidel.
2410
2411         At certain zoom levels a rounding error in the table layout code cases
2412         the table background color to bleed through between cells. Tables layout
2413         happens on pixel bounds however the paint offset wasn't correctly rounded.
2414
2415         Test: fast/sub-pixel/table-rows-no-gaps.html
2416
2417         * rendering/RenderTable.cpp:
2418         (WebCore::RenderTable::paintObject):
2419         Round paintOffset before passing it to the paint method of the children.
2420
2421 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2422
2423         Unreviewed, rolling out r122739.
2424         http://trac.webkit.org/changeset/122739
2425         https://bugs.webkit.org/show_bug.cgi?id=91424
2426
2427         Broke mac builds (Requested by rniwa on #webkit).
2428
2429         * inspector/CodeGeneratorInspector.py:
2430         (flatten_list):
2431
2432 2012-07-16  Dana Jansens  <danakj@chromium.org>
2433
2434         [chromium] Remove non-ephemeral data from RenderSurface as it duplicates data from the owning layer
2435         https://bugs.webkit.org/show_bug.cgi?id=91418
2436
2437         Reviewed by Adrienne Walker.
2438
2439         This removes the filters and masks from render surfaces, and makes them
2440         used directly from the owning layer. Also removes skipsDraw from
2441         surfaces as it was just not used at all.
2442
2443         Covered by existing tests.
2444
2445         * platform/graphics/chromium/LayerChromium.h:
2446         (WebCore::LayerChromium::filters):
2447         (WebCore::LayerChromium::backgroundFilters):
2448         (WebCore::LayerChromium::hasMask):
2449         (WebCore::LayerChromium::hasReplica):
2450         (WebCore::LayerChromium::replicaHasMask):
2451         (LayerChromium):
2452         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2453         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
2454         * platform/graphics/chromium/RenderSurfaceChromium.h:
2455         (RenderSurfaceChromium):
2456         * platform/graphics/chromium/cc/CCLayerImpl.h:
2457         (WebCore::CCLayerImpl::hasMask):
2458         (WebCore::CCLayerImpl::hasReplica):
2459         (WebCore::CCLayerImpl::replicaHasMask):
2460         (CCLayerImpl):
2461         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2462         (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
2463         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2464         (WebCore::calculateDrawTransformsInternal):
2465         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2466         (WebCore::::finishedRenderTarget):
2467         (WebCore::reduceOcclusionBelowSurface):
2468         (WebCore::::leaveToRenderTarget):
2469         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2470         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2471         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2472         (WebCore::CCRenderSurface::drawableContentRect):
2473         (WebCore::CCRenderSurface::appendQuads):
2474         * platform/graphics/chromium/cc/CCRenderSurface.h:
2475         (CCRenderSurface):
2476
2477 2012-07-16  Beth Dakin  <bdakin@apple.com>
2478
2479         https://bugs.webkit.org/show_bug.cgi?id=91299
2480         Paginated views should restrict available height to column height
2481         -and corresponding-
2482         <rdar://problem/11152108>
2483
2484         Reviewed by Dan Bernstein.
2485
2486         Now that RenderViews can have columns, availableLogicalHeight needs to consider 
2487         that column height, much like how availableLogicalWidth already considers column 
2488         width.
2489
2490         availableLogicalHeight is newly virtual, like the already-virtual 
2491         availableLogicalWidth.
2492         * rendering/RenderBox.h:
2493         (RenderBox):
2494
2495         Check with the columnHeight.
2496         * rendering/RenderView.cpp:
2497         (WebCore):
2498         (WebCore::RenderView::availableLogicalHeight):
2499         * rendering/RenderView.h:
2500
2501         setPagination now takes pageLength as an optional parameter. 
2502         * testing/InternalSettings.cpp:
2503         (WebCore::InternalSettings::setPagination):
2504         * testing/InternalSettings.h:
2505         (WebCore::InternalSettings::setPagination):
2506         (InternalSettings):
2507         * testing/InternalSettings.idl:
2508         * testing/Internals.cpp:
2509         (WebCore::Internals::setPagination):
2510         * testing/Internals.h:
2511         (WebCore::Internals::setPagination):
2512         (Internals):
2513         * testing/Internals.idl:
2514
2515 2012-07-16  Dana Jansens  <danakj@chromium.org>
2516
2517         [chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into
2518         https://bugs.webkit.org/show_bug.cgi?id=91288
2519
2520         Reviewed by Adrienne Walker.
2521
2522         Always use pointers to layers when discussing render targets instead of
2523         pointing directly to a RenderSurface.
2524
2525         Covered by existing tests.
2526
2527         * platform/graphics/chromium/LayerChromium.cpp:
2528         (WebCore::LayerChromium::LayerChromium):
2529         (WebCore::LayerChromium::createRenderSurface):
2530         * platform/graphics/chromium/LayerChromium.h:
2531         (WebCore::LayerChromium::renderTarget):
2532         (WebCore::LayerChromium::setRenderTarget):
2533         (LayerChromium):
2534         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2535         * platform/graphics/chromium/RenderSurfaceChromium.h:
2536         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2537         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
2538         * platform/graphics/chromium/TiledLayerChromium.cpp:
2539         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
2540         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2541         (WebCore::CCLayerImpl::CCLayerImpl):
2542         (WebCore::CCLayerImpl::createRenderSurface):
2543         (WebCore::CCLayerImpl::dumpLayerProperties):
2544         * platform/graphics/chromium/cc/CCLayerImpl.h:
2545         (WebCore::CCLayerImpl::renderTarget):
2546         (WebCore::CCLayerImpl::setRenderTarget):
2547         (CCLayerImpl):
2548         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2549         (WebCore::calculateLayerScissorRect):
2550         (WebCore::calculateSurfaceScissorRect):
2551         (WebCore::calculateVisibleContentRect):
2552         (WebCore::computeScrollCompensationForThisLayer):
2553         (WebCore::calculateDrawTransformsInternal):
2554         (WebCore::pointIsClippedBySurfaceOrClipRect):
2555         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2556         (WebCore::::enterLayer):
2557         (WebCore::::leaveLayer):
2558         (WebCore::::enterRenderTarget):
2559         (WebCore::::finishedRenderTarget):
2560         (WebCore):
2561         (WebCore::reduceOcclusionBelowSurface):
2562         (WebCore::::leaveToRenderTarget):
2563         (WebCore::::markOccludedBehindLayer):
2564         (WebCore::::occluded):
2565         (WebCore::::unoccludedContentRect):
2566         (WebCore::::unoccludedContributingSurfaceContentRect):
2567         (WebCore::::layerScissorRectInTargetSurface):
2568         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2569         (CCOcclusionTrackerBase):
2570         (WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
2571         (StackObject):
2572         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2573         (WebCore::CCQuadCuller::appendSurface):
2574         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2575         * platform/graphics/chromium/cc/CCRenderSurface.h:
2576         (CCRenderSurface):
2577
2578 2012-07-16  Florin Malita  <fmalita@chromium.org>
2579
2580         SVGAnimationElement::currentValuesForValuesAnimation crash
2581         https://bugs.webkit.org/show_bug.cgi?id=91326
2582
2583         Reviewed by Simon Fraser.
2584
2585         SVGSMILElement::progress() assumes that seekToIntervalCorrespondingToTime() always
2586         lands inside a defined interval, but one can force arbitrary time offsets using
2587         setCurrentTime(). This patch adds logic for handling non-interval time offsets
2588         gracefully.
2589
2590         Test: svg/animations/smil-setcurrenttime-crash.svg
2591
2592         * svg/animation/SVGSMILElement.cpp:
2593         (WebCore::SVGSMILElement::progress):
2594
2595 2012-07-16  Joshua Netterfield  <jnetterfield@rim.com>
2596
2597         [BlackBerry] Upstream WebGL Code
2598         https://bugs.webkit.org/show_bug.cgi?id=91143
2599
2600         Reviewed by Rob Buis.
2601
2602         This patch includes BlackBerry-specific fixes for anti-aliasing, logging, and shader compilation.
2603
2604         No new tests, because there is no new functionality.
2605
2606         * platform/graphics/GraphicsContext3D.h: Add a value for TI Imagination chipsets on BlackBerry platforms
2607         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: Multiple downstream changes
2608         (WebCore::GraphicsContext3D::GraphicsContext3D):
2609         (WebCore::GraphicsContext3D::reshapeFBOs):
2610         (WebCore):
2611         (WebCore::GraphicsContext3D::logFrameBufferStatus):
2612         (WebCore::GraphicsContext3D::readPixelsIMG): BlackBerry-specific fix for Imagination hardware.
2613         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer):
2614         (WebCore::GraphicsContext3D::platformTexture):
2615         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2616         (WebCore::GraphicsContext3D::paintToCanvas):
2617         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove unnecessary whitespace.
2618         (Extensions3DOpenGL):
2619         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2620         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Hack to fix ANGLE-generated code on BlackBerry platforms.
2621         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2622         (Extensions3DOpenGLCommon):
2623         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: I am not in a position to change system headers from correct to incorrect.
2624         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
2625         (WebCore::Extensions3DOpenGLES::supportsExtension):
2626         * platform/graphics/opengl/Extensions3DOpenGLES.h: I am not in a position to change system headers from correct to incorrect.
2627         (Extensions3DOpenGLES):
2628         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Add a BlackBerry-specific anti-aliasing fix.
2629         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2630         (WebCore::GraphicsContext3D::prepareTexture):
2631         (WebCore::GraphicsContext3D::bindFramebuffer):
2632         (WebCore::GraphicsContext3D::compileShader):
2633         (WebCore::GraphicsContext3D::copyTexImage2D):
2634         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2635         (WebCore):
2636         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2637         (WebCore):
2638
2639 2012-07-16  Tony Chang  <tony@chromium.org>
2640
2641         Position grid items by row/column index
2642         https://bugs.webkit.org/show_bug.cgi?id=91293
2643
2644         Reviewed by Ojan Vafai.
2645
2646         Do some initial grid positioning. Only handle the simple case where tracks are
2647         fixed values and don't properly size the grid items. This gives us something to
2648         work with and starts implementing the "Grid Track Sizing Algorithm":
2649         http://dev.w3.org/csswg/css3-grid-layout/#grid-track-sizing-algorithm0
2650
2651         Test: fast/css-grid-layout/place-cell-by-index.html
2652
2653         * rendering/RenderGrid.cpp:
2654         (RenderGrid::GridTrack): Data structure for holding the track size. UsedBreadth matches the terminology
2655         used in the spec.
2656         (WebCore::RenderGrid::layoutBlock): Pull in some boiler plate code and put the
2657         grid specific code in layoutGridItems.
2658         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Implement part of the grid track sizing algorithm.
2659         (WebCore::RenderGrid::layoutGridItems): Compute the size of grid tracks, layout and position children.
2660         (WebCore::RenderGrid::findChildLogicalPosition): Map track sizes to the actual position of the child.
2661         * rendering/RenderGrid.h:
2662         * rendering/style/RenderStyle.h: Just return a copy of Length rather than a reference to Length. This seems
2663         more consistent with other getters that return a Length.
2664
2665 2012-07-16  Sami Kyostila  <skyostil@chromium.org>
2666
2667         [chromium] Only apply page scale delta to root scroll layer
2668         https://bugs.webkit.org/show_bug.cgi?id=91374
2669
2670         Reviewed by Adrienne Walker.
2671
2672         When the user pinch-zooms the web page though the Chromium compositor, the
2673         per-layer page scale delta is used to keep track of the difference between the
2674         page scale on the compositor thread versus the main thread. On the next
2675         commit to the main thread these values are reset to 1.
2676
2677         When calculating layer positions, the compositor applies a layer's page scale
2678         delta both to the layer itself as well as all of its children. Since we are
2679         currently updating the page scale delta on all scrollable layers, this results
2680         in scrollable child layers getting scaled multiple times.
2681
2682         This patch changes the compositor to only apply the page scale delta on the
2683         root scroll layer.
2684
2685         New unit test: CCLayerTreeHostImplTest.pageScaleDeltaAppliedToRootScrollLayerOnly
2686
2687         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2688         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
2689         (WebCore::CCLayerTreeHostImpl::setPageScaleDelta):
2690
2691 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
2692
2693         Remove setController from BatteryClient
2694         https://bugs.webkit.org/show_bug.cgi?id=90944
2695
2696         Reviewed by Adam Barth.
2697
2698         BatteryClient doesn't need to keep m_controller,
2699         because BatteryController can be accessed using BatteryController::from().
2700         Remove BatteryClient::setController function.
2701
2702         No new tests. Covered by existing tests.
2703
2704         * Modules/battery/BatteryClient.h:
2705         * Modules/battery/BatteryController.cpp:
2706         (WebCore::BatteryController::BatteryController):
2707
2708 2012-07-16  Mike West  <mkwst@chromium.org>
2709
2710         Invalid `script-nonce` directives should block script execution.
2711         https://bugs.webkit.org/show_bug.cgi?id=91353
2712
2713         Reviewed by Adam Barth.
2714
2715         If the `script-nonce` Content Security Policy directive contains an
2716         invalid value, we should fail loudly, throwing a warning to the console
2717         and denying execution of script on the page. The is in line with the
2718         current state of the experimental CSP 1.1 Editors Draft[1].
2719
2720         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental
2721
2722         Test: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html
2723
2724         * page/ContentSecurityPolicy.cpp:
2725         (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
2726             Check against null rather than empty for early exit, otherwise
2727             only compare nonces if the stored nonce isn't empty.
2728         (WebCore::CSPDirectiveList::parseScriptNonce):
2729             Assign the empty string if nonce is invalid.
2730
2731 2012-07-16  Min Qin  <qinmin@chromium.org>
2732
2733         [Android] remove RenderThemeChromiumAndroid::paintMediaFullscreenButton()
2734         https://bugs.webkit.org/show_bug.cgi?id=91291
2735
2736         Reviewed by Adam Barth.
2737
2738         The recent media control refactoring added paintMediaFullscreenButton() in RenderThemeChromiumSkia.
2739         Since RenderThemeChromiumAndroid inherits from that class, we don't need to redefine this function.
2740         No test needed as this change just removes an unnecessary override.
2741
2742         * rendering/RenderThemeChromiumAndroid.cpp:
2743         * rendering/RenderThemeChromiumAndroid.h:
2744
2745 2012-07-16  Peter Rybin  <peter.rybin@gmail.com>
2746
2747         Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build
2748         https://bugs.webkit.org/show_bug.cgi?id=90642
2749
2750         Reviewed by Yury Semikhatsky.
2751
2752         A small intermediate writer is added. It handles comparing old and new source before actual writing.
2753
2754         * inspector/CodeGeneratorInspector.py:
2755         (flatten_list):
2756         (SmartOutput):
2757         (SmartOutput.__init__):
2758         (SmartOutput.write):
2759         (SmartOutput.close):
2760
2761 2012-07-16  Dana Jansens  <danakj@chromium.org>
2762
2763         [chromium] Incorrect assertion: Replicas will cause a RenderPass to be removed twice
2764         https://bugs.webkit.org/show_bug.cgi?id=91328
2765
2766         Reviewed by Adrienne Walker.
2767
2768         We asserted that we would never attempt to remove a render pass that had
2769         already been removed. This was incorrect as a surface with a replica has
2770         two quads and both may cause us to attempt its removal. We must handle
2771         this case gracefully.
2772
2773         Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
2774
2775         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2776         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
2777
2778 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
2779
2780         Web Inspector: native memory: fix instrumentation for string members
2781         https://bugs.webkit.org/show_bug.cgi?id=91384
2782
2783         Reviewed by Pavel Feldman.
2784
2785         It was possible to report a string member via addMember instead of addString.
2786         This patch is fixing the problem and adding a link time guard.
2787
2788         Covered by existing inspector performance tests infrastructure.
2789
2790         * dom/ElementAttributeData.h:
2791         (WebCore::ElementAttributeData::reportMemoryUsage):
2792         * dom/MemoryInstrumentation.h:
2793         (WebCore):
2794         (WebCore::MemoryClassInfo::addString):
2795         * dom/QualifiedName.h:
2796         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2797
2798 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
2799
2800         Unreviewed. Remove unnecessary executable bits after r122720.
2801
2802         * platform/graphics/ImageSource.h:
2803         * platform/graphics/qt/ImageBufferQt.cpp:
2804         * platform/graphics/qt/ImageDecoderQt.cpp:
2805         * platform/graphics/qt/ImageQt.cpp:
2806         * platform/graphics/qt/StillImageQt.h:
2807         * platform/graphics/qt/TransparencyLayer.h:
2808
2809 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
2810
2811         [Qt] Change NativeImagePtr from QPixmap* to QImage*
2812         https://bugs.webkit.org/show_bug.cgi?id=88785
2813
2814         Reviewed by Simon Hausmann.
2815
2816         Since we use raster engine there is no difference between QPixmap and QImage, so we are going
2817         to use QImage everywhere where it is possible. This refactoring contains the change of the
2818         NativeImagePtr typedef from QPixmap* to QImage* and covers the related modifications.
2819
2820         Part of the change is similar to Viatcheslav Ostapenko's internal work.
2821
2822         Covered by existing tests.
2823
2824         * bridge/qt/qt_pixmapruntime.cpp:
2825         (JSC::Bindings::QtPixmapAssignToElementMethod::invoke):
2826         (JSC::Bindings::QtPixmapInstance::variantFromObject):
2827         * platform/DragImage.h:
2828         (WebCore):
2829         * platform/graphics/GraphicsContext.h:
2830         (GraphicsContext):
2831         * platform/graphics/Image.h:
2832         (Image):
2833         * platform/graphics/ImageSource.h:
2834         (WebCore):
2835         * platform/graphics/gstreamer/ImageGStreamer.h:
2836         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
2837         (ImageGStreamer::ImageGStreamer):
2838         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2839         (WebCore::GraphicsContext3D::getImageData):
2840         * platform/graphics/qt/GraphicsContextQt.cpp:
2841         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
2842         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2843         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2844         * platform/graphics/qt/ImageBufferDataQt.h:
2845         (ImageBufferData):
2846         * platform/graphics/qt/ImageBufferQt.cpp:
2847         (WebCore::ImageBufferData::ImageBufferData):
2848         (WebCore::ImageBuffer::copyImage):
2849         (WebCore::ImageBuffer::clip):
2850         (WebCore::ImageBuffer::platformTransformColorSpace):
2851         (WebCore::getImageData):
2852         (WebCore::ImageBuffer::putByteArray):
2853         (WebCore::encodeImage):
2854         (WebCore::ImageBuffer::toDataURL):
2855         * platform/graphics/qt/ImageDecoderQt.cpp:
2856         (WebCore::ImageFrame::asNewNativeImage):
2857         * platform/graphics/qt/ImageQt.cpp:
2858         (graphics):
2859         (loadResourceImage):
2860         (WebCore::Image::loadPlatformResource):
2861         (WebCore::Image::setPlatformResource):
2862         (WebCore::Image::drawPattern):
2863         (WebCore::BitmapImage::BitmapImage):
2864         (WebCore::BitmapImage::draw):
2865         (WebCore::BitmapImage::checkForSolidColor):
2866         (WebCore::BitmapImage::create):
2867         * platform/graphics/qt/NativeImageQt.h: Added.
2868         (WebCore):
2869         (NativeImageQt):
2870         (WebCore::NativeImageQt::defaultFormatForAlphaEnabledImages):
2871         (WebCore::NativeImageQt::defaultFormatForOpaqueImages):
2872          * platform/graphics/qt/PatternQt.cpp:
2873         (WebCore::Pattern::createPlatformPattern):
2874         * platform/graphics/qt/StillImageQt.cpp:
2875         (WebCore::StillImage::StillImage):
2876         (WebCore::StillImage::~StillImage):
2877         (WebCore::StillImage::currentFrameHasAlpha):
2878         (WebCore::StillImage::size):
2879         (WebCore::StillImage::nativeImageForCurrentFrame):
2880         (WebCore::StillImage::draw):
2881         * platform/graphics/qt/StillImageQt.h:
2882         (WebCore::StillImage::create):
2883         (WebCore::StillImage::createForRendering):
2884         (StillImage):
2885         * platform/graphics/qt/TransparencyLayer.h:
2886         (WebCore::TransparencyLayer::TransparencyLayer):
2887         (TransparencyLayer):
2888         * platform/graphics/texmap/TextureMapperGL.cpp:
2889         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
2890         (WebCore::GraphicsSurface::createReadOnlyImage):
2891          * platform/qt/ClipboardQt.cpp:
2892         (WebCore::ClipboardQt::createDragImage):
2893         (WebCore::ClipboardQt::declareAndWriteDragImage):
2894         * platform/qt/CursorQt.cpp:
2895         (WebCore::createCustomCursor):
2896         * platform/qt/DragImageQt.cpp:
2897         (WebCore::createDragImageFromImage):
2898         * platform/qt/PasteboardQt.cpp:
2899         (WebCore::Pasteboard::writeImage):
2900
2901 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
2902
2903         Web Inspector: moving forward to the better memory instrumentation API
2904         https://bugs.webkit.org/show_bug.cgi?id=91259
2905
2906         Reviewed by Pavel Feldman.
2907
2908         I'm trying to remove unnecessary complexity of the API
2909         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
2910         The same will happen with reportPointer, reportObject pair.
2911         Also info.report* will be replaced with info.add*
2912
2913         * bindings/js/ScriptWrappable.h:
2914         (WebCore::ScriptWrappable::reportMemoryUsage):
2915         * bindings/v8/DOMDataStore.cpp:
2916         (WebCore::DOMDataStore::reportMemoryUsage):
2917         * bindings/v8/IntrusiveDOMWrapperMap.h:
2918         (WebCore::ChunkedTable::reportMemoryUsage):
2919         * bindings/v8/ScriptProfiler.cpp:
2920         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2921         * bindings/v8/ScriptWrappable.h:
2922         (WebCore::ScriptWrappable::reportMemoryUsage):
2923         * bindings/v8/V8Binding.cpp:
2924         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2925         (WebCore::StringCache::reportMemoryUsage):
2926         * bindings/v8/V8DOMMap.h:
2927         * css/StylePropertySet.h:
2928         (WebCore::StylePropertySet::reportMemoryUsage):
2929         * dom/CharacterData.cpp:
2930         (WebCore::CharacterData::reportMemoryUsage):
2931         * dom/ContainerNode.h:
2932         (WebCore::ContainerNode::reportMemoryUsage):
2933         * dom/Document.cpp:
2934         (WebCore::Document::reportMemoryUsage):
2935         * dom/Element.h:
2936         (WebCore::Element::reportMemoryUsage):
2937         * dom/ElementAttributeData.h:
2938         (WebCore::ElementAttributeData::reportMemoryUsage):
2939         * dom/MemoryInstrumentation.h:
2940         (WebCore::MemoryInstrumentation::addInstrumentedMember):
2941         (MemoryInstrumentation):
2942         (WebCore::MemoryInstrumentation::addMember):
2943         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
2944         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
2945         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
2946         (WebCore::MemoryInstrumentation::addMemberImpl):
2947         (WebCore::MemoryClassInfo::addInstrumentedMember):
2948         (WebCore::MemoryClassInfo::addMember):
2949         (WebCore::MemoryClassInfo::addHashMap):
2950         (WebCore::MemoryClassInfo::addHashSet):
2951         (WebCore::MemoryClassInfo::addListHashSet):
2952         (WebCore::MemoryClassInfo::addVector):
2953         (WebCore::MemoryClassInfo::addString):
2954         (WebCore::MemoryInstrumentation::addHashMap):
2955         (WebCore::MemoryInstrumentation::addHashSet):
2956         (WebCore::MemoryInstrumentation::addListHashSet):
2957         (WebCore::MemoryInstrumentation::addVector):
2958         * dom/Node.cpp:
2959         (WebCore::Node::reportMemoryUsage):
2960         * dom/QualifiedName.h:
2961         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2962         (WebCore::QualifiedName::reportMemoryUsage):
2963         * inspector/InspectorMemoryAgent.cpp:
2964         (WebCore):
2965         * platform/TreeShared.h:
2966         (WebCore::TreeShared::reportMemoryUsage):
2967
2968 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2969
2970         Unreviewed, rolling out r122714.
2971         http://trac.webkit.org/changeset/122714
2972         https://bugs.webkit.org/show_bug.cgi?id=91380
2973
2974         It broke mac compilation (Requested by loislo on #webkit).
2975
2976         * bindings/js/ScriptWrappable.h:
2977         (WebCore::ScriptWrappable::reportMemoryUsage):
2978         * bindings/v8/DOMDataStore.cpp:
2979         (WebCore::DOMDataStore::reportMemoryUsage):
2980         * bindings/v8/IntrusiveDOMWrapperMap.h:
2981         (WebCore::ChunkedTable::reportMemoryUsage):
2982         * bindings/v8/ScriptProfiler.cpp:
2983         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2984         * bindings/v8/ScriptWrappable.h:
2985         (WebCore::ScriptWrappable::reportMemoryUsage):
2986         * bindings/v8/V8Binding.cpp:
2987         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2988         (WebCore::StringCache::reportMemoryUsage):
2989         * bindings/v8/V8DOMMap.h:
2990         * css/StylePropertySet.h:
2991         (WebCore::StylePropertySet::reportMemoryUsage):
2992         * dom/CharacterData.cpp:
2993         (WebCore::CharacterData::reportMemoryUsage):
2994         * dom/ContainerNode.h:
2995         (WebCore::ContainerNode::reportMemoryUsage):
2996         * dom/Document.cpp:
2997         (WebCore::Document::reportMemoryUsage):
2998         * dom/Element.h:
2999         (WebCore::Element::reportMemoryUsage):
3000         * dom/ElementAttributeData.h:
3001         (WebCore::ElementAttributeData::reportMemoryUsage):
3002         * dom/MemoryInstrumentation.h:
3003         (WebCore::MemoryInstrumentation::reportObject):
3004         (MemoryInstrumentation):
3005         (WebCore::MemoryInstrumentation::reportPointer):
3006         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
3007         (WebCore::MemoryClassInfo::reportInstrumentedObject):
3008         (WebCore::MemoryClassInfo::reportPointer):
3009         (WebCore::MemoryClassInfo::reportObject):
3010         (WebCore::MemoryClassInfo::reportHashMap):
3011         (WebCore::MemoryClassInfo::reportHashSet):
3012         (WebCore::MemoryClassInfo::reportListHashSet):
3013         (WebCore::MemoryClassInfo::reportVector):
3014         (MemoryClassInfo):
3015         (WebCore::MemoryClassInfo::reportString):
3016         (WebCore):
3017         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
3018         (WebCore::MemoryInstrumentation::reportInstrumentedObject):
3019         (WebCore::MemoryInstrumentation::reportHashMap):
3020         (WebCore::MemoryInstrumentation::reportHashSet):
3021         (WebCore::MemoryInstrumentation::reportListHashSet):
3022         (WebCore::MemoryInstrumentation::reportVector):
3023         * dom/Node.cpp:
3024         (WebCore::Node::reportMemoryUsage):
3025         * dom/QualifiedName.h:
3026         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3027         (WebCore::QualifiedName::reportMemoryUsage):
3028         * inspector/InspectorMemoryAgent.cpp:
3029         (WebCore):
3030         * platform/TreeShared.h:
3031         (WebCore::TreeShared::reportMemoryUsage):
3032
3033 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
3034
3035         Web Inspector: moving forward to the better memory instrumentation API
3036         https://bugs.webkit.org/show_bug.cgi?id=91259
3037
3038         Reviewed by Pavel Feldman.
3039
3040         I'm trying to remove unnecessary complexity of the API
3041         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
3042         The same will happen with reportPointer, reportObject pair.
3043         Also info.report* will be replaced with info.add*
3044
3045         * bindings/js/ScriptWrappable.h:
3046         (WebCore::ScriptWrappable::reportMemoryUsage):
3047         * bindings/v8/DOMDataStore.cpp:
3048         (WebCore::DOMDataStore::reportMemoryUsage):
3049         * bindings/v8/IntrusiveDOMWrapperMap.h:
3050         (WebCore::ChunkedTable::reportMemoryUsage):
3051         * bindings/v8/ScriptProfiler.cpp:
3052         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
3053         * bindings/v8/ScriptWrappable.h:
3054         (WebCore::ScriptWrappable::reportMemoryUsage):
3055         * bindings/v8/V8Binding.cpp:
3056         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
3057         (WebCore::StringCache::reportMemoryUsage):
3058         * bindings/v8/V8DOMMap.h:
3059         * css/StylePropertySet.h:
3060         (WebCore::StylePropertySet::reportMemoryUsage):
3061         * dom/CharacterData.cpp:
3062         (WebCore::CharacterData::reportMemoryUsage):
3063         * dom/ContainerNode.h:
3064         (WebCore::ContainerNode::reportMemoryUsage):
3065         * dom/Document.cpp:
3066         (WebCore::Document::reportMemoryUsage):
3067         * dom/Element.h:
3068         (WebCore::Element::reportMemoryUsage):
3069         * dom/ElementAttributeData.h:
3070         (WebCore::ElementAttributeData::reportMemoryUsage):
3071         * dom/MemoryInstrumentation.h:
3072         (WebCore::MemoryInstrumentation::addInstrumentedMember):
3073         (MemoryInstrumentation):
3074         (WebCore::MemoryInstrumentation::addMember):
3075         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
3076         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
3077         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
3078         (WebCore::MemoryInstrumentation::addMemberImpl):
3079         (WebCore::MemoryClassInfo::addInstrumentedMember):
3080         (WebCore::MemoryClassInfo::addMember):
3081         (WebCore::MemoryClassInfo::addHashMap):
3082         (WebCore::MemoryClassInfo::addHashSet):
3083         (WebCore::MemoryClassInfo::addListHashSet):
3084         (WebCore::MemoryClassInfo::addVector):
3085         (WebCore::MemoryClassInfo::addString):
3086         (WebCore::MemoryInstrumentation::addHashMap):
3087         (WebCore::MemoryInstrumentation::addHashSet):
3088         (WebCore::MemoryInstrumentation::addListHashSet):
3089         (WebCore::MemoryInstrumentation::addVector):
3090         * dom/Node.cpp:
3091         (WebCore::Node::reportMemoryUsage):
3092         * dom/QualifiedName.h:
3093         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3094         (WebCore::QualifiedName::reportMemoryUsage):
3095         * inspector/InspectorMemoryAgent.cpp:
3096         (WebCore):
3097         * platform/TreeShared.h:
3098         (WebCore::TreeShared::reportMemoryUsage):
3099
3100 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
3101
3102         Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
3103         https://bugs.webkit.org/show_bug.cgi?id=91227
3104
3105         Reviewed by Pavel Feldman.
3106
3107         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
3108         {
3109             MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
3110             info.visitBaseClass<ScriptWrappable>(this);
3111
3112             info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
3113             info.addInstrumentedMember(m_next);
3114             info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
3115             info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
3116             info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
3117         }
3118
3119         The change is covered by existing tests for native memory snapshot.
3120
3121         * bindings/v8/DOMDataStore.cpp:
3122         (WebCore::DOMDataStore::reportMemoryUsage):
3123         * bindings/v8/IntrusiveDOMWrapperMap.h:
3124         (WebCore::ChunkedTable::reportMemoryUsage):
3125         * bindings/v8/ScriptWrappable.h:
3126         (WebCore::ScriptWrappable::reportMemoryUsage):
3127         * bindings/v8/V8Binding.cpp:
3128         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
3129         (WebCore::StringCache::reportMemoryUsage):
3130         * bindings/v8/V8DOMMap.h:
3131         * css/StylePropertySet.h:
3132         (WebCore::StylePropertySet::reportMemoryUsage):
3133         * dom/CharacterData.cpp:
3134         (WebCore::CharacterData::reportMemoryUsage):
3135         * dom/ContainerNode.h:
3136         (WebCore::ContainerNode::reportMemoryUsage):
3137         * dom/Document.cpp:
3138         (WebCore::Document::reportMemoryUsage):
3139         * dom/Element.h:
3140         (WebCore::Element::reportMemoryUsage):
3141         * dom/ElementAttributeData.h:
3142         (WebCore::ElementAttributeData::reportMemoryUsage):
3143         * dom/MemoryInstrumentation.h:
3144         (MemoryInstrumentation):
3145         (WebCore::MemoryObjectInfo::objectType):
3146         (WebCore::MemoryObjectInfo::objectSize):
3147         (WebCore::MemoryObjectInfo::memoryInstrumentation):
3148         (MemoryObjectInfo):
3149         (WebCore::MemoryObjectInfo::reportObjectInfo):
3150         (WebCore):
3151         (MemoryClassInfo):
3152         (WebCore::MemoryClassInfo::MemoryClassInfo):
3153         (WebCore::MemoryClassInfo::visitBaseClass):
3154         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
3155         (WebCore::MemoryClassInfo::reportInstrumentedObject):
3156         (WebCore::MemoryClassInfo::reportPointer):
3157         (WebCore::MemoryClassInfo::reportObject):
3158         (WebCore::MemoryClassInfo::reportHashMap):
3159         (WebCore::MemoryClassInfo::reportHashSet):
3160         (WebCore::MemoryClassInfo::reportListHashSet):
3161         (WebCore::MemoryClassInfo::reportVector):
3162         (WebCore::MemoryClassInfo::reportString):
3163         * dom/Node.cpp:
3164         (WebCore::Node::reportMemoryUsage):
3165         * dom/QualifiedName.h:
3166         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3167         (WebCore::QualifiedName::reportMemoryUsage):
3168         * platform/TreeShared.h:
3169         (WebCore::TreeShared::reportMemoryUsage):
3170
3171 2012-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3172
3173         Unreviewed. Fix make distcheck.
3174
3175         * GNUmakefile.am: Add missing idl directory.
3176         * GNUmakefile.list.am: Add missing files to compilation.
3177
3178 2012-07-16  Eugene Klyuchnikov  <eustas.big@gmail.com>
3179
3180         Web Inspector: Implement message loop instrumentation for timeline
3181         https://bugs.webkit.org/show_bug.cgi?id=88325
3182
3183         Reviewed by Pavel Feldman.
3184
3185         Message loop instrumentation will show when the render thread is busy.
3186
3187         * inspector/front-end/Settings.js:
3188         (WebInspector.ExperimentsSettings):
3189         Added new experiment.
3190         * inspector/front-end/TimelineGrid.js:
3191         (WebInspector.TimelineGrid.prototype.get dividersLabelBarElement):
3192         Exposed label bar element.
3193         * inspector/front-end/TimelinePanel.js:
3194         (WebInspector.TimelinePanel):
3195         (WebInspector.TimelinePanel.prototype._resetPanel):
3196         Cleanups recorded tasks.
3197         (WebInspector.TimelinePanel.prototype._refresh):
3198         Updates CPU bar.
3199         (WebInspector.TimelinePanel.prototype._refreshRecords):
3200         Ditto.
3201         (WebInspector.TimelinePanel.prototype._refreshCpuBars.compareEndTime):
3202         Ditto.
3203         (WebInspector.TimelinePanel.prototype._refreshCpuBars):
3204         Ditto.
3205         (WebInspector.TimelinePanel.prototype._enableMainThreadMonitoringExperiment):
3206         Adds CPU bar to UI.
3207         (WebInspector.TimelinePanel.prototype._showPopover):
3208         Fix NPE.
3209         (WebInspector.TimelineCalculator.prototype.computeTime):
3210         Utility for position to time conversion.
3211         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
3212         Remenbers clientWidth.
3213         * inspector/front-end/TimelinePresentationModel.js:
3214         (WebInspector.TimelinePresentationModel.categories):
3215         Define CPU bar colors.
3216         * inspector/front-end/timelinePanel.css:
3217         (.timeline-cpu-bars):
3218         CPU bar styles.
3219         (.timeline-cpu-bars-label):
3220         Ditto.
3221
3222 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3223
3224         Unreviewed, rolling out r122681.
3225         http://trac.webkit.org/changeset/122681
3226         https://bugs.webkit.org/show_bug.cgi?id=91363
3227
3228         Patch introduces crashes in debug builds for GTK and EFL ports
3229         (Requested by zdobersek on #webkit).
3230
3231         * platform/ScrollableArea.cpp:
3232         (WebCore::ScrollableArea::scrollPositionChanged):
3233
3234 2012-07-16  Luke Macpherson  <macpherson@chromium.org>
3235
3236         Compilation failure in StyleResolver.cpp (clang)
3237         https://bugs.webkit.org/show_bug.cgi?id=89892
3238
3239         Reviewed by Ryosuke Niwa.
3240
3241         Patch adds assertions that unreachable code is in fact not reached.
3242
3243         Covered by fast/css/variables tests.
3244
3245         * css/CSSParser.cpp:
3246         (WebCore::CSSParser::parseValue):
3247         * css/StyleResolver.cpp:
3248         (WebCore::StyleResolver::collectMatchingRulesForList):
3249
3250 2012-07-15  Mike Lawther  <mikelawther@chromium.org>
3251
3252         Fix calculation of rgba's alpha in CSS custom text
3253         https://bugs.webkit.org/show_bug.cgi?id=91355
3254
3255         Reviewed by Ryosuke Niwa.
3256
3257         Alpha values are stored as an 8 bit value. To convert this to a float in the
3258         range [0,1], we need to divide by 255, not 256. 
3259
3260         Test: fast/css/rgba-custom-text.html
3261
3262         * css/CSSPrimitiveValue.cpp:
3263         (WebCore::CSSPrimitiveValue::customCssText):
3264
3265 2012-07-15  Jason Liu  <jason.liu@torchmobile.com.cn>
3266
3267         [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
3268         https://bugs.webkit.org/show_bug.cgi?id=90962
3269
3270         Reviewed by Rob Buis.
3271
3272         We start a new NetworkJob with credentials after receiving 401/407 status.
3273         We should not release resources in webcore when the old job is closed because
3274         they are needed by the new one.
3275         We should do as 3XX.
3276
3277         No new tests. No change in behaviour.
3278
3279         * platform/network/blackberry/NetworkJob.cpp:
3280         (WebCore::NetworkJob::NetworkJob):
3281         (WebCore::NetworkJob::notifyAuthReceived):
3282         (WebCore::NetworkJob::shouldReleaseClientResource):
3283         (WebCore::NetworkJob::handleRedirect):
3284         * platform/network/blackberry/NetworkJob.h:
3285         (NetworkJob):
3286
3287 2012-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3288
3289         REGRESSION(r122660): Cannot iterate over HTMLCollection that contains non-child descendent nodes in some conditions
3290         https://bugs.webkit.org/show_bug.cgi?id=91334
3291
3292         Reviewed by Ojan Vafai.
3293
3294         The bug was caused by using lastChild() as the starting node for traversePreviousNode. Since it's the inverse of
3295         Node::traverseNextNode(), which visits nodes in pre order, we must start our search from the last descendent node,
3296         which is visited traverseNextNode immediately before reaching the root node.
3297
3298         Test: fast/dom/htmlcollection-backwards-subtree-iteration.html
3299
3300         * html/HTMLCollection.cpp:
3301         (WebCore::lastDescendent):
3302         (WebCore):
3303         (WebCore::itemBeforeOrAfter):
3304
3305 2012-07-15  Joseph Pecoraro  <pecoraro@apple.com>
3306
3307         Windowless WebView not firing JavaScript load event if there is a media element
3308         https://bugs.webkit.org/show_bug.cgi?id=91331
3309
3310         Reviewed by Eric Carlson.
3311
3312         In prepareForLoad we start deferring the load event. If we fall into this
3313         clause where the page can not start loading media we bail, potentially
3314         indefinitely waiting until we can start loading media. Since we can not
3315         be certain this will ever happen, we should stop deferring the page's
3316         load event.
3317
3318         Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only
3319         way this path was reachable right now is on the mac port.
3320
3321         * html/HTMLMediaElement.cpp:
3322         (WebCore::HTMLMediaElement::loadInternal):
3323
3324 2012-07-15  Dan Bernstein  <mitz@apple.com>
3325
3326         <rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube)
3327         https://bugs.webkit.org/show_bug.cgi?id=91348
3328
3329         Reviewed by Anders Carlsson.
3330
3331         * platform/ScrollableArea.cpp:
3332         (WebCore::ScrollableArea::scrollPositionChanged): Added an early return if the scroll position
3333         did not, in fact, change. This avoids the call to ScrollAnimator::notifyContentAreaScrolled,
3334         which is what causes the scroll bars to flash.
3335
3336 2012-07-14  Eric Carlson  <eric.carlson@apple.com>
3337
3338         Enable AVCF hardware video decoding
3339         https://bugs.webkit.org/show_bug.cgi?id=90015
3340         <rdar://problem/10770317>
3341
3342         Reviewed by Anders Carlsson.
3343
3344         * html/HTMLMediaElement.cpp:
3345         (WebCore):
3346         (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics 
3347             device adapter.
3348         * html/HTMLMediaElement.h:
3349
3350         * page/ChromeClient.h:
3351         (WebCore::ChromeClient::graphicsDeviceAdapter): New.
3352
3353         * platform/graphics/MediaPlayer.cpp:
3354         (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics
3355             device adapter.
3356         * platform/graphics/MediaPlayer.h:
3357
3358         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice
3359             and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey.
3360
3361         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 
3362         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9
3363             device interface to the AVFWrapper.
3364         (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex,
3365             tell the AVAsset to enable hardware video decoding.
3366         (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex.
3367
3368         * platform/graphics/ca/win/CACFLayerTreeHost.h:
3369         (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
3370
3371         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
3372         (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
3373         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
3374         (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New.
3375         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
3376
3377         * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY,
3378             and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL.
3379
3380 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
3381
3382         Fix Chromium Mac build failure after r122670.
3383
3384         * platform/graphics/mac/ComplexTextController.cpp:
3385
3386 2012-07-14  Mark Rowe  <mrowe@apple.com>
3387
3388         Fix the Snow Leopard build.
3389
3390         * platform/LocalizedStrings.cpp:
3391         (WebCore::contextMenuItemTagLookUpInDictionary): Fix a typo in the condition so that Snow Leopard
3392         continues to take the expected path.
3393
3394 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
3395
3396         Accessing the last item in children should be a constant time operation
3397         https://bugs.webkit.org/show_bug.cgi?id=91320
3398
3399         Reviewed by Ojan Vafai.
3400
3401         Traverse nodes from the last item when the target offset we're looking for is closer to the last item
3402         than to the cached item. e.g. if the cached item was at offset 0 in the collection and length was 100,
3403         we should not be looking for the item at offset 95 from the cached item.
3404
3405         Note that this trick can be only used in HTML collection that supports itemBefore and when the length
3406         cache is available.
3407
3408         Also broke shouldSearchFromFirstItem into smaller logical pieces to clarify the intents.
3409
3410         Test: perf/htmlcollection-last-item.html
3411
3412         * html/HTMLCollection.cpp:
3413         (WebCore):
3414         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
3415         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
3416         (WebCore::HTMLCollection::item):
3417         * html/HTMLCollection.h:
3418         (HTMLCollection):
3419
3420 2012-07-14  Mark Rowe  <mrowe@apple.com>
3421
3422         Fix the Windows build.
3423
3424         * platform/network/cf/DNSCFNet.cpp: Fix the condition to take Windows in to account.
3425
3426 2012-07-14  Mark Rowe  <mrowe@apple.com>
3427
3428         Make it explicit which code paths iOS should use when doing checks based on OS X versions.
3429
3430         Rubber-stamped by David Kilzer.
3431
3432         * WebCore.exp.in:
3433         * accessibility/AccessibilityList.h:
3434         * accessibility/AccessibilityTable.h:
3435         * accessibility/mac/AXObjectCacheMac.mm:
3436         * editing/mac/EditorMac.mm:
3437         * loader/MainResourceLoader.cpp:
3438         * loader/MainResourceLoader.h:
3439    &n