2f10261c7ee8e3cba0630bd2ad723bc5861ac708
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-11  Alec Flett  <alecflett@chromium.org>
2
3         IndexedDB: Protect against key prefix overflows
4         https://bugs.webkit.org/show_bug.cgi?id=111138
5
6         Reviewed by Tony Chang.
7
8         This reworks the boundary checking for all databaseId,
9         objectStoreId, and indexId, including negative and
10         zero-based ids. All entrypoints into IDBLevelDBCoding
11         are protected with explicit checks and all internal
12         uses of KeyPrefix are protected with ASSERTs in the
13         various constructors.
14
15         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
16
17         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
18         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
19
20 2013-03-11  Xan Lopez  <xlopez@igalia.com>
21
22         [BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
23         https://bugs.webkit.org/show_bug.cgi?id=110580
24
25         Reviewed by Rob Buis.
26
27         Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
28         link phase fails.
29
30         * PlatformBlackBerry.cmake:
31
32 2013-03-11  Pavel Feldman  <pfeldman@chromium.org>
33
34         Web Inspector: fix styles toolbar in the vertical mode.
35         Not reviewed: swapped two lines.
36
37         * inspector/front-end/ElementsPanel.js:
38         (WebInspector.ElementsPanel.prototype._splitVertically):
39
40 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
41
42         Web Inspector: [CodeMirror] add token highlight feature
43         https://bugs.webkit.org/show_bug.cgi?id=112009
44
45         Reviewed by Pavel Feldman.
46
47         Handle CodeMirror's "cursorActivity" event, check selection for being
48         a word and highlight all its occurrences via CodeMirror.addOverlay method.
49
50         No new tests.
51
52         * inspector/front-end/CodeMirrorTextEditor.js:
53         (WebInspector.CodeMirrorTextEditor):
54         (WebInspector.CodeMirrorTextEditor.TokenHighlighter):
55         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
56         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
57         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
58         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
59         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
60         * inspector/front-end/cm/cmdevtools.css:
61         (.cm-token-highlight):
62
63 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
64
65         Web Inspector: [CodeMirror] set indentation size according to devtools settings
66         https://bugs.webkit.org/show_bug.cgi?id=111717
67
68         Reviewed by Pavel Feldman.
69
70         Set up codemirror indent size according to devtools settings.
71
72         No new tests.
73
74         * inspector/front-end/CodeMirrorTextEditor.js:
75         (.get if):
76         (WebInspector.CodeMirrorTextEditor):
77
78 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
79
80         Web Inspector: add per image statistics to the native memory snapshot
81         https://bugs.webkit.org/show_bug.cgi?id=112011
82
83         Reviewed by Pavel Feldman.
84
85         Added per-image statistics to the native memory distribution table.
86
87         * inspector/front-end/HeapSnapshotProxy.js:
88         (WebInspector.HeapSnapshotWorker):
89         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
90         (WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
91         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
92         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
93         proxy constructor function instead of its name. This eliminates unnecessary function lookup.
94         (WebInspector.HeapSnapshotLoaderProxy):
95         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
96         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
97         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
98         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
99         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
100         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
101         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
102         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
103         (WebInspector.NativeHeapSnapshotProxy):
104         (WebInspector.NativeHeapSnapshotProxy.prototype.images):
105         * inspector/front-end/HeapSnapshotView.js:
106         (WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
107         (WebInspector.HeapProfileHeader.prototype._setupWorker):
108         * inspector/front-end/NativeHeapSnapshot.js:
109         (WebInspector.NativeHeapSnapshot.prototype.images):
110         * inspector/front-end/NativeMemorySnapshotView.js:
111         (WebInspector.NativeSnapshotNode):
112         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
113         (WebInspector.NativeSnapshotNode.prototype._populate):
114         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
115         (WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
116         (WebInspector.NativeSnapshotNode.prototype._addImageDetails):
117         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):
118
119 2013-03-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
120
121         [Qt] Enable tiled shadow blur for inset box shadows
122         https://bugs.webkit.org/show_bug.cgi?id=111736
123
124         Reviewed by Noam Rosenthal.
125
126         Paint inset box-shadows using the optimized tiled shadow blur, instead of
127         applying shadow blur to the entire painted rect.
128
129         This optimizes the default CSS on common pastebin sites.
130
131         Tested by existing tests.
132
133         * platform/graphics/GraphicsContext.cpp:
134         * platform/graphics/ShadowBlur.cpp:
135         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
136             Must set fill color before calling clearShadow, as that might clear m_color.
137         (WebCore::ShadowBlur::drawLayerPieces):
138             Ditto.
139         * platform/graphics/qt/GraphicsContextQt.cpp:
140         (WebCore::GraphicsContext::fillPath):
141         (WebCore::GraphicsContext::fillRectWithRoundedHole):
142
143 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
144
145         [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
146         https://bugs.webkit.org/show_bug.cgi?id=111997
147
148         Reviewed by Rob Buis.
149
150         This changed in r130439 but the old name was introduced again by
151         mistake in r144465.
152
153         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
154         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
155         * platform/graphics/blackberry/LayerWebKitThread.cpp:
156         (WebCore::LayerWebKitThread::setNeedsCommit):
157
158 2013-03-11  Kent Tamura  <tkent@chromium.org>
159
160         Inappropriate validation message for required number/date input elements
161         https://bugs.webkit.org/show_bug.cgi?id=111982
162
163         Reviewed by Kentaro Hara.
164
165         For validation message, badInput messages should take precedence
166         over valueMissing messages because users already filled out the
167         field with a bad value.
168
169         Tests: Update fast/forms/validationMessage.html
170
171         * html/InputType.cpp:
172         (WebCore::InputType::validationMessage):
173         Check badInput first.
174
175 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
176
177         Web Inspector: extract common parts of native profiles
178         https://bugs.webkit.org/show_bug.cgi?id=111965
179
180         Reviewed by Alexander Pavlov.
181
182         Extracted common parts of native profiles into NativeProfileTypeBase. Memory
183         domain dispatcher is now a separate class as it is shared by two native memory
184         profile types.
185
186         Both native memory profile types now capture native heap graph.
187
188         * inspector/front-end/NativeMemorySnapshotView.js:
189         (WebInspector.MemoryAgentDispatcher.instance):
190         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
191         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
192         (WebInspector.NativeSnapshotProfileType):
193         (WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
194         (WebInspector.NativeMemoryProfileType):
195         (WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
196         (WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):
197
198 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
199
200         Unreviewed, rolling out r145349.
201         http://trac.webkit.org/changeset/145349
202         https://bugs.webkit.org/show_bug.cgi?id=111966
203
204         Missing code history of Element,PageRuleCollector. (Requested
205         by tasak on #webkit).
206
207         * CMakeLists.txt:
208         * GNUmakefile.list.am:
209         * Target.pri:
210         * WebCore.gypi:
211         * WebCore.xcodeproj/project.pbxproj:
212         * css/CSSAllInOne.cpp:
213         * css/DocumentRuleSets.cpp:
214         (WebCore::ShadowDistributedRules::collectMatchRequests):
215         * css/DocumentRuleSets.h:
216         * css/ElementRuleCollector.cpp: Removed.
217         * css/ElementRuleCollector.h: Removed.
218         * css/PageRuleCollector.cpp: Removed.
219         * css/PageRuleCollector.h: Removed.
220         * css/StyleResolver.cpp:
221         (WebCore::leftToRightDeclaration):
222         (WebCore):
223         (WebCore::rightToLeftDeclaration):
224         (WebCore::StyleResolver::State::ensureRuleList):
225         (WebCore::StyleResolver::State::clear):
226         (WebCore::StyleResolver::addMatchedProperties):
227         (WebCore::StyleResolver::addElementStyleProperties):
228         (MatchingUARulesScope):
229         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
230         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
231         (WebCore::MatchingUARulesScope::isMatchingUARules):
232         (WebCore::StyleResolver::collectMatchingRules):
233         (WebCore::StyleResolver::collectMatchingRulesForRegion):
234         (WebCore::StyleResolver::sortAndTransferMatchedRules):
235         (WebCore::StyleResolver::matchScopedAuthorRules):
236         (WebCore::StyleResolver::matchHostRules):
237         (WebCore::StyleResolver::matchAuthorRules):
238         (WebCore::StyleResolver::matchUserRules):
239         (WebCore::StyleResolver::matchUARules):
240         (WebCore::StyleResolver::collectMatchingRulesForList):
241         (WebCore::compareRules):
242         (WebCore::StyleResolver::sortMatchedRules):
243         (WebCore::StyleResolver::matchAllRules):
244         (WebCore::StyleResolver::State::initForStyleResolve):
245         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
246         (WebCore::StyleResolver::styleForElement):
247         (WebCore::StyleResolver::styleForKeyframe):
248         (WebCore::StyleResolver::pseudoStyleForElement):
249         (WebCore::StyleResolver::styleForPage):
250         (WebCore::StyleResolver::pseudoStyleRulesForElement):
251         (WebCore::StyleResolver::ruleMatches):
252         (WebCore::StyleResolver::checkRegionSelector):
253         (WebCore::comparePageRules):
254         (WebCore::StyleResolver::matchPageRules):
255         (WebCore::checkPageSelectorComponents):
256         (WebCore::StyleResolver::matchPageRulesForList):
257         (WebCore::StyleResolver::isLeftPage):
258         (WebCore::StyleResolver::isFirstPage):
259         (WebCore::StyleResolver::pageName):
260         * css/StyleResolver.h:
261         (WebCore::MatchRequest::MatchRequest):
262         (MatchRequest):
263         (StyleResolver):
264         (MatchResult):
265         (WebCore::StyleResolver::State::State):
266         (State):
267         (WebCore::StyleResolver::State::takeRuleList):
268         (WebCore::StyleResolver::State::setSameOriginOnly):
269         (WebCore::StyleResolver::State::isSameOriginOnly):
270         (WebCore::StyleResolver::State::pseudoStyleRequest):
271         (WebCore::StyleResolver::State::setMode):
272         (WebCore::StyleResolver::State::mode):
273         (WebCore::StyleResolver::State::matchedRules):
274         (WebCore::StyleResolver::State::addMatchedRule):
275         * inspector/InspectorCSSAgent.cpp:
276         (WebCore::InspectorCSSAgent::willMatchRule):
277         * inspector/InspectorCSSAgent.h:
278         (WebCore):
279         (InspectorCSSAgent):
280         * inspector/InspectorInstrumentation.cpp:
281         (WebCore):
282         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
283         * inspector/InspectorInstrumentation.h:
284         (WebCore):
285         (InspectorInstrumentation):
286         (WebCore::InspectorInstrumentation::willMatchRule):
287
288 2013-03-11  Marja Hölttä  <marja@chromium.org>
289
290         [V8] Fix V8InjectedScriptManager
291         https://bugs.webkit.org/show_bug.cgi?id=111968
292
293         Reviewed by Kentaro Hara.
294
295         This is needed to make the inspector work after templates for main world
296         and non-main worlds are separated (bug 111724).
297
298         No new tests (no changes in functionality).
299
300         * bindings/v8/custom/V8InjectedScriptManager.cpp:
301         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
302
303 2013-03-11  Hayato Ito  <hayato@chromium.org>
304
305         Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
306         https://bugs.webkit.org/show_bug.cgi?id=111957
307
308         Reviewed by Hajime Morrita.
309
310         It'd be nice to have an assertion here since
311         CSSSelector::pseudoType() will never parse a new value after it
312         parses a value and m_pseudoType is set to non-PseudoNotParsed.
313
314         No new tests (no change in behaviour).
315
316         * css/CSSSelector.h:
317         (WebCore::CSSSelector::setValue):
318
319 2013-03-11  Takashi Sakamoto  <tasak@google.com>
320
321         [Refactoring] Implement RuleCollector
322         https://bugs.webkit.org/show_bug.cgi?id=109916
323
324         Reviewed by Antti Koivisto.
325
326         Implemented rule collector for an element and collector for a page.
327         Not all members in class State are required entire while resolving
328         a style.
329
330         No new tests, because just refactoring.
331
332         * CMakeLists.txt:
333         * GNUmakefile.list.am:
334         * Target.pri:
335         * WebCore.gypi:
336         * WebCore.xcodeproj/project.pbxproj:
337         * css/CSSAllInOne.cpp:
338         Added ElementRuleCollector and PageRuleCollector.
339         * css/DocumentRuleSets.cpp:
340         (WebCore::ShadowDistributedRules::collectMatchRequests):
341         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
342         removed from here.
343         * css/DocumentRuleSets.h:
344         (WebCore::ShadowDistributedRules::isEmpty):
345         Added to quickly check whether there exist any ShadowDistributedRules
346         or not.
347         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
348         (WebCore):
349         (WebCore::ElementRuleCollector::matchedResult):
350         (WebCore::ElementRuleCollector::matchedRuleList):
351         (WebCore::ElementRuleCollector::addMatchedRule):
352         (WebCore::ElementRuleCollector::clearMatchedRules):
353         (WebCore::ElementRuleCollector::ensureRuleList):
354         (WebCore::ElementRuleCollector::addElementStyleProperties):
355         (WebCore::ElementRuleCollector::collectMatchingRules):
356         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
357         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
358         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
359         (WebCore::ElementRuleCollector::matchHostRules):
360         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
361         (WebCore::ElementRuleCollector::matchAuthorRules):
362         (WebCore::ElementRuleCollector::matchUserRules):
363         (WebCore::ElementRuleCollector::matchUARules):
364         (WebCore::ElementRuleCollector::ruleMatches):
365         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
366         (WebCore::ElementRuleCollector::sortMatchedRules):
367         (WebCore::ElementRuleCollector::matchAllRules):
368         Moved these methods from StyleResolver to this class.
369         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
370         This method is used for checking whether a given element can share
371         a cache.
372         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
373         (WebCore):
374         (WebCore::ElementRuleCollector::ElementRuleCollector):
375         Use styleResolver instance to initialize its member variables, i.e.
376         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
377         StyleScopedResolver.
378         (ElementRuleCollector):
379         (WebCore::ElementRuleCollector::setMode):
380         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
381         (WebCore::ElementRuleCollector::setSameOriginOnly):
382         (WebCore::ElementRuleCollector::setRegionForStyling):
383         Mode, SameOriginOnly, RegionForStyling are only used while collecting
384         matched rules.
385         (WebCore::ElementRuleCollector::setMedium):
386         Need to know which default stylesheet should be looked up.
387         (WebCore::ElementRuleCollector::document):
388         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
389         (WebCore::comparePageRules):
390         (WebCore::PageRuleCollector::isLeftPage):
391         (WebCore::PageRuleCollector::isFirstPage):
392         (WebCore::PageRuleCollector::pageName):
393         (WebCore::PageRuleCollector::matchAllPageRules):
394         (WebCore::PageRuleCollector::matchPageRules):
395         (WebCore::checkPageSelectorComponents):
396         (WebCore::PageRuleCollector::matchPageRulesForList):
397         Moved from StyleResolver.
398         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
399         (WebCore):
400         (WebCore::PageRuleCollector::PageRuleCollector):
401         (PageRuleCollector):
402         (WebCore::PageRuleCollector::matchedResult):
403         * css/StyleResolver.cpp:
404         (WebCore):
405         (WebCore::StyleResolver::State::clear):
406         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
407         (WebCore::StyleResolver::State::initForStyleResolve):
408         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
409         (WebCore::StyleResolver::styleForElement):
410         (WebCore::StyleResolver::styleForKeyframe):
411         (WebCore::StyleResolver::pseudoStyleForElement):
412         (WebCore::StyleResolver::styleForPage):
413         (WebCore::StyleResolver::pseudoStyleRulesForElement):
414         (WebCore::StyleResolver::applyMatchedProperties):
415         * css/StyleResolver.h:
416         (WebCore::MatchRequest::MatchRequest):
417         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
418         state.
419         (MatchRequest):
420         (WebCore::StyleResolver::selectorFilter):
421         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
422         (StyleResolver):
423         (MatchResult):
424         (WebCore::StyleResolver::State::State):
425         To pass ASSERT in StyleResolver::applyProperties, need to keep
426         m_regionForStyling.
427         (State):
428         (WebCore::StyleResolver::State::regionForStyling):
429         (WebCore::StyleResolver::State::useSVGZoomRules):
430         (WebCore::StyleResolver::hasSelectorForId):
431         (WebCore):
432         (WebCore::checkRegionSelector):
433         * inspector/InspectorCSSAgent.cpp:
434         (WebCore::InspectorCSSAgent::willMatchRule):
435         Removed StyleResolver from its parameter list. Instead, added
436         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
437         * inspector/InspectorCSSAgent.h:
438         (WebCore):
439         (InspectorCSSAgent):
440         * inspector/InspectorInstrumentation.cpp:
441         (WebCore):
442         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
443         * inspector/InspectorInstrumentation.h:
444         (WebCore):
445         (InspectorInstrumentation):
446         (WebCore::InspectorInstrumentation::willMatchRule):
447
448 2013-03-11  Mike West  <mkwst@chromium.org>
449
450         XSSAuditor doesn't need a copy of the original document's body.
451         https://bugs.webkit.org/show_bug.cgi?id=111946
452
453         Reviewed by Darin Adler.
454
455         The XSSAuditor currently copies the original HTTP body of the document
456         that's being audited in order to include it into a violation report if
457         reflected XSS is detected. We don't actually need to do this, as we
458         have access to the original request information from inside the
459         XSSAuditorDelegate where the report is generated.
460         XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
461         main thread, so it should be safe to reach through the document's
462         loader to get that information directly, rather than passing it from
463         thread to thread via XSSInfo object properties.
464
465         * html/parser/XSSAuditor.h:
466         * html/parser/XSSAuditor.cpp:
467         (WebCore::XSSAuditor::init):
468         (WebCore::XSSAuditor::filterToken):
469         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
470         * html/parser/XSSAuditorDelegate.h:
471         (WebCore::XSSInfo::create):
472         (WebCore::XSSInfo::XSSInfo):
473         * html/parser/XSSAuditorDelegate.cpp:
474         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
475             Drop the XSSInfo and XSSAuditor properties that held an
476             isolatedCopy of the the original HTTP body. Depending on the
477             document's size, this could be a significant savings.
478         (WebCore::XSSAuditorDelegate::didBlockScript):
479             Reach into the document's loader's original request in order to
480             grab the body as a String, and feed that into the violation report
481             object.
482
483             As a drive-by, this patch creates a FrameLoader* temporary
484             variable to minimize repetition in this area of the code. We use
485             the loader a few times, but should only have to grab it once.
486
487 2013-03-11  Silvia Pfeiffer  <silviapf@chromium.org>
488
489         [Chromium] REGRESSION: Closed Captions button not showing properly
490         https://bugs.webkit.org/show_bug.cgi?id=109871
491
492         Reviewed by Jer Noble.
493
494         No new tests - covered by existing tests.
495
496         Most of the patch was in the meantime covered by a patch to
497         https://bugs.webkit.org/show_bug.cgi?id=111109 .
498         This changes a static Chromium-only function name to be consistent with
499         parent class function names.
500
501         * rendering/RenderMediaControlsChromium.cpp:
502         (WebCore::paintMediaToggleClosedCaptionsButton):
503         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
504         Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.
505
506 2013-03-11  Tim Horton  <timothy_horton@apple.com>
507
508         RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
509         https://bugs.webkit.org/show_bug.cgi?id=111962
510         <rdar://problem/13289335>
511
512         Reviewed by Dean Jackson.
513
514         RenderSnapshottedPlugIn should paint its snapshot during the foreground
515         painting phase, instead of BlockBackground, to match normal plugin painting.
516
517         * rendering/RenderSnapshottedPlugIn.cpp:
518         (WebCore::RenderSnapshottedPlugIn::paint):
519
520 2013-03-07  Alexander Pavlov  <apavlov@chromium.org>
521
522         Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
523         https://bugs.webkit.org/show_bug.cgi?id=111313
524
525         Reviewed by Vsevolod Vlasov.
526
527         Frame document update upon XSL transformation was never instrumented.
528         This change instruments the Document::applyXSLTransform() method to that end.
529
530         Test: http/tests/inspector/styles/xsl-transformed.xml
531
532         * dom/Document.cpp:
533         (WebCore::Document::applyXSLTransform): Instrumented.
534         * inspector/InspectorDOMAgent.cpp:
535         (WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
536         * inspector/InspectorDOMAgent.h:
537         * inspector/InspectorInstrumentation.cpp:
538         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
539         * inspector/InspectorInstrumentation.h:
540         (WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
541         (WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.
542
543 2013-03-10  Matt Falkenhagen  <falken@chromium.org>
544
545         Implement inert subtrees needed for modal <dialog>
546         https://bugs.webkit.org/show_bug.cgi?id=110952
547
548         Reviewed by Hajime Morrita.
549
550         This changes Node::disabled() to return true when a modal dialog is
551         open and the node is not in the dialog.
552
553         Reusing disabled for inertness is useful because then event
554         targeting and focus control automatically have the desired behavior:
555         inert nodes are skipped over.
556
557         Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
558                fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
559                fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html
560
561         * dom/Document.h:
562         (WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
563         Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
564         * dom/Node.cpp:
565         (WebCore):
566         (WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
567         (WebCore::Node::disabled): Return false when inert.
568         * dom/Node.h:
569         * html/HTMLFormControlElement.cpp:
570         (WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.
571
572 2013-03-10  Glenn Adams  <glenn@skynav.com>
573
574         Line breaking opportunities at the end of a text node are missed
575         https://bugs.webkit.org/show_bug.cgi?id=17427
576
577         Reviewed by Darin Adler.
578
579         When initializing context for determining next break position,
580         reuse last two characters from previous text node(s) within block.
581         This additional state is stored in the current LazyLineBreakIterator
582         as an optimization to prevent having to add two new parameters to
583         isBreakable().
584
585         At present, this fixes only the ASCII shortcut code path, but
586         does not yet handle the non-ASCII path. Since the ASCII path is
587         the most performant critical, the handling of this latter path
588         will be addressed by webkit.org/b/105692.
589
590         Additionally test for case where last two characters context
591         is derived from distinct nodes, possibly with intervening empty
592         inline node(s).
593
594         Test: fast/text/line-break-between-text-nodes.html
595
596         * platform/text/TextBreakIterator.h:
597         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
598         (WebCore::LazyLineBreakIterator::lastCharacter):
599         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
600         (WebCore::LazyLineBreakIterator::setLastTwoCharacters):
601         (WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
602         (WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
603         (LazyLineBreakIterator):
604         Add state variables to retain last two characters of previous text node(s)
605         for reuse when initializing nextBreakPosition<>() context.
606         * rendering/RenderBlockLineLayout.cpp:
607         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
608         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
609         Record and reset retained last two characters of previous text node(s) as
610         appropriate.
611         * rendering/break_lines.cpp:
612         (WebCore::nextBreakablePosition):
613         Use state variables holding retained last two characters of previous text node(s)
614         for when initializing nextBreakPosition<>() context.
615
616 2013-03-10  Darin Adler  <darin@apple.com>
617
618         NetworkStorageSession leaks its CFURLStorageSessionRef
619         https://bugs.webkit.org/show_bug.cgi?id=111950
620         <rdar://problem/13384134>
621
622         Reviewed by Sam Weinig.
623
624         * platform/network/NetworkStorageSession.h:
625         Change the argument type of the constructor to a RetainPtr.
626         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
627         (WebCore::NetworkStorageSession::NetworkStorageSession): Changed
628         the argument type to a RetainPtr.
629         (WebCore::NetworkStorageSession::switchToNewTestingSession): Added
630         calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
631         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
632         (WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
633         instead of the RetainPtr constructor with AdoptCF since the former is
634         far easier to read.
635
636 2013-03-10  Jason Anderssen  <janderssen@gmail.com>
637
638         Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
639         https://bugs.webkit.org/show_bug.cgi?id=111641
640
641         Reviewed by Dean Jackson.
642
643         The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined 
644         as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
645         value and fail. 
646         The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
647         https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.
648
649         * html/canvas/WebGLRenderingContext.cpp:
650         (WebCore::WebGLRenderingContext::bufferData):
651         Synthesize error and returned if size is 0.
652
653 2013-03-10  Andreas Kling  <akling@apple.com>
654
655         SVGDocumentExtensions should use OwnPtr for pending resource maps.
656         <http://webkit.org/b/111943>
657
658         Reviewed by Anders Carlsson.
659
660         * svg/SVGDocumentExtensions.cpp:
661         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
662         (WebCore::SVGDocumentExtensions::addPendingResource):
663         (WebCore::SVGDocumentExtensions::isElementPendingResources):
664         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
665         (WebCore::SVGDocumentExtensions::removePendingResource):
666         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
667         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
668         * svg/SVGDocumentExtensions.h:
669         (SVGDocumentExtensions):
670
671 2013-03-10  Tim Horton  <timothy_horton@apple.com>
672
673         Add a heuristic to determine the “primary” snapshotted plugin
674         https://bugs.webkit.org/show_bug.cgi?id=111932
675         <rdar://problem/13270208>
676
677         Reviewed by Dean Jackson.
678
679         * WebCore.exp.in: Export a few things.
680         * html/HTMLPlugInImageElement.cpp:
681         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
682         (WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
683         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
684         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
685         * html/HTMLPlugInImageElement.h:
686         (HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.
687
688 2013-03-10  Mike West  <mkwst@chromium.org>
689
690         XSSAuditor doesn't need a copy of the original document URL.
691         https://bugs.webkit.org/show_bug.cgi?id=111944
692
693         Reviewed by Adam Barth.
694
695         When creating an XSSInfo object in response to detecting reflected XSS
696         on a page, the Auditor was passing in a copy of the document's
697         original URL for reporting. It doesn't look like we need this, as
698         XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
699         with access to the document. We can obtain access to the same
700         information by reading the URL directly from the delegate's Document
701         object if and when we need it.
702
703         * html/parser/XSSAuditorDelegate.cpp:
704         (WebCore::XSSAuditorDelegate::didBlockScript):
705             Read the document's URL directly in order to create a violation
706             report.
707         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
708         * html/parser/XSSAuditorDelegate.h:
709         (WebCore::XSSInfo::create):
710         (WebCore::XSSInfo::XSSInfo):
711         * html/parser/XSSAuditor.cpp:
712         (WebCore::XSSAuditor::init):
713         (WebCore::XSSAuditor::filterToken):
714         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
715         * html/parser/XSSAuditor.h:
716             Remove the copied original URL from both XSSInfo objects and the
717             XSSAuditor.
718
719 2013-03-10  Andreas Kling  <akling@apple.com>
720
721         GlyphMetricsMap should use OwnPtr.
722         <http://webkit.org/b/111937>
723
724         Reviewed by Anders Carlsson.
725
726         Use OwnPtr instead of raw pointer + deleteAllValues().
727
728         * platform/graphics/GlyphMetricsMap.h:
729         (GlyphMetricsMap):
730         (WebCore::::locatePageSlowCase):
731
732 2013-03-10  Eric Carlson  <eric.carlson@apple.com>
733
734         Allow iOS port to use InbandTextTrackPrivateAVF
735         https://bugs.webkit.org/show_bug.cgi?id=111933
736
737         Reviewed by Dean Jackson.
738
739         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
740         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by cleanup.
741         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
742
743 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
744
745         Enable platform code to implement text track menu
746         https://bugs.webkit.org/show_bug.cgi?id=111924
747
748         Reviewed by Dean Jackson.
749
750         No new tests, the new code isn't enabled in any ports yet.
751
752         * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
753
754         * html/HTMLAudioElement.cpp:
755         (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
756
757         * html/HTMLMediaElement.cpp:
758         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
759         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
760         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
761         (WebCore::HTMLMediaElement::insertedInto): Ditto.
762         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
763         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
764         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
765         (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
766         (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
767         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
768         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending 
769             the track directly.
770         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
771             selected track.
772         (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
773             the current text tracks.
774         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
775             that the list of text tracks has changed.
776         (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
777         (WebCore::HTMLMediaElement::closeCaptionTracksChanged): 
778         (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
779         (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
780         (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
781         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
782         (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
783         (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
784         (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
785         (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
786         * html/HTMLMediaElement.h:
787
788         * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
789
790         * html/track/TextTrack.cpp:
791         (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
792         * html/track/TextTrack.h:
793
794         * platform/graphics/MediaPlayer.cpp:
795         (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
796         (WebCore::MediaPlayer::textTrackMenu): Ditto.
797         * platform/graphics/MediaPlayer.h:
798         * platform/graphics/MediaPlayerPrivate.h:
799
800         * platform/graphics/PlatformTextTrack.h: Added.
801
802         * platform/graphics/PlatformTextTrackMenu.h: Added.
803
804 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
805
806         Video size calculated incorrectly when PLUGIN_PROXY_FOR_VIDEO
807         https://bugs.webkit.org/show_bug.cgi?id=111912
808
809         Reviewed by Dean Jackson.
810
811         * html/shadow/MediaControlElements.cpp:
812         (WebCore::MediaControlTextTrackContainerElement::updateSizes): We use RenderPart when
813             PLUGIN_PROXY_FOR_VIDEO is defined, not RenderVideo.
814
815 2013-03-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
816
817         Fix offset handling in GStreamer WebKitWebSource.
818         https://bugs.webkit.org/show_bug.cgi?id=111888
819
820         Reviewed by Philippe Normand.
821
822         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
823         (webKitWebSrcSeekDataCb):
824         (StreamingClient::didReceiveData):
825         The offset handling in WebKitWebSource was completely wrong
826         before and caused wrong offsets to be set on the GStreamer buffers
827         after a seek.
828
829         Apart from that there was also a race condition that happens
830         when a downstream element causes seeks in very short succession
831         and is switching between two different parts of the stream.
832
833 2013-03-09  Keishi Hattori  <keishi@webkit.org>
834
835         Month transition animation is missing in some places
836         https://bugs.webkit.org/show_bug.cgi?id=111908
837
838         Reviewed by Kent Tamura.
839
840         Month transition animation was missing when navigating using keyboard
841         shortcuts and when navigation was trigger by selecting.
842
843         Added tests to calendar-picker/*-picker-key-operations.html.
844
845         * Resources/pagepopups/calendarPicker.js:
846         (Animator): Added annotations.
847         (Animator.prototype.isRunning): Returns true of the animation is running. Used by test.
848         (ScrollView.prototype.scrollAnimator): Returns the scroll animator. Used by test.
849         (CalendarPicker):
850         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Use CalendarPicker.NavigationBehavior enum instead of bool.
851         (CalendarPicker.prototype.setSelection): Ditto.
852         (CalendarPicker.prototype._moveHighlight): Ditto.
853         (CalendarPicker.prototype.onCalendarTableKeyDown): Ditto.
854         (CalendarPicker.prototype.onBodyKeyDown): Ditto.
855
856 2013-03-09  Dean Jackson  <dino@apple.com>
857
858         Can't build w/o accelerated compositing
859         https://bugs.webkit.org/show_bug.cgi?id=111891
860
861         Patch originally came from Tobias Mueller <tobiasmue@gnome.org>
862
863         Unreviewed build fix for platforms without ACCELERATED_COMPOSITING enabled, due
864         to r145057.
865
866         * dom/PseudoElement.cpp:
867         (WebCore::PseudoElement::~PseudoElement): Wrap the call to pseudoElementDestroyed in
868             USE(ACCELERATED_COMPOSITING)
869
870 2013-03-07  Robert Hogan  <robert@webkit.org>
871
872         REGRESSION(r140907): Incorrect baseline for cells with media content during load
873         https://bugs.webkit.org/show_bug.cgi?id=108357
874
875         Reviewed by Julien Chaffraix.
876
877         If a cell has replaced content, the intrinsic height of its content can change between layouts. If that's the case then the intrinsic padding we used
878         for layout (the padding required to push the contents of the cell down to the row's baseline) is included in the new height and baseline and makes both
879         of them wrong. So if a cell's content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
880         table and row layout can use the correct baseline and height for this cell.
881
882         Tests: fast/css/vertical-align-baseline-rowspan-012.html
883                http/tests/css/vertical-align-baseline-after-image-load-2.html
884                http/tests/css/vertical-align-baseline-after-image-load-3.html
885                http/tests/css/vertical-align-baseline-after-image-load.html
886
887         * rendering/RenderTableCell.cpp:
888         (WebCore::RenderTableCell::layout):
889         * rendering/RenderTableCell.h:
890         (WebCore::RenderTableCell::isBaselineAligned):
891         * rendering/RenderTableSection.cpp:
892         (WebCore::RenderTableSection::calcRowLogicalHeight):
893         (WebCore::RenderTableSection::layoutRows):
894
895 2013-03-08  Chris Fleizach  <cfleizach@apple.com>
896
897         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
898         https://bugs.webkit.org/show_bug.cgi?id=111613
899
900         Reviewed by Ryosuke Niwa.
901
902         This crash happens when the mock synthesizer utterance variable gets cleared
903         before the speakingFinished timer happens. I don't see how that could happen
904         but I was able to make a similar problem happen when cancel is called twice.
905
906         This adds in a few more asserts and common sense checks. I'm hoping it will
907         illuminate the problem further.
908
909         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
910         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
911         (WebCore::PlatformSpeechSynthesizerMock::speak):
912         (WebCore::PlatformSpeechSynthesizerMock::cancel):
913
914 2013-03-08  David Kilzer  <ddkilzer@apple.com>
915
916         BUILD FIX: Make WebCore link for iOS
917
918         * WebCore.exp.in:
919         - Add ENABLE(RUBBER_BAND) for FrameView::setWantsLayerForTopOverHangArea(bool)
920           and FrameView::setWantsLayerForBottomOverHangArea(bool).
921         - Move FloatPoint::FloatPoint(_NSPoint const&) to !PLATFORM(IOS)
922           section.
923
924 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
925
926         [CSS Grid Layout] Resolve grid-{end|after} integer against the end|after edge
927         https://bugs.webkit.org/show_bug.cgi?id=111885
928
929         Reviewed by Tony Chang.
930
931         The current code resolves grid-end (resp. grid-after) <integer>'s format against the start
932         (resp. before) axis. The specification changed so that they are resolved against their matching
933         axis.
934
935         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
936
937         * rendering/RenderGrid.cpp:
938         (WebCore::RenderGrid::maximumIndexInDirection):
939         Updated the code to do the grid sizing measurement without resolveGridPositionsFromStyle. That's required
940         as resolveGridPositionsFromStyle requires the grid to be sized.
941
942         (WebCore::RenderGrid::placeItemsOnGrid):
943         Added a comment about not recomputing after grid growth. This issue was raised to www-style
944         (http://lists.w3.org/Archives/Public/www-style/2013Mar/0182.html).
945
946         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
947         Added an ASSERT now that we don't call it during grid construction. Also added some code to pass
948         the side of the GridPosition we give to resolveGridPositionFromStyle.
949
950         (WebCore::RenderGrid::resolveGridPositionFromStyle):
951         Updated the code to resolve the grid position against the right side.
952
953         * rendering/RenderGrid.h:
954         Added GridPositionSide and updated resolveGridPositionFromStyle's signature.
955
956 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
957
958         Unreviewed, rolling out r142015.
959         http://trac.webkit.org/changeset/142015
960         https://bugs.webkit.org/show_bug.cgi?id=111904
961
962         The change caused 2 major regressions (bug 111091 and bug
963         111595) and Pravin doesn't have time to investigate them
964         (Requested by jchaffraix on #webkit).
965
966         * dom/Node.cpp:
967         (WebCore::Node::diff):
968         * rendering/RenderBlock.cpp:
969         (WebCore::RenderBlock::childBecameNonInline):
970         (WebCore):
971         * rendering/RenderBlock.h:
972         (RenderBlock):
973         * rendering/RenderBoxModelObject.h:
974         (WebCore::RenderBoxModelObject::childBecameNonInline):
975         (RenderBoxModelObject):
976         * rendering/RenderInline.cpp:
977         (WebCore::RenderInline::childBecameNonInline):
978         (WebCore):
979         * rendering/RenderInline.h:
980         (RenderInline):
981         * rendering/RenderObject.cpp:
982         (WebCore):
983         (WebCore::RenderObject::handleDynamicFloatPositionChange):
984         (WebCore::RenderObject::styleWillChange):
985         (WebCore::RenderObject::styleDidChange):
986         * rendering/RenderObject.h:
987         (RenderObject):
988
989 2013-03-08  Dean Jackson  <dino@apple.com>
990
991         Don't snapshot Java plugins
992         https://bugs.webkit.org/show_bug.cgi?id=111899
993
994         Reviewed by Tim Horton.
995
996         Export MIMETypeRegistry::isJavaAppletMIMEType symbol.
997
998         * WebCore.exp.in:
999
1000 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
1001
1002         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
1003         https://bugs.webkit.org/show_bug.cgi?id=111880
1004
1005         Reviewed by Eric Seidel.
1006
1007         Currently, </template> handling exits with an error if there is not a template tag "in scope"
1008         which will be true if there is a table (for instance) below a template. This makes it so that
1009         the search (correctly) examines the entire element stack.
1010
1011         Tests added to html5lib testing library.
1012
1013         * html/parser/HTMLTreeBuilder.cpp:
1014         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
1015
1016 2013-03-08  Eric Seidel  <eric@webkit.org>
1017
1018         BackgroundHTMLParser should be able to atomize well-known strings
1019         https://bugs.webkit.org/show_bug.cgi?id=107337
1020
1021         Reviewed by Adam Barth.
1022
1023         Testing this patch easily requires applying bug 107236 locally
1024         to remove all the rendering noise from Parser/html-threaded-parser.html.
1025
1026         This patch adds a new class HTMLIdentifier which allows us to avoid
1027         allocating strings for known tag/attribute names from HTMLNames.
1028
1029         There is still a lot of meat on this bone, but I think it's important to
1030         land something "smallish" to start and iterate from there.
1031
1032         This took Parser/html-threaded-parser.html from:
1033         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
1034         to:
1035         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
1036         on my MBP.
1037
1038         * CMakeLists.txt:
1039         * GNUmakefile.list.am:
1040         * Target.pri:
1041         * WebCore.gypi:
1042         * WebCore.vcproj/WebCore.vcproj:
1043         * WebCore.vcxproj/WebCore.vcxproj:
1044         * html/parser/AtomicHTMLToken.h:
1045         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1046         * html/parser/BackgroundHTMLParser.cpp:
1047         (WebCore::tokenExitsForeignContent):
1048         (WebCore::tokenExitsSVG):
1049         (WebCore::tokenExitsMath):
1050         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1051         * html/parser/CSSPreloadScanner.cpp:
1052         (WebCore::CSSPreloadScanner::scan):
1053         * html/parser/CSSPreloadScanner.h:
1054         (WebCore):
1055         (CSSPreloadScanner):
1056         * html/parser/CompactHTMLToken.cpp:
1057         (SameSizeAsCompactHTMLToken):
1058         (WebCore::CompactHTMLToken::CompactHTMLToken):
1059         * html/parser/CompactHTMLToken.h:
1060         (WebCore::CompactHTMLToken::Attribute::Attribute):
1061         (Attribute):
1062         (WebCore::CompactHTMLToken::data):
1063         (WebCore::CompactHTMLToken::publicIdentifier):
1064         (CompactHTMLToken):
1065         * html/parser/HTMLDocumentParser.cpp:
1066         (WebCore::HTMLDocumentParser::startBackgroundParser):
1067         * html/parser/HTMLIdentifier.cpp: Added.
1068         (WebCore):
1069         (WebCore::identifierTable):
1070         (WebCore::HTMLIdentifier::hasIndex):
1071         (WebCore::HTMLIdentifier::findIndex):
1072         (WebCore::nameForIndex):
1073         (WebCore::HTMLIdentifier::asString):
1074         (WebCore::HTMLIdentifier::asStringImpl):
1075         (WebCore::HTMLIdentifier::addNames):
1076         (WebCore::HTMLIdentifier::init):
1077         * html/parser/HTMLIdentifier.h: Added.
1078         (WebCore):
1079         (HTMLIdentifier):
1080         (WebCore::HTMLIdentifier::HTMLIdentifier):
1081         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
1082         * html/parser/HTMLParserIdioms.cpp:
1083         (WebCore::threadSafeEqual):
1084         (WebCore::threadSafeMatch):
1085         * html/parser/HTMLParserIdioms.h:
1086         (WebCore):
1087         (WebCore::threadSafeHTMLNamesMatch):
1088         * html/parser/HTMLPreloadScanner.cpp:
1089         (WebCore::TokenPreloadScanner::tagIdFor):
1090         (WebCore::TokenPreloadScanner::StartTagScanner::match):
1091         (TokenPreloadScanner::StartTagScanner):
1092         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1093         * html/parser/HTMLPreloadScanner.h:
1094
1095 2013-03-08  Brandon Jones  <bajones@google.com>
1096
1097         Check to ensure MultisampleRenderbuffer creation succeeds
1098         https://bugs.webkit.org/show_bug.cgi?id=111780
1099
1100         Reviewed by Dean Jackson.
1101
1102         On OSX systems using AMD graphics chips the allocation of large
1103         Multisample Renderbuffers in Chromium would fail without any indication
1104         of failure. Attempting to draw to the buffer resulted in garbage being
1105         rendered onscreen. This could be reproduced by opening a full-page
1106         WebGL app and pressing (Command + "-") several times. This patch adds an
1107         additional check during DrawingBuffer resize to verify that the resized
1108         buffer is valid. 
1109
1110         * platform/graphics/gpu/DrawingBuffer.cpp:
1111         (WebCore):
1112         (WebCore::DrawingBuffer::checkBufferIntegrity):
1113         (WebCore::DrawingBuffer::reset):
1114         * platform/graphics/gpu/DrawingBuffer.h:
1115         (DrawingBuffer):
1116
1117 2013-03-08  Harald Alvestrand  <hta@chromium.org>
1118
1119         Implemented new API for RTCStatsReport object.
1120         https://bugs.webkit.org/show_bug.cgi?id=110333
1121
1122         Removed RTCStatsElement object, moved its interface to
1123         RTCStatsReport. Preserved some interfaces for
1124         backwards compatibility; will be removed in a later patch.
1125
1126         Reviewed by Adam Barth.
1127
1128         Tested by extensions to RTCPeerConnection-stats test.
1129
1130         * Modules/mediastream/RTCStatsElement.cpp: Removed.
1131         * Modules/mediastream/RTCStatsElement.h: Removed.
1132         * Modules/mediastream/RTCStatsElement.idl: Removed.
1133         * Modules/mediastream/RTCStatsReport.cpp:
1134         (WebCore::RTCStatsReport::create):
1135         (WebCore::RTCStatsReport::RTCStatsReport):
1136         (WebCore):
1137         (WebCore::RTCStatsReport::names):
1138         (WebCore::RTCStatsReport::local):
1139         (WebCore::RTCStatsReport::remote):
1140         (WebCore::RTCStatsReport::addStatistic):
1141         (WebCore::RTCStatsReport::addElement):
1142         * Modules/mediastream/RTCStatsReport.h:
1143         (RTCStatsReport):
1144         (WebCore::RTCStatsReport::timestamp):
1145         (WebCore::RTCStatsReport::id):
1146         (WebCore::RTCStatsReport::stat):
1147         * Modules/mediastream/RTCStatsReport.idl:
1148         * Modules/mediastream/RTCStatsResponse.cpp:
1149         (WebCore::RTCStatsResponse::namedItem):
1150         (WebCore):
1151         (WebCore::RTCStatsResponse::addReport):
1152         (WebCore::RTCStatsResponse::addStatistic):
1153         * Modules/mediastream/RTCStatsResponse.h:
1154         (RTCStatsResponse):
1155         * Modules/mediastream/RTCStatsResponse.idl:
1156         * WebCore.gypi:
1157         * platform/chromium/support/WebRTCStatsResponse.cpp:
1158         (WebKit::WebRTCStatsResponse::addReport):
1159         (WebKit):
1160         (WebKit::WebRTCStatsResponse::addStatistic):
1161         (WebKit::WebRTCStatsResponse::addElement):
1162         * platform/mediastream/RTCStatsResponseBase.h:
1163         (RTCStatsResponseBase):
1164
1165 2013-03-08  Eric Seidel  <eric@webkit.org>
1166
1167         Free up background parser's checkpoints when speculation succeeds
1168         https://bugs.webkit.org/show_bug.cgi?id=110547
1169
1170         Reviewed by Adam Barth.
1171
1172         This should be a memory (and possible perf) win while parsing
1173         pages, as we will no longer hold multiple copies of every
1174         source byte during the whole parse.
1175
1176         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
1177         that we're hitting this code, but we'll have to wait for the memory/perf bots
1178         to tell us if this shows up as a win.
1179
1180         We only bother to message the parser at the end of a speculation chain, so as not
1181         to send too many messages to the background parser.
1182
1183         * html/parser/BackgroundHTMLInputStream.cpp:
1184         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
1185         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
1186         (WebCore):
1187         (WebCore::BackgroundHTMLInputStream::rewindTo):
1188         * html/parser/BackgroundHTMLInputStream.h:
1189         (BackgroundHTMLInputStream):
1190         (Checkpoint):
1191         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
1192         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
1193         * html/parser/BackgroundHTMLParser.cpp:
1194         (WebCore::BackgroundHTMLParser::passedCheckpoint):
1195         (WebCore):
1196         * html/parser/BackgroundHTMLParser.h:
1197         (BackgroundHTMLParser):
1198         * html/parser/HTMLDocumentParser.cpp:
1199         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1200
1201 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
1202
1203         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
1204         https://bugs.webkit.org/show_bug.cgi?id=111112
1205
1206         Reviewed by Tony Chang.
1207
1208         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
1209         the firefox behaviour in linux platform.
1210
1211         Added Manual Test : ManualTests/shift-alt-key-event.html
1212         Try press Shift then alt key. The test passes if the shiftKey, altKey values
1213         of JSKeyEvent are true and keycode/which is 18.
1214
1215         * platform/chromium/KeyCodeConversionGtk.cpp:
1216         (WebCore::windowsKeyCodeForKeyEvent):
1217
1218 2013-03-08  Mike West  <mkwst@chromium.org>
1219
1220         CSP: 'eval()' is blocked in report-only mode.
1221         https://bugs.webkit.org/show_bug.cgi?id=111867
1222
1223         Reviewed by Adam Barth.
1224
1225         Setting a 'Content-Security-Policy-Report-Only' header should not have
1226         any effect on what a page actually executes. Currently, however, setting
1227         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
1228         blocks 'eval()' on the page. This patch fixes that by checking whether
1229         we're in report-only mode before turning 'eval()' off inside the script
1230         engine.
1231
1232         This leaves us in a weird state, however. We don't currently have any
1233         mechanism of explaining to the VM that we just want to be notified of
1234         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
1235         aspect.
1236
1237         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
1238
1239         * page/ContentSecurityPolicy.cpp:
1240         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1241             For each policy we parse, check that we're only turning off eval in
1242             the VM when we're in enforce mode. If we're in report-only mode,
1243             skip it.
1244
1245 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
1246
1247         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
1248         https://bugs.webkit.org/show_bug.cgi?id=111782
1249
1250         Reviewed by Ojan Vafai.
1251
1252         Test: fast/forms/button-first-line-first-letter.html
1253
1254         * rendering/RenderBlock.cpp:
1255         (WebCore::RenderBlock::firstLineBlock):
1256         (WebCore::findFirstLetterBlock):
1257         Add isRenderButton to the first-line and first-letter checks that
1258         don't allow ::first-* styles for flexbox.
1259
1260 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
1261
1262         Removed an out-of-date comment from SharedTimer
1263         https://bugs.webkit.org/show_bug.cgi?id=111875
1264
1265         Reviewed by Mark Hahnenberg.
1266
1267         Even if we surround each call to an ObjC interface with an autorelease
1268         pool, it's still nice to have one at top-level entry points like
1269         timers, to avoid turning a single mistake into a long-term leak.
1270
1271         * platform/ios/SharedTimerIOS.mm:
1272         (WebCore::timerFired):
1273         * platform/mac/SharedTimerMac.mm:
1274         (WebCore::timerFired):
1275
1276 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
1277
1278         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
1279         https://bugs.webkit.org/show_bug.cgi?id=111297
1280
1281         Reviewed by Kenneth Rohde Christiansen.
1282
1283         The 'view-mode' Media Feature spec is implemented in WebCore but
1284         there is no WebKit support for it on Mac.
1285         Because of this, we always lie and report a windowed view mode.
1286
1287         This patch add a feature flag for the feature and disable it on
1288         Mac so that we stop reporting incorrect default values.
1289
1290         * WebCore.exp.in:
1291         * css/CSSValueKeywords.in:
1292         * css/MediaFeatureNames.h:
1293         (MediaFeatureNames):
1294         * css/MediaQueryEvaluator.cpp:
1295         * css/MediaQueryExp.cpp:
1296         (WebCore::featureWithCSSValueID):
1297         (WebCore::featureWithoutValue):
1298         * page/Page.cpp:
1299         (WebCore::Page::Page):
1300         * page/Page.h:
1301         (Page):
1302
1303 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1304
1305         After sending message, Mail changes formatting
1306         https://bugs.webkit.org/show_bug.cgi?id=111360
1307
1308         Reviewed by Enrica Casucci.
1309
1310         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
1311         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
1312         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
1313         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
1314         isomorphic but this is a step forward.
1315
1316         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
1317
1318         * editing/ReplaceSelectionCommand.cpp:
1319         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
1320         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
1321         except main element, which is currently missing in the specification.
1322         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
1323         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
1324         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
1325
1326         * editing/ReplaceSelectionCommand.h:
1327         (ReplaceSelectionCommand):
1328
1329 2013-03-08  Eric Seidel  <eric@webkit.org>
1330
1331         AtomicHTMLToken should not be heap allocated or RefCounted
1332         https://bugs.webkit.org/show_bug.cgi?id=111250
1333
1334         Reviewed by Adam Barth.
1335
1336         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
1337         We don't need the actual "token" saved, just enough of it to recreate a fake token.
1338
1339         This removed many more mallocs than I thought it would, for a nice little speed win.
1340         Before:
1341         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
1342         After:
1343         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
1344
1345         * html/parser/AtomicHTMLToken.h:
1346         (AtomicHTMLToken):
1347         * html/parser/HTMLConstructionSite.cpp:
1348         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
1349         * html/parser/HTMLDocumentParser.cpp:
1350         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
1351         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
1352         * html/parser/HTMLElementStack.cpp:
1353         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1354         * html/parser/HTMLFormattingElementList.cpp:
1355         (WebCore):
1356         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1357         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
1358         * html/parser/HTMLStackItem.h:
1359         (WebCore::HTMLStackItem::create):
1360         (WebCore::HTMLStackItem::localName):
1361         (WebCore::HTMLStackItem::attributes):
1362         (WebCore::HTMLStackItem::getAttributeItem):
1363         (HTMLStackItem):
1364         (WebCore::HTMLStackItem::hasLocalName):
1365         (WebCore::HTMLStackItem::hasTagName):
1366         (WebCore::HTMLStackItem::HTMLStackItem):
1367         * html/parser/HTMLTreeBuilder.cpp:
1368         (WebCore::HTMLTreeBuilder::processFakeStartTag):
1369         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1370         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
1371         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1372         (WebCore::HTMLTreeBuilder::processStartTag):
1373         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1374         (WebCore::HTMLTreeBuilder::processEndTag):
1375         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
1376         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
1377         (WebCore::HTMLTreeBuilder::defaultForInHead):
1378         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
1379         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
1380         * html/parser/TextDocumentParser.cpp:
1381         (WebCore::TextDocumentParser::insertFakePreElement):
1382
1383 2013-03-08  Roger Fong  <roger_fong@apple.com>
1384
1385         Makefile fixes.
1386
1387         * WebCore.vcxproj/WebCore.make:
1388
1389 2013-03-07  Emil A Eklund  <eae@chromium.org>
1390
1391         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
1392         https://bugs.webkit.org/show_bug.cgi?id=111794
1393
1394         Reviewed by Levi Weintraub.
1395         
1396         In RenderTableCell::logicalHeightForRowSizing the
1397         adjustedLogicalHeight is calculated from the logicalHeight and
1398         intrinsic padding and is then returned and floored. This can
1399         cause cause the cell to be slightly smaller (0.5px) than the
1400         element it contains.
1401
1402         Test: fast/sub-pixel/table-cell-height.html
1403
1404         * rendering/RenderTableCell.h:
1405         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1406         Change to use pixelSnapped version of logicalHeight method and
1407         change signature to return int as the only caller immediately
1408         down-casts the result to an int.
1409
1410 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
1411
1412         RenderFullScreen needs to clear override sizes when exiting full screen
1413         https://bugs.webkit.org/show_bug.cgi?id=111775
1414
1415         Reviewed by Ojan Vafai.
1416
1417         Test: fullscreen/full-screen-with-flex-item.html
1418
1419         * rendering/RenderFullScreen.cpp:
1420         (RenderFullScreen::unwrapRenderer):
1421         RenderFullScreen is a flexbox, so it will potentially set override
1422         sizes on its children while in fullscreen mode. When we exit
1423         fullscreen mode, we need to clear this override size, otherwise the
1424         the leftover override size may affect layout. See the testcase for an
1425         example.
1426
1427 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
1428
1429         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
1430         https://bugs.webkit.org/show_bug.cgi?id=111653
1431
1432         Reviewed by Tony Chang.
1433
1434         The rendering code was making the assumption that we have one position.
1435         Thus it couldn't fully match what the specification wants as the 2 opposite
1436         positions are required to resolve either position in several cases (e.g.
1437         1 / span 2, auto / 'c').
1438
1439         This change introduces resolveGridPositionsFromStyle to do both opposite
1440         positions resolution in one pass and thus handling more cases.
1441
1442         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
1443
1444         * rendering/RenderGrid.cpp:
1445         (WebCore::RenderGrid::maximumIndexInDirection):
1446         (WebCore::RenderGrid::placeItemsOnGrid):
1447         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1448         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1449         Updated the above functions to rely on resolveGridPositionsFromStyle.
1450
1451         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1452         Added this new function that handle the correct resolution.
1453
1454         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1455         Updated the ASSERT to match the new code flow.
1456
1457         * rendering/RenderGrid.h:
1458         (WebCore::RenderGrid::GridSpan::GridSpan):
1459         Introduced this new struct to hold the 2 positions along one axis.
1460
1461 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
1462
1463         RenderTextControlSingleLine should not assume that its text element has a renderer
1464         https://bugs.webkit.org/show_bug.cgi?id=111826
1465
1466         Reviewed by Ojan Vafai.
1467
1468         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
1469                fast/forms/search/search-hide-decoration-container-crash.html
1470                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
1471
1472         * rendering/RenderTextControlSingleLine.cpp:
1473         (WebCore::RenderTextControlSingleLine::layout):
1474         (WebCore::RenderTextControlSingleLine::controlClipRect):
1475         (WebCore::RenderTextControlSingleLine::autoscroll):
1476         (WebCore::RenderTextControlSingleLine::scroll):
1477
1478 2013-03-08  Joshua Bell  <jsbell@chromium.org>
1479
1480         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
1481         https://bugs.webkit.org/show_bug.cgi?id=111459
1482
1483         Reviewed by Adam Barth.
1484
1485         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
1486         origin is opened, the backing store instance must be re-used). This was a map to raw
1487         pointers so that the backing store can be collected when all database references are
1488         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
1489         would add/remove itself on creation/destruction.
1490
1491         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
1492         "leak" but are purged on subsequent opens.
1493
1494         Added webkit_unit_test (Chromium port) to verify refcounts.
1495
1496         * Modules/indexeddb/IDBBackingStore.cpp:
1497         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
1498         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
1499         (WebCore::IDBBackingStore::open): Ditto.
1500         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
1501         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
1502         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1503         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
1504         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
1505         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
1506         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1507         (IDBFactoryBackendImpl): Remove plumbing methods.
1508
1509 2013-03-08  John Mellor  <johnme@chromium.org>
1510
1511         @media queries do not take zooming into account
1512         https://bugs.webkit.org/show_bug.cgi?id=53186
1513
1514         Reviewed by Kenneth Rohde Christiansen.
1515
1516         Fixes @media width and height to take into account full page zoom, by
1517         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
1518         corresponding to the existing code in Element::clientWidth which makes
1519         document.documentElement.clientWidth take into account page zoom.
1520
1521         Test: fast/media/mq-width-pagezoom.html
1522
1523         * css/MediaQueryEvaluator.cpp:
1524         (WebCore::heightMediaFeatureEval):
1525         (WebCore::widthMediaFeatureEval):
1526
1527 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1528
1529         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
1530         https://bugs.webkit.org/show_bug.cgi?id=111841
1531
1532         Reviewed by Rob Buis.
1533
1534         Add empty implementations of
1535         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
1536         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
1537         build.
1538
1539         * platform/network/blackberry/DNSBlackBerry.cpp:
1540         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1541         (WebCore::DNSResolveQueue::platformResolve):
1542
1543 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
1544
1545        Adding a hook to collect data for a Google UMA histogram to track when
1546        m_needsCompositedScrolling is turned on and off.
1547        https://bugs.webkit.org/show_bug.cgi?id=111725
1548
1549        Reviewed by Julien Chaffraix.
1550
1551        We want to keep track of this information to quantify the effects of a
1552        few patches that will cause us to opt in to composited scrolling.
1553        Specifically, we want to measure the effects of
1554        https://bugs.webkit.org/show_bug.cgi?id=109302,
1555        https://bugs.webkit.org/show_bug.cgi?id=109966,
1556        https://bugs.webkit.org/show_bug.cgi?id=109591, and
1557        https://bugs.webkit.org/show_bug.cgi?id=107618.
1558
1559        We do this by measuring a per-layer boolean value, and comparing the
1560        ratio between number of layers opted in and number of layers that remain
1561        uncomposited. We hope the relative number of layers opting in will
1562        increase after the relevant patches land and are enabled.
1563
1564        Unfortunately implementing extra statistics is impractical at the
1565        moment since most of the actionable relevant data is expensive to
1566        compute. For example, it would be useful to know if the layers that opt
1567        out do so because of invisible or non-overlapping layers that cause a
1568        potential stacking container's children to be discontiguous, because we
1569        would potentially be able to mitigate the problem. However, this would
1570        add considerable overhead to perform overlap testing just to gather
1571        data.
1572
1573        No new tests (no change in behaviour).
1574
1575        * rendering/RenderLayer.cpp:
1576        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1577
1578 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1579
1580         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
1581         https://bugs.webkit.org/show_bug.cgi?id=111852
1582
1583         Reviewed by Rob Buis.
1584
1585         This changed in r139353.
1586
1587         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1588         (WebCore::GraphicsContext::clipRoundedRect):
1589
1590 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1591
1592         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
1593         https://bugs.webkit.org/show_bug.cgi?id=111840
1594
1595         Reviewed by Rob Buis.
1596
1597         This parameter was added in r137011.
1598
1599         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1600         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1601
1602 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1603
1604         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
1605         https://bugs.webkit.org/show_bug.cgi?id=111838
1606
1607         Reviewed by Rob Buis.
1608
1609         This was removed in r139138.
1610
1611         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1612
1613 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1614
1615         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
1616         https://bugs.webkit.org/show_bug.cgi?id=111836
1617
1618         Reviewed by Rob Buis.
1619
1620         This parameter was added in r139967.
1621
1622         * platform/graphics/blackberry/PathBlackBerry.cpp:
1623         (WebCore):
1624         (WebCore::GraphicsContext::clip):
1625         (WebCore::GraphicsContext::canvasClip):
1626
1627 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1628
1629         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
1630         https://bugs.webkit.org/show_bug.cgi?id=111753
1631
1632         Reviewed by Pavel Feldman.
1633
1634         * inspector/front-end/FileSystemMapping.js:
1635         (WebInspector.FileSystemMappingImpl):
1636         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
1637         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
1638         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
1639         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
1640         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
1641         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
1642         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
1643         * inspector/front-end/FileSystemProjectDelegate.js:
1644         (WebInspector.FileSystemProjectDelegate.projectId):
1645         (WebInspector.FileSystemProjectDelegate.prototype.id):
1646         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
1647         (WebInspector.FileSystemWorkspaceProvider):
1648         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
1649         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
1650         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
1651         * inspector/front-end/IsolatedFileSystemManager.js:
1652         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
1653         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
1654         * inspector/front-end/Workspace.js:
1655         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1656
1657 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1658
1659         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
1660         https://bugs.webkit.org/show_bug.cgi?id=111732
1661
1662         Reviewed by Pavel Feldman.
1663
1664         Resources matching inspectedPageURL are always expanded in NavigatorView now.
1665         Snippets tab in scripts navigator is not automatically opened anymore.
1666         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
1667         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
1668
1669         * inspector/front-end/NavigatorView.js:
1670         (WebInspector.NavigatorView):
1671         (WebInspector.NavigatorView.prototype.addUISourceCode):
1672         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
1673         (WebInspector.NavigatorView.prototype.revealUISourceCode):
1674         (WebInspector.NavigatorView.prototype.removeUISourceCode):
1675         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
1676         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
1677         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
1678         * inspector/front-end/ScriptsNavigator.js:
1679         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
1680         * inspector/front-end/ScriptsPanel.js:
1681         (WebInspector.ScriptsPanel.prototype._showFile):
1682         * inspector/front-end/Settings.js:
1683         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
1684         * inspector/front-end/TabbedEditorContainer.js:
1685         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
1686         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
1687         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
1688
1689 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1690
1691         Web Inspector: Add shortcut for running a snippet.
1692         https://bugs.webkit.org/show_bug.cgi?id=111680
1693
1694         Reviewed by Pavel Feldman.
1695
1696         Added Ctrl/Cmd+Enter as a shortcut for running a snippet.
1697
1698         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
1699         (WebInspector.SnippetJavaScriptSourceFrame):
1700         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
1701         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
1702         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
1703
1704 2013-03-08  Philip Rogers  <pdr@google.com>
1705
1706         Prevent infinite loop in SVG use cycle detection
1707         https://bugs.webkit.org/show_bug.cgi?id=111822
1708
1709         Reviewed by Stephen Chenney.
1710
1711         SVG use cycle detection depended on idForStyleResolution() which differs from
1712         getIdAttribute() in quirks mode. During use tree cycle detection, this difference
1713         resulted in an infinite loop because idForStyleResolution() used lower-cased id
1714         attributes. This patch removes an existing fixme for this and switches to using
1715         getIdAttribute().
1716
1717         Test: svg/custom/use-cycle-detection.html
1718
1719         * svg/SVGUseElement.cpp:
1720         (WebCore::SVGUseElement::hasCycleUseReferencing):
1721
1722 2013-03-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1723
1724         When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
1725         https://bugs.webkit.org/show_bug.cgi?id=111675
1726
1727         Reviewed by Stephen Chenney.
1728
1729         RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().
1730
1731         In the following spec, SVG don't perform automatic line break or word wrapping.
1732         http://www.w3.org/TR/SVG/text.html#Introduction
1733         > SVG performs no automatic line breaking or word wrapping.
1734         However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
1735         This make single character lines and make RenderSVGText narrow.
1736
1737         We must ignore word-wrap property to make the text a single line.
1738
1739         We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.
1740
1741         Test: svg/text/preserve-break-word.html
1742
1743         * rendering/RenderBlockLineLayout.cpp:
1744         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.
1745
1746 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1747
1748         [Qt] HTML5 video - sound volume bar out of widget
1749         https://bugs.webkit.org/show_bug.cgi?id=108213
1750
1751         Reviewed by Jocelyn Turcotte.
1752
1753         Since we use Safari shadow DOM for media controls, follow
1754         the overall layout of Safari media control CSS.
1755
1756         * css/mediaControlsQt.css:
1757         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1758         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1759         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1760         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
1761         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1762         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
1763         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1764         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1765         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1766         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
1767         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
1768         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
1769         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
1770         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
1771
1772 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1773
1774         [Qt] Doesn't build with QtMultimedia
1775         https://bugs.webkit.org/show_bug.cgi?id=111847
1776
1777         Reviewed by Jocelyn Turcotte.
1778
1779         Fix include.
1780
1781         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1782
1783 2013-03-08  Huang Dongsung  <luxtella@company100.net>
1784
1785         [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
1786         https://bugs.webkit.org/show_bug.cgi?id=111829
1787
1788         Reviewed by Noam Rosenthal.
1789
1790         Currently, flagsChanged deals with all boolean flags. It introduces this bug
1791         because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
1792         to false. So this patch updates all flags when at least one flag is changed.
1793
1794         In addition, this patch amends isScrollable code to match other flags.
1795
1796         This patch can only be tested manually since there is no automated
1797         testing facilities for in-motion touch.
1798         Test: ManualTests/fixed-position.html
1799               ManualTests/nested-fixed-position.html
1800
1801         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1802         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
1803         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
1804         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1805         (WebCore::CoordinatedGraphicsScene::setLayerState):
1806         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1807         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
1808
1809 2013-03-07  Dean Jackson  <dino@apple.com>
1810
1811         Remove dead label code in snapshotted plugin
1812         https://bugs.webkit.org/show_bug.cgi?id=111781
1813
1814         Reviewed by Tim Horton.
1815
1816         Since ports can use the shadow tree to do label display,
1817         there is no need for the hardcoded timers in RenderSnapshottedPlugin.
1818
1819         * rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
1820         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
1821         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
1822         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
1823         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1824         * rendering/RenderSnapshottedPlugIn.h:
1825         (RenderSnapshottedPlugIn):
1826
1827 2013-03-07  Dean Jackson  <dino@apple.com>
1828
1829         Implement a custom appearance for the snapshotted plugin background
1830         https://bugs.webkit.org/show_bug.cgi?id=108368
1831
1832         Reviewed by Tim Horton.
1833
1834         After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
1835         snapshotted plugin was no longer drawing the background of the
1836         label blurred. Since the snapshot content was now a shadow tree,
1837         it wasn't feasible to pre-blur a region of the snapshot: the label
1838         could be any size and in any location, with ports being able to
1839         override the appearance through their UA style sheet.
1840
1841         Instead we now use one of the elements in the tree, the snapshot-overlay,
1842         as a hook where ports can add any effect they want. This could be simply
1843         a border, or a transparent mask, or even a CSS filter. We introduce a custom
1844         CSS appearance "snapshotted-plugin-overlay", which could be added to the
1845         element in the injected UA stylesheet. This calls into RenderTheme in
1846         the same way that custom controls do.
1847
1848         Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
1849         content of the plugin snapshot into the background of the element. That
1850         way we can add effects in CSS.
1851
1852         Test: plugins/snapshot-appearance.html
1853
1854         * css/CSSPrimitiveValueMappings.h:
1855         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
1856         * css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
1857         * platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
1858         * html/HTMLPlugInElement.h:
1859         (WebCore::toHTMLPlugInElement): Add safer casting helpers.
1860         * html/HTMLPlugInImageElement.h:
1861         (WebCore::toHTMLPlugInImageElement): Ditto.
1862         * rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
1863             the blur directly in the renderer.
1864         (WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
1865             no longer trying to blur here.
1866         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
1867         * rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
1868             to blur the image directly.
1869         * rendering/RenderTheme.cpp:
1870         (WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
1871         * rendering/RenderTheme.h:
1872         (WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
1873         * rendering/RenderThemeMacShared.h:
1874         (RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
1875         * rendering/RenderThemeMacShared.mm:
1876         (WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
1877             that takes the snapshot image from the node's parent, and draws it into the background.
1878             Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).
1879
1880 2013-03-08  Sergio Villar Senin  <svillar@igalia.com>
1881
1882         Improve drag&drop of list items in contentEditable divs
1883         https://bugs.webkit.org/show_bug.cgi?id=111556
1884
1885         Reviewed by Ryosuke Niwa.
1886
1887         A single fully selected <li> should generate the same markup as if
1888         we were selecting some of them, i.e., we should preserve the list
1889         structure and appearance.
1890
1891         Test: editing/selection/drag-list-item.html
1892
1893         * editing/htmlediting.cpp:
1894         (WebCore::isListItem): modified constness.
1895         * editing/htmlediting.h:
1896         (WebCore): ditto.
1897         * editing/markup.cpp:
1898         (WebCore::highestAncestorToWrapMarkup):
1899
1900 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1901
1902         [BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
1903         https://bugs.webkit.org/show_bug.cgi?id=111828
1904
1905         Reviewed by Carlos Garcia Campos.
1906
1907         This changed in r141637.
1908
1909         * platform/graphics/blackberry/LayerTiler.cpp:
1910         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1911
1912 2013-03-08  Antoine Quint  <graouts@apple.com>
1913
1914         Fix a couple of typos.
1915
1916         Unreviewed.
1917
1918         * inspector/Inspector.json:
1919
1920 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1921
1922         [BlackBerry] Use OwnPtr for CredentialBackingStore members
1923         https://bugs.webkit.org/show_bug.cgi?id=111737
1924
1925         Reviewed by Rob Buis.
1926
1927         It simplifies the code a bit.
1928
1929         * platform/network/blackberry/CredentialBackingStore.cpp:
1930         (WebCore::CredentialBackingStore::~CredentialBackingStore):
1931         (WebCore::CredentialBackingStore::open):
1932         (WebCore::CredentialBackingStore::certMgrWrapper):
1933         * platform/network/blackberry/CredentialBackingStore.h:
1934         (CredentialBackingStore):
1935
1936 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
1937
1938         MemoryPressureHandler should fully flush the WebCore & NS URL caches
1939         https://bugs.webkit.org/show_bug.cgi?id=111827
1940
1941         Rubber Stamped by Geoff Garen
1942
1943         When the handler is fired we should free as much memory as possible.
1944
1945         * platform/mac/MemoryPressureHandlerMac.mm:
1946         (WebCore::MemoryPressureHandler::releaseMemory):
1947             - fully flush the WebCore & NS URL caches
1948
1949 2013-03-07  Keishi Hattori  <keishi@webkit.org>
1950
1951         Update calendar picker UI
1952         https://bugs.webkit.org/show_bug.cgi?id=109439
1953
1954         Reviewed by Kent Tamura.
1955
1956         This patch changes the calendar picker UI.
1957
1958         Added tests to existing calendar picker tests.
1959         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
1960
1961         * Resources/pagepopups/calendarPicker.css:
1962         (body):
1963         (.rtl):
1964         (.scroll-view):
1965         (.scroll-view-content):
1966         (.list-cell):
1967         (.list-cell.hidden):
1968         (.day-cell):
1969         (.week-number-cell):
1970         (.day-cell.today):
1971         (.day-cell.highlighted):
1972         (.day-cell.highlighted.disabled):
1973         (.day-cell.selected):
1974         (.day-cell.disabled):
1975         (.day-cell.current-month):
1976         (.calendar-table-view):
1977         (.preparing .calendar-table-view:focus):
1978         (.week-day-label):
1979         (.week-number-label):
1980         (.calendar-table-header-view):
1981         (.calendar-picker):
1982         (.calendar-header-view):
1983         (.calendar-title):
1984         (.rtl .calendar-title):
1985         (.month-popup-button:disabled):
1986         (.month-popup-button):
1987         (.month-popup-button .disclosure-triangle):
1988         (.month-popup-button .disclosure-triangle svg):
1989         (.today-button::after):
1990         (.calendar-navigation-button):
1991         (.year-list-view):
1992         (.year-list-cell):
1993         (.year-list-cell .label):
1994         (.year-list-cell .month-chooser):
1995         (.month-buttons-row):
1996         (.month-button):
1997         (.month-button.highlighted):
1998         (.scrubby-scroll-bar):
1999         (.scrubby-scroll-thumb):
2000         (.month-popup-view):
2001         (.year-list-view .scrubby-scroll-bar):
2002         (.rtl .year-list-view .scrubby-scroll-bar):
2003         * Resources/pagepopups/calendarPicker.js:
2004         (setGlobalParams): Sets the global params.
2005         (initialize):
2006         (openCalendarPicker):
2007         (CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
2008         (CalendarPicker):
2009         (CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
2010         to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
2011         (CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
2012         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
2013         (CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
2014         (CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
2015         (CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
2016         (CalendarPicker.prototype._setConfig): Configures the calendar picker.
2017         (CalendarPicker.prototype.currentMonth): The currently shown month.
2018         (CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
2019         (CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
2020         (CalendarPicker.prototype.selection): Currently selected date range.
2021         (CalendarPicker.prototype.highlight): Currently highlighted date range.
2022         (CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
2023         (CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
2024         (CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
2025         (CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
2026         (CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
2027         (CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
2028         (CalendarPicker.prototype._stepMismatch): Just moving.
2029         (CalendarPicker.prototype._outOfRange): Ditto.
2030         (CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
2031         (CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
2032         (CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
2033         (CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
2034         (CalendarPicker.prototype.width):
2035         (CalendarPicker.prototype.height):
2036         (CalendarPicker.prototype.setHeight):
2037         (CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
2038         * Resources/pagepopups/chromium/calendarPickerChromium.css:
2039         (.calendar-table-view:focus):
2040         (.preparing .calendar-table-view:focus):
2041
2042 2013-03-07  Seokju Kwon  <seokju.kwon@gmail.com>
2043
2044         Web Inspector: Remove unused return value after r122962
2045         https://bugs.webkit.org/show_bug.cgi?id=111821
2046
2047         Reviewed by Pavel Feldman.
2048
2049         No new tests.
2050
2051         * inspector/front-end/ConsolePanel.js:
2052         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
2053         * inspector/front-end/ElementsPanel.js:
2054         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
2055         * inspector/front-end/ScriptsPanel.js:
2056         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
2057
2058 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2059
2060         Unreviewed, rolling out r145166.
2061         http://trac.webkit.org/changeset/145166
2062         https://bugs.webkit.org/show_bug.cgi?id=111819
2063
2064         build break - no symbol
2065         webkit_support::CreateScopedTempDirectory() (Requested by
2066         hayato on #webkit).
2067
2068         * Modules/indexeddb/IDBBackingStore.cpp:
2069         (WebCore::IDBBackingStore::IDBBackingStore):
2070         (WebCore::IDBBackingStore::~IDBBackingStore):
2071         (WebCore::IDBBackingStore::open):
2072         * Modules/indexeddb/IDBBackingStore.h:
2073         (WebCore):
2074         (IDBBackingStore):
2075         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2076         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
2077         (WebCore):
2078         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
2079         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2080         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2081         (IDBFactoryBackendImpl):
2082
2083 2013-03-07  Hajime Morrita  <morrita@google.com>
2084
2085         Custom Elements: CustomElement constructor shouldn't share function instance
2086         https://bugs.webkit.org/show_bug.cgi?id=111807
2087
2088         Reviewed by Kentaro Hara.
2089
2090         Adaptor functions of custom elements unintentionally share the instance.
2091         This fix gives new one for each.
2092
2093         Test: Updated fast/dom/custom/document-register-basic.html
2094
2095         * bindings/v8/V8AdaptorFunction.cpp:
2096         (WebCore::V8AdaptorFunction::wrap):
2097
2098 2013-03-07  Jared Wyles  <wyles@adobe.com>
2099
2100         Reading border radius from style property returns in wrong order.
2101         https://bugs.webkit.org/show_bug.cgi?id=110853
2102
2103         Reviewed by Ryosuke Niwa
2104         
2105         Updating the order of border-radius to return in the order specified
2106         in http://www.w3.org/TR/css3-background/#the-border-radius
2107
2108         Tests updated in LayoutTests/fast/borders/border-radius-parsing.html 
2109         Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt 
2110         
2111         Compat information -
2112         jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
2113         Zepto does check for the element on style first so may be a slight concern there.
2114
2115         * css/StylePropertyShorthand.cpp:
2116         (WebCore::borderRadiusShorthand):
2117
2118 2013-03-07  Andreas Kling  <akling@apple.com>
2119
2120         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
2121         <http://webkit.org/b/71354>
2122         <rdar://problem/10565998>
2123
2124         Reviewed by Anders Carlsson.
2125
2126         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
2127
2128 2013-03-07  Andreas Kling  <akling@apple.com>
2129
2130         Remove desktop version of -webkit-text-size-adjust property.
2131         <http://webkit.org/b/56543>
2132         <rdar://problem/9150203>
2133
2134         Reviewed by Simon Fraser.
2135
2136         This property existed to support a number of Apple-internal clients of WebKit.
2137         We no longer need this property, and since it's clashing with a mobile version of the
2138         same property with different meaning, let's remove it altogether from the desktop build.
2139
2140         * css/CSSComputedStyleDeclaration.cpp:
2141         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2142         * css/CSSParser.cpp:
2143         (WebCore::isValidKeywordPropertyAndValue):
2144         (WebCore::isKeywordPropertyID):
2145         (WebCore::CSSParser::parseValue):
2146         * css/CSSPrimitiveValue.cpp:
2147         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2148         * css/CSSProperty.cpp:
2149         (WebCore::CSSProperty::isInheritedProperty):
2150         * css/CSSPropertyNames.in:
2151         * css/StyleBuilder.cpp:
2152         (WebCore::ApplyPropertyLineHeight::applyValue):
2153         * css/StyleResolver.cpp:
2154         (WebCore::StyleResolver::updateFont):
2155         (WebCore::StyleResolver::applyProperties):
2156         (WebCore::StyleResolver::applyProperty):
2157         * css/StyleResolver.h:
2158         (StyleResolver):
2159         * css/svg.css:
2160         * editing/EditingStyle.cpp:
2161         * inspector/front-end/inspector.css:
2162         (#console-messages):
2163         * inspector/front-end/resourcesPanel.css:
2164         (.storage-view.query):
2165         * rendering/style/RenderStyle.cpp:
2166         (WebCore::RenderStyle::diff):
2167         * rendering/style/RenderStyle.h:
2168         * rendering/style/StyleRareInheritedData.cpp:
2169         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2170         (WebCore::StyleRareInheritedData::operator==):
2171         * rendering/style/StyleRareInheritedData.h:
2172         (StyleRareInheritedData):
2173
2174 2013-03-07  Joshua Bell  <jsbell@chromium.org>
2175
2176         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
2177         https://bugs.webkit.org/show_bug.cgi?id=111459
2178
2179         Reviewed by Adam Barth.
2180
2181         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
2182         origin is opened, the backing store instance must be re-used). This was a map to raw
2183         pointers so that the backing store can be collected when all database references are
2184         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
2185         would add/remove itself on creation/destruction.
2186
2187         Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
2188         "leak" but are purged on subsequent opens.
2189
2190         Added webkit_unit_test (Chromium port) to verify refcounts.
2191
2192         * Modules/indexeddb/IDBBackingStore.cpp:
2193         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
2194         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
2195         (WebCore::IDBBackingStore::open): Ditto.
2196         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
2197         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
2198         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2199         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
2200         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
2201         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
2202         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2203         (IDBFactoryBackendImpl): Remove plumbing methods.
2204
2205 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
2206
2207         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
2208         https://bugs.webkit.org/show_bug.cgi?id=111761
2209
2210         Reviewed by Rob Buis.
2211
2212         Making necessary changes to ref count the ParsedCookie object.
2213
2214         Tested using the opera cookie test suite and the BB Browser cookie test suite.
2215         Tested using the browser, visiting popular sites such as facebook, reddit, google etc
2216         to ensure cookie functionality isn't changed.
2217
2218         * loader/blackberry/CookieJarBlackBerry.cpp:
2219         (WebCore::getRawCookies):
2220         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2221         (WebCore::CookieDatabaseBackingStore::insert):
2222         (WebCore::CookieDatabaseBackingStore::update):
2223         (WebCore::CookieDatabaseBackingStore::remove):
2224         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
2225         (WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
2226         (WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
2227         (WebCore::CookieDatabaseBackingStore::addToChangeQueue):
2228         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2229         (CookieDatabaseBackingStore):
2230         * platform/blackberry/CookieManager.cpp:
2231         (WebCore::cookieSorter):
2232         (WebCore::CookieManager::setCookies):
2233         (WebCore::CookieManager::getCookie):
2234         (WebCore::CookieManager::generateHtmlFragmentForCookies):
2235         (WebCore::CookieManager::getRawCookies):
2236         (WebCore::CookieManager::checkAndTreatCookie):
2237         (WebCore::CookieManager::addCookieToMap):
2238         (WebCore::CookieManager::getBackingStoreCookies):
2239         (WebCore::CookieManager::findOrCreateCookieMap):
2240         (WebCore::CookieManager::removeCookieWithName):
2241         (WebCore::CookieManager::cookieLimitCleanUp):
2242         * platform/blackberry/CookieManager.h:
2243         * platform/blackberry/CookieMap.cpp:
2244         (WebCore::CookieMap::addOrReplaceCookie):
2245         (WebCore::CookieMap::removeCookieAtIndex):
2246         (WebCore::CookieMap::removeCookie):
2247         (WebCore::CookieMap::getAllCookies):
2248         (WebCore::CookieMap::removeOldestCookie):
2249         (WebCore::CookieMap::deleteAllCookiesAndDomains):
2250         (WebCore::CookieMap::getAllChildCookies):
2251         * platform/blackberry/CookieMap.h:
2252         (CookieMap):
2253         * platform/blackberry/CookieParser.cpp:
2254         (WebCore):
2255         (WebCore::CookieParser::parse):
2256         (WebCore::CookieParser::parseOneCookie):
2257         * platform/blackberry/CookieParser.h:
2258         (CookieParser):
2259         * platform/blackberry/ParsedCookie.cpp:
2260         * platform/blackberry/ParsedCookie.h:
2261         (ParsedCookie):
2262         (WebCore::ParsedCookie::create):
2263
2264 2013-03-07  Aaron Colwell  <acolwell@chromium.org>
2265
2266         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
2267         https://bugs.webkit.org/show_bug.cgi?id=110623
2268
2269         Reviewed by Kentaro Hara.
2270
2271         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
2272
2273         * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
2274                                           that have pending activity.
2275         * html/HTMLAudioElement.h:
2276         (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
2277         * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
2278         * html/HTMLMediaElement.cpp:
2279         (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
2280                                                          has audio and is playing. This brings the code into
2281                                                          compliance with the detached element behavior outlined
2282                                                          in the HTML5 spec.
2283         * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
2284                                      considered ActiveDOMObjects.
2285
2286 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
2287
2288         CFNetwork cache partitioning does not work properly on subdomains
2289         https://bugs.webkit.org/show_bug.cgi?id=111772
2290
2291         Reviewed by David Kilzer.
2292
2293         Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.
2294
2295         Not possible to test with current automated test tools, must be tested manually.
2296
2297         * loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
2298         (WebCore):
2299         (WebCore::MemoryCache::add):
2300         (WebCore::MemoryCache::revalidationSucceeded):
2301         (WebCore::MemoryCache::resourceForRequest):
2302         (WebCore::MemoryCache::evict):
2303         (WebCore::MemoryCache::removeResourcesWithOrigin):
2304         * platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
2305         (ResourceRequest):
2306         (WebCore::ResourceRequest::cachePartition):
2307         (WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
2308         * platform/network/cf/ResourceRequestCFNet.cpp:
2309         (WebCore):
2310         (WebCore::ResourceRequest::partitionName):
2311         * platform/network/mac/ResourceRequestMac.mm:
2312         (WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name
2313
2314 2013-03-07  Kenneth Russell  <kbr@google.com>
2315
2316         Compute WebGL context attributes from DrawingBuffer when it is used
2317         https://bugs.webkit.org/show_bug.cgi?id=111666
2318
2319         Reviewed by James Robinson.
2320
2321         Fixed computation of antialias flag when DrawingBuffer is used.
2322
2323         No new tests; covered by existing tests. Ran WebGL conformance
2324         tests on desktop Linux and Android to test.
2325
2326         * html/canvas/WebGLRenderingContext.cpp:
2327         (WebCore):
2328         (WebCore::WebGLRenderingContext::getContextAttributes):
2329             Query DrawingBuffer, when used, for antialias flag.
2330
2331 2013-03-07  Beth Dakin  <bdakin@apple.com>
2332
2333         Need API to draw custom overhang area
2334         https://bugs.webkit.org/show_bug.cgi?id=111679
2335         -and corresponding-
2336         <rdar://problem/13291415>
2337
2338         Reviewed by Simon Fraser.
2339
2340         This will allow clients to put custom images into the top or bottom overhang area.
2341
2342         New FrameView API takes a bool indicating whether the client wants a top/bottom 
2343         overhang layer. If the bool is true, the overhang layer will be returned. 
2344         * WebCore.exp.in:
2345         * page/FrameView.cpp:
2346         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
2347         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
2348         * page/FrameView.h:
2349         (FrameView):
2350
2351         Keep member variables for the top and bottom overhang layers. Create them if 
2352         necessary, and update them if the root layer changes.
2353         * rendering/RenderLayerCompositor.cpp:
2354         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2355         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2356         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2357         (WebCore::RenderLayerCompositor::reportMemoryUsage):
2358         * rendering/RenderLayerCompositor.h:
2359         (RenderLayerCompositor):
2360
2361 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
2362
2363         Reduce page cache size on Mac
2364         https://bugs.webkit.org/show_bug.cgi?id=111795
2365
2366         Rubber stamped by Geoff Garen
2367
2368         5 entries is unnecessarily large; research show 3 should suffice.
2369         On a low memory warning we should clear this completely.
2370
2371         * platform/mac/MemoryPressureHandlerMac.mm:
2372         (WebCore::MemoryPressureHandler::releaseMemory):
2373             - clear the page cache completely
2374
2375 2013-03-07  Simon Fraser  <simon.fraser@apple.com>
2376
2377         Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
2378         https://bugs.webkit.org/show_bug.cgi?id=111779
2379
2380         Reviewed by Tim Horton.
2381         
2382         "TileCache" was a name conflict in downstream code, so rename it to TileController.
2383         The layer that has a TileController is now a WebTiledBackingLayer (which fits with
2384         the TiledBacking API that TileController exposes).
2385         
2386         Also renamed the flags in PlatformCALayer to match.
2387
2388         Rename only, no behavior change.
2389
2390         * WebCore.xcodeproj/project.pbxproj:
2391         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2392         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
2393         * platform/graphics/GraphicsLayerClient.h:
2394         (WebCore::GraphicsLayerClient::shouldUseTiledBacking):
2395         * platform/graphics/ca/GraphicsLayerCA.cpp:
2396         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2397         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2398         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
2399         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
2400         (WebCore::GraphicsLayerCA::updateVisibleRect):
2401         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
2402         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2403         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2404         * platform/graphics/ca/GraphicsLayerCA.h:
2405         * platform/graphics/ca/PlatformCALayer.h:
2406         (WebCore::PlatformCALayer::usesTiledBackingLayer):
2407         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2408         (PlatformCALayer::PlatformCALayer):
2409         (PlatformCALayer::~PlatformCALayer):
2410         (PlatformCALayer::tiledBacking):
2411         * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
2412         * platform/graphics/ca/mac/WebTileLayer.h:
2413         (TileController):
2414         * platform/graphics/ca/mac/WebTileLayer.mm:
2415         (-[WebTileLayer drawInContext:]):
2416         (-[WebTileLayer setTileController:WebCore::]):
2417         (-[WebTileLayer logFilledFreshTile]):
2418         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
2419         * platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
2420         * platform/graphics/mac/WebLayer.mm:
2421         (drawLayerContents):
2422         * rendering/RenderLayerBacking.cpp:
2423         (WebCore::RenderLayerBacking::RenderLayerBacking):
2424         (WebCore::RenderLayerBacking::shouldUseTiledBacking):
2425         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
2426         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2427         * rendering/RenderLayerBacking.h:
2428         (WebCore::RenderLayerBacking::usingTiledBacking):
2429         (RenderLayerBacking):
2430         (WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
2431         * rendering/RenderLayerCompositor.cpp:
2432         (WebCore::RenderLayerCompositor::frameViewDidLayout):
2433         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
2434         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
2435
2436 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
2437
2438         FormData should allow setting filename to empty
2439         https://bugs.webkit.org/show_bug.cgi?id=111687
2440
2441         Reviewed by Brady Eidson.
2442
2443         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
2444                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
2445
2446         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
2447         Missing value is a null string. If the string is empty, we should treat is as
2448         authoritative.
2449
2450 2013-03-07  David Hyatt  <hyatt@apple.com>
2451
2452         REGRESSION: fast/border/border-fit-2.html needs updating
2453         https://bugs.webkit.org/show_bug.cgi?id=111776
2454
2455         Reviewed by Simon Fraser.
2456
2457         This test is incorrectly shrinking the border image now.
2458         We need to apply some clamping to the border-fit like the
2459         old code did. The pixel results *are* still changing though,
2460         since a layout-time shrinkage will not result in right-aligned
2461         boxes in an LTR block when the left edge gets chopped. We'll
2462         have to see if this behavioral change ends up being a problem,
2463         but for now we'll rebaseline and assume it will be ok.
2464
2465         * rendering/RenderBlock.cpp:
2466         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
2467
2468 2013-03-07  Antoine Quint  <graouts@apple.com>
2469
2470         Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
2471         https://bugs.webkit.org/show_bug.cgi?id=111703
2472
2473         Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
2474         the list of reasons why the provided layer was composited as an object with an
2475         optional property for each possible reason. The RenderLayerCompositor already knows
2476         how to provide this information via its own reasonsForCompositing() method, and we
2477         process the returned bitmask to populate the object sent to the front-end.
2478
2479         Reviewed by Timothy Hatcher.
2480
2481         Test: inspector-protocol/layers/layers-compositing-reasons.html
2482
2483         * inspector/Inspector.json:
2484         * inspector/InspectorLayerTreeAgent.cpp:
2485         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2486         (WebCore):
2487         * inspector/InspectorLayerTreeAgent.h:
2488         (InspectorLayerTreeAgent):
2489
2490 2013-03-07  Anders Carlsson  <andersca@apple.com>
2491
2492         Add a didFocusTextField callback to the injected bundle form client
2493         https://bugs.webkit.org/show_bug.cgi?id=111771
2494
2495         Reviewed by Andreas Kling.
2496
2497         Export a symbol needed by WebKit2.
2498
2499         * WebCore.exp.in:
2500
2501 2013-03-06  James Robinson  <jamesr@chromium.org>
2502
2503         [chromium] Stop using WebTransformationMatrix on WebLayer
2504         https://bugs.webkit.org/show_bug.cgi?id=111635
2505
2506         Reviewed by Adrienne Walker.
2507
2508         Switches over to the SkMatrix44 transform setters.
2509
2510         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2511         (WebCore::transformToSkMatrix44):
2512           Utility for convering a WebCore::TransformationMatrix to an SkMatrix44.
2513           Will move to a more common location once it gets more callers.
2514         (WebCore::GraphicsLayerChromium::updateTransform):
2515         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
2516
2517 2013-03-07  Eric Carlson  <eric.carlson@apple.com>
2518
2519         [Mac] allow iOS to use CaptionUserPreferencesMac
2520         https://bugs.webkit.org/show_bug.cgi?id=111770
2521
2522         Reviewed by Dean Jackson.
2523
2524         No new tests, covered by existing tests.
2525
2526         * page/CaptionUserPreferencesMac.h:
2527         * page/CaptionUserPreferencesMac.mm:
2528         (WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
2529             the web thread.
2530
2531 2013-03-07  Mike West  <mkwst@chromium.org>
2532
2533         Move side-effects on hover/active state out of hit-testing
2534         https://bugs.webkit.org/show_bug.cgi?id=98168
2535
2536         Reviewed by Julien Chaffraix.
2537
2538         Original patch by Allan Sandfeld Jensen; I'm just tweaking things.
2539
2540         Document::updateHoverActiveState is currently called during hit testing
2541         to update the hover and active states of elements effected by mouse
2542         movements (or their keyboard equivalents). This conflates the hit test
2543         algorithm itself with side-effects associated with specific use-cases.
2544
2545         This conflation makes it very difficult to reuse the hover/active logic
2546         for things other than hit testing. 'mouseenter'/'mouseleave' events[1]
2547         are one example of a feature that would be simple to implement on top of
2548         this existing logic if we split it out from the hit testing path, and
2549         instead call it explicitly when necessary. An explicit split between
2550         hit testing and its side-effects will also enable us to simplify the
2551         logic in future patches with well-named parameters, rather than relying
2552         on stuffing properties into HitTestRequest.
2553
2554         This patch drops the call to Document::updateHoverActiveState from
2555         RenderView::hitTest, and adjusts the three call-sites in EventHandler
2556         to explicitly call out to it rather than Document::updateStyleIfNeeded.
2557         The latter call is still necessary but has been folded into
2558         updateHoverActiveState, as the former is never called without calling
2559         the latter.
2560
2561         [1]: http://wkbug.com/18930
2562
2563         * dom/Document.h:
2564         * dom/Document.cpp:
2565         (WebCore::Document::updateHoverActiveState):
2566             First, this function must now only be called from contexts that were
2567             performing a read/write hit-test: the code asserts this
2568             precondition.
2569
2570             Second, rather than accepting a HitTestResult, the function accepts
2571             an Element* from which to begin the hover/active chain changes.
2572
2573             Third, we have to explicitly update the hover/active states for
2574             documents between the updated element and the top-level document.
2575             The hit-testing logic was taking care of this for us, now we need to
2576             take care of it ourselves.
2577
2578             Fourth, call out to updateStyleIfNeeded rather than making our
2579             caller do so. The calls were always paired; now that's explicit.
2580         (WebCore::Document::prepareMouseEvent):
2581         * page/EventHandler.cpp:
2582         (WebCore::EventHandler::hitTestResultAtPoint):
2583         (WebCore::EventHandler::sendContextMenuEventForKey):
2584         (WebCore::EventHandler::hoverTimerFired):
2585             Call out to updateHoverActiveState rather than updateStyleIfNeeded.
2586         * rendering/RenderView.cpp:
2587         (WebCore::RenderView::hitTest):
2588             Drop the call to updateHoverActiveState.
2589
2590 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2591
2592         Unreviewed, rolling out r145097.
2593         http://trac.webkit.org/changeset/145097
2594         https://bugs.webkit.org/show_bug.cgi?id=111765
2595
2596         Triggers an ASSERT in the Chromium port (Requested by abarth
2597         on #webkit).
2598
2599         * html/FileInputType.cpp:
2600         (WebCore::FileInputType::appendFormData):
2601         * platform/network/FormData.cpp:
2602         (WebCore::FormData::appendKeyValuePairItems):
2603
2604 2013-03-07  Chris Fleizach  <cfleizach@apple.com>
2605
2606         AX: Can't activate links with VoiceOver in Safari
2607         https://bugs.webkit.org/show_bug.cgi?id=111755
2608
2609         Reviewed by Tim Horton.
2610
2611         VoiceOver is relying on the press action being the first action in the list. We changed
2612         that order inadvertently recently, which confuses VoiceOver.
2613
2614         Test: platform/mac/accessibility/press-action-is-first.html
2615
2616         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2617         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
2618
2619 2013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
2620
2621         Unreviewed, rolling out r145083.
2622         http://trac.webkit.org/changeset/145083
2623         https://bugs.webkit.org/show_bug.cgi?id=110733
2624
2625         caused lots crashes in http/tests/security/xssAuditor/* tests
2626
2627         * html/parser/XSSAuditor.cpp:
2628         (WebCore::XSSAuditor::XSSAuditor):
2629         (WebCore::XSSAuditor::init):
2630         (WebCore::XSSAuditor::filterToken):
2631         * html/parser/XSSAuditor.h:
2632         * html/parser/XSSAuditorDelegate.cpp:
2633         (WebCore::XSSAuditorDelegate::didBlockScript):
2634         * html/parser/XSSAuditorDelegate.h:
2635         (WebCore::XSSInfo::create):
2636         (XSSInfo):
2637         (WebCore::XSSInfo::XSSInfo):
2638
2639 2013-03-07  Michelangelo De Simone  <michelangelo@webkit.org>
2640
2641         [CSS Shaders] Implement hue and saturation non-separable blend modes
2642         https://bugs.webkit.org/show_bug.cgi?id=109464
2643
2644         Added the following GLSL helper functions to the CustomFilterValidatedProgram:
2645
2646             - css_Sat(C): returns the saturation for the color C
2647             - css_SetSat(C, s): sets the saturation s on the color C
2648             - css_SetSatHelper(Cmin, Cmid, Cmax, s): helper function for css_SetSat
2649
2650         The above functions are being used for the "hue" and "saturation" non-separable
2651         blend modes, the relevant spec for such modes is at URL:
2652         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnonseparable
2653
2654         Reviewed by Dean Jackson.
2655
2656         Tests: css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html
2657                css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html
2658
2659         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2660         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
2661
2662 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2663
2664         Web Inspector: [ACE] set correct font
2665         https://bugs.webkit.org/show_bug.cgi?id=111747
2666
2667         Reviewed by Pavel Feldman.
2668
2669         No new tests.
2670
2671         Set class "source-code" for the ace editor element.
2672
2673         * inspector/front-end/AceTextEditor.js:
2674         (WebInspector.AceTextEditor):
2675
2676 2013-03-06  Ojan Vafai  <ojan@chromium.org>
2677
2678         Recalculate borders at the beginning of table layout
2679         https://bugs.webkit.org/show_bug.cgi?id=111634
2680
2681         Reviewed by Julien Chaffraix.
2682
2683         Doing it in convertStyleLogicalWidthToComputedWidth missed some dynamic
2684         relayout cases. I confirmed that the new results match the results we
2685         would get if we set the border width initially instead of dynamically.
2686
2687         * rendering/RenderTable.cpp:
2688         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2689         (WebCore::RenderTable::layout):
2690
2691 2013-03-07  David Hyatt  <hyatt@apple.com>
2692
2693         border-fit-adjust should happen at layout time rather than paint time
2694         https://bugs.webkit.org/show_bug.cgi?id=111606
2695         <rdar://problem/13101714>
2696
2697         Reviewed by Antti Koivisto.
2698
2699         In order for border-fit-adjust to be accurate in more cases, it needs
2700         to be a layout-time adjustment rather than a paint-time adjustment.
2701         Specifically there are cases where an LTR adjusted box was right-aligned
2702         by its container, and without genuinely shrinking the size of the box,
2703         we end up chopping off the right edge but not shifting the box to the
2704         right to compensate.
2705         
2706         This patch changes border-fit-adjust to now do the adjustment using
2707         the override width mechanism and a second layout pass instead of just
2708         hacking painting.
2709
2710         Test: fast/block/border-fit-with-right-alignment.html
2711
2712         * rendering/RenderBlock.cpp:
2713         (WebCore::RenderBlock::layoutBlock):
2714         Calls fitBorderToLinesIfNeeded at the end of layout to do a second
2715         layout pass if the adjustment needs to be made.
2716
2717         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
2718         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
2719         non-virtual, since it's no longer called from RenderBox code. Changed it
2720         to do a relayout using override widths if an adjustment is needed.
2721
2722         * rendering/RenderBlock.h:
2723         (RenderBlock):
2724         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
2725         non-virtual.
2726
2727         * rendering/RenderBox.cpp:
2728         (WebCore::RenderBox::paintBoxDecorations):
2729         (WebCore::RenderBox::paintMask):
2730         Removed the paint-time border-fit adjustment.
2731
2732         (WebCore::RenderBox::computeLogicalWidthInRegion):
2733         Use the override width when border-fit is set to lines.
2734
2735         * rendering/RenderBox.h:
2736         (RenderBox):
2737         Remove the virtual borderFitAdjust method.
2738
2739 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2740
2741         REGRESSION(r143727): Clicking / selecting inside an <embed> is broken
2742         https://bugs.webkit.org/show_bug.cgi?id=111217
2743
2744         Reviewed by Julien Chaffraix.
2745
2746         Hit-testing into child frames need to happen in RenderPart, otherwise
2747         we will miss frame views in <embed> and <object> elements. 
2748
2749         Test: fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html
2750
2751         * rendering/RenderFrameBase.cpp:
2752         * rendering/RenderFrameBase.h:
2753         (RenderFrameBase):
2754         * rendering/RenderPart.cpp:
2755         (WebCore::RenderPart::nodeAtPoint):
2756         * rendering/RenderPart.h:
2757         (RenderPart):
2758
2759 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
2760
2761         FormData should allow setting filename to empty
2762         https://bugs.webkit.org/show_bug.cgi?id=111687
2763
2764         Reviewed by Brady Eidson.
2765
2766         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
2767                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
2768
2769         * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
2770         Use a Blob for empty file input, not a hacky File with empty path.
2771
2772         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
2773         Missing value is a null string. If the string is empty, we should treat is as
2774         authoritative.
2775
2776 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2777
2778         Web Inspector: [CodeMirror] dublicated horizontal scroll
2779         https://bugs.webkit.org/show_bug.cgi?id=111712
2780
2781         Reviewed by Pavel Feldman.
2782
2783         Set a box-sizing css property on all codemirror elements to
2784         "content-box".
2785
2786         No new tests.
2787
2788         * inspector/front-end/cm/cmdevtools.css:
2789         (.CodeMirror *):
2790
2791 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2792
2793         Web Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
2794         https://bugs.webkit.org/show_bug.cgi?id=111735
2795
2796         Reviewed by Pavel Feldman.
2797
2798         * inspector/front-end/ElementsPanel.js:
2799         (WebInspector.ElementsPanel.prototype._splitVertically):
2800         * inspector/front-end/elementsPanel.css:
2801         (.sidebar-pane.composite .metrics-and-computed .sidebar-pane-toolbar):
2802
2803 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
2804
2805         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
2806         https://bugs.webkit.org/show_bug.cgi?id=109932
2807
2808         Reviewed by Martin Robinson.
2809
2810         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
2811         They are now available by default due to the limited set of supported compilers.
2812         * bindings/gobject/GNUmakefile.am: Ditto.
2813
2814 2013-03-07  Mike West  <mkwst@chromium.org>
2815
2816         XSSAuditor should send only one console error when blocking a page.
2817         https://bugs.webkit.org/show_bug.cgi?id=110733
2818
2819         Reviewed by Daniel Bates.
2820
2821         Currently, we send two console errors when XSSAuditor blocks a page:
2822         "Refused to execute a JavaScript script. Source code of script found
2823         within request.\n", and "Entire page will be blocked.".
2824
2825         We should only send one message, tuning it properly for the context, and
2826         including the URL of the page effected by the XSSAuditor's work.
2827
2828         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
2829
2830         * html/parser/XSSAuditor.cpp:
2831         * html/parser/XSSAuditor.h:
2832         (WebCore::XSSAuditor::XSSAuditor):
2833             Add two booleans to track the headers used to set the XSSAuditor state.
2834         (WebCore::XSSAuditor::init):
2835             Save a copy of the document's URL even if we're not generating a
2836             report upon violation: we'll need it for the console messages. Also
2837             populate the didSendValidXXXHeader booleans for use later.
2838         (WebCore::XSSAuditor::filterToken):
2839             Add detail about the header status to the constructed XSSInfo object.
2840         * html/parser/XSSAuditorDelegate.cpp:
2841         (WebCore::buildConsoleError):
2842             Move message construction out into a separate inlined function, as
2843             it's becoming complex.
2844         (WebCore::XSSAuditorDelegate::didBlockScript):
2845             Fold the "Entire page will be blocked" message into the main console
2846             error.
2847         * html/parser/XSSAuditorDelegate.h:
2848         (WebCore::XSSInfo::create):
2849         (WebCore::XSSInfo::XSSInfo):
2850             Add detail about header status to XSSInfo in order to correctly
2851             construct the console error.
2852
2853 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2854
2855         Web Inspector: Add some more compilation annotations to NavigatorView
2856         https://bugs.webkit.org/show_bug.cgi?id=111730
2857
2858         Reviewed by Alexander Pavlov.
2859
2860         * inspector/front-end/NavigatorView.js:
2861
2862 2013-03-06  Gustavo Noronha Silva  <gns@gnome.org>
2863
2864         [GTK] Enable translations for WebKit2
2865         https://bugs.webkit.org/show_bug.cgi?id=111398
2866
2867         Reviewed by Martin Robinson.
2868
2869         Build change only, thus no tests.
2870
2871         * GNUmakefile.am: distribute po files.
2872         * platform/gtk/po/POTFILES.in: adjust paths for translatable files.
2873
2874 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2875
2876         Web Inspector: [CodeMirror] update codemirror to version 3.1
2877         https://bugs.webkit.org/show_bug.cgi?id=111711
2878
2879         Reviewed by Vsevolod Vlasov.
2880
2881         Update code mirror experimental editor to version 3.1
2882
2883         No new tests.
2884
2885         * inspector/front-end/cm/codemirror.css:
2886         (.CodeMirror div.CodeMirror-cursor):
2887         (.CodeMirror div.CodeMirror-secondarycursor):
2888         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
2889         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id)):
2890         (.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite):
2891         (.CodeMirror-gutters):
2892         (.CodeMirror-linewidget):
2893         (.CodeMirror-widget):
2894         (.CodeMirror-focused div.CodeMirror-cursor):
2895         (@media print):
2896         * inspector/front-end/cm/codemirror.js:
2897         (window.CodeMirror):
2898         (window.CodeMirror.):
2899
2900 2013-03-07  Sergio Correia  <sergio.correia@openbossa.org>
2901
2902         OpenGLShims: fix check for ANGLE GLES2 extensions
2903         https://bugs.webkit.org/show_bug.cgi?id=111656
2904
2905         Reviewed by Simon Hausmann.
2906
2907         The check for ANGLE GLES2 extensions is currently being overriden
2908         with checks for APPLE extensions in lookupOpenGLFunctionAddress().
2909
2910         No new tests. No user visible behavior changed.
2911
2912         * platform/graphics/OpenGLShims.cpp:
2913         (WebCore::lookupOpenGLFunctionAddress):
2914
2915 2013-03-07  David Kilzer  <ddkilzer@apple.com>
2916
2917         Rename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
2918         <http://webkit.org/b/111426>
2919
2920         * WebCore.vcxproj/WebCore.vcxproj.filters: Rename visible_units.h
2921         to VisibleUnits.h and re-sort.
2922
2923 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2924
2925         Web Inspector: Support a shortcut for reloading front-end in debug mode.
2926         https://bugs.webkit.org/show_bug.cgi?id=111709
2927
2928         Reviewed by Pavel Feldman.
2929
2930         * inspector/front-end/buildSystemOnly.js:
2931         * inspector/front-end/inspector.js:
2932         (WebInspector.documentKeyDown):
2933
2934 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2935
2936         Web Inspector: Support setting up file system mappings from scripts panel context menu.
2937         https://bugs.webkit.org/show_bug.cgi?id=111583
2938
2939         Reviewed by Pavel Feldman.
2940
2941         Added context menu items to set up network - file system mappings from sources panel.
2942         Implemented mapping add/remove methods on Workspace.
2943         Added a dialog suggesting to reload front-end after making such changes.
2944
2945         * English.lproj/localizedStrings.js:
2946         * inspector/front-end/FileSystemMapping.js:
2947         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPath):
2948         * inspector/front-end/FileSystemProjectDelegate.js:
2949         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
2950         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
2951         * inspector/front-end/FilteredItemSelectionDialog.js:
2952         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
2953         (WebInspector.FilteredItemSelectionDialog.prototype.setQuery):
2954         (WebInspector.SelectUISourceCodeDialog):
2955         (WebInspector.SelectUISourceCodeDialog.prototype.uiSourceCodeSelected):
2956         (WebInspector.SelectUISourceCodeDialog.prototype.filterProject):
2957         (WebInspector.SelectUISourceCodeDialog.prototype.filterUISourceCode):
2958         (WebInspector.SelectUISourceCodeDialog.prototype.selectItem):
2959         (WebInspector.SelectUISourceCodeDialog.prototype._uiSourceCodeAdded):
2960         (WebInspector.OpenResourceDialog):
2961         (WebInspector.OpenResourceDialog.prototype.uiSourceCodeSelected):
2962         (WebInspector.OpenResourceDialog.prototype.filterProject):
2963         (WebInspector.SelectUISourceCodeForProjectTypeDialog):
2964         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.uiSourceCodeSelected):
2965         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.filterProject):
2966         (WebInspector.SelectUISourceCodeForProjectTypeDialog.show):
2967         * inspector/front-end/ScriptsPanel.js:
2968         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
2969         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
2970         (WebInspector.ScriptsPanel.prototype._removeNetworkMapping):
2971         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
2972         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
2973         (WebInspector.ScriptsPanel.prototype.):
2974         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
2975         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2976         * inspector/front-end/SettingsScreen.js:
2977         (WebInspector.WorkspaceSettingsTab):
2978         (WebInspector.WorkspaceSettingsTab.prototype.wasShown):
2979         (WebInspector.WorkspaceSettingsTab.prototype._reset):
2980         * inspector/front-end/ViewportControl.js:
2981         (WebInspector.ViewportControl.prototype.refresh):
2982         * inspector/front-end/Workspace.js:
2983         (WebInspector.Workspace.prototype.addMapping):
2984         (WebInspector.Workspace.prototype.removeMapping):
2985         * inspector/front-end/externs.js:
2986         (WebInspector.suggestReload):
2987         * inspector/front-end/inspector.js:
2988         (WebInspector.suggestReload):
2989
2990 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2991
2992         Web Inspector: Add support for frontend reloading
2993         https://bugs.webkit.org/show_bug.cgi?id=111727
2994
2995         Reviewed by Pavel Feldman.
2996
2997         This patch adds support for frontend reloading including:
2998           - making sure no messages are sent to backend once frontend started reloading
2999           - updating frontend url with up-to-date dockSide query parameter value.
3000
3001         * inspector/front-end/InspectorBackend.js:
3002         (InspectorBackendClass.prototype.sendMessageObjectToBackend):
3003         (InspectorBackendClass.prototype.disconnect):
3004         * inspector/front-end/externs.js:
3005         (WebInspector.reload):
3006         * inspector/front-end/inspector.js:
3007         (WebInspector.reload):
3008
3009 2013-03-07  Alexei Filippov  <alph@chromium.org>
3010
3011         Web Inspector: Change profile start button caption depending on profile type.
3012         https://bugs.webkit.org/show_bug.cgi?id=111698
3013
3014         Change the start profiling button caption to "Snapshot" for
3015         snapshot-like profile types, e.g. JS heap snapshot, native memory snapshot.
3016
3017         Reviewed by Yury Semikhatsky.
3018
3019         * English.lproj/localizedStrings.js:
3020         * inspector/front-end/HeapSnapshotView.js:
3021         (WebInspector.HeapSnapshotProfileType.prototype.isInstantProfile):
3022         * inspector/front-end/NativeMemorySnapshotView.js:
3023         (WebInspector.NativeSnapshotProfileType.prototype.isInstantProfile):
3024         (WebInspector.NativeMemoryProfileType.prototype.isInstantProfile):
3025         * inspector/front-end/ProfileLauncherView.js:
3026         (WebInspector.ProfileLauncherView):
3027         (WebInspector.ProfileLauncherView.prototype.addProfileType):
3028         (WebInspector.ProfileLauncherView.prototype._updateControls):
3029         (WebInspector.MultiProfileLauncherView.prototype._updateControls):
3030         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
3031         * inspector/front-end/ProfilesPanel.js:
3032         (WebInspector.ProfileType.prototype.isInstantProfile):
3033
3034 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3035
3036         [texmap] Remove direct access to clip state from clip stack
3037         https://bugs.webkit.org/show_bug.cgi?id=111630
3038
3039         Reviewed by Allan Sandfeld Jensen.
3040
3041         As we are now monitoring the clip state from
3042         TextureMapperGL/BitmapTextureGL, have direct access to clip state object
3043         would eventually make it dirty without properly setting the
3044         'clipStateDirty' flag. This bug intends to substitute direct access with
3045         auxiliary functions which would set the clip state dirty when necessary.
3046
3047         No new tests. No user visible behavior changed.
3048
3049         * platform/graphics/texmap/TextureMapperGL.cpp:
3050         (WebCore::TextureMapperGL::ClipStack::intersect):
3051         (WebCore::TextureMapperGL::ClipStack::setStencilIndex):
3052         (WebCore::TextureMapperGL::drawBorder):
3053         (WebCore::TextureMapperGL::drawTexture):
3054         (WebCore::TextureMapperGL::beginScissorClip):
3055         (WebCore::TextureMapperGL::beginClip):
3056         Replaced direct access with auxiliary functions.
3057
3058         * platform/graphics/texmap/TextureMapperGL.h:
3059         (ClipStack): Removed ClipStack::current() function.
3060         (WebCore::TextureMapperGL::ClipStack::getStencilIndex): Added.
3061         (WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Added.
3062
3063 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3064
3065         [Texturemapper] transform-style 'flat' value is broken
3066         https://bugs.webkit.org/show_bug.cgi?id=111566
3067
3068         Reviewed by Allan Sandfeld Jensen.
3069
3070         After changes from r144290, the CSS3 'transform-styles' property, when
3071         used with 'flat' value, resulted in non-stenciled rendering inside
3072         clipped area - vide example from Surfin' Safari blog:
3073         https://www.webkit.org/blog-files/3d-transforms/transform-style.html
3074
3075         This patch forces the clip state to be applied when binding the default
3076         surface.
3077
3078         No new tests. No user visible behavior changed.
3079
3080         * platform/graphics/texmap/TextureMapperGL.cpp:
3081         (WebCore::TextureMapperGL::ClipStack::apply):
3082         (WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Added.
3083         Moved state cache check from apply() to applyIfNeeded().
3084
3085         (WebCore::BitmapTextureGL::clearIfNeeded):
3086         (WebCore::BitmapTextureGL::bind):
3087         (WebCore::TextureMapperGL::beginScissorClip):
3088         (WebCore::TextureMapperGL::beginClip):
3089         (WebCore::TextureMapperGL::endClip):
3090         * platform/graphics/texmap/TextureMapperGL.h:
3091         (ClipStack):
3092         Use applyIfNeeded() to check for clip state before clipping.
3093
3094 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
3095
3096         Web Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
3097         https://bugs.webkit.org/show_bug.cgi?id=111715
3098
3099         Reviewed by Pavel Feldman.
3100
3101         Move WebInspector.TextEditorModel.Indent into WebInspector.TextUtils namespace.
3102
3103         No new tests: no change in behaviour.
3104
3105         * inspector/front-end/SettingsScreen.js:
3106         (WebInspector.GenericSettingsTab):
3107         * inspector/front-end/TextEditorModel.js:
3108         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3109         * inspector/front-end/TextUtils.js:
3110
3111 2013-03-07  Ian Vollick  <vollick@chromium.org>
3112
3113         Fix painting phases for composited scrolling
3114         https://bugs.webkit.org/show_bug.cgi?id=107618
3115
3116         Reviewed by Simon Fraser.
3117
3118         With composited scrolling, the scrolling contents layer paints the 
3119         foreground and the main graphics layer paints the background. This 
3120         causes a few problems:
3121
3122           1) If we create a foreground layer, we end up with two layers painting 
3123              the foreground phase.
3124           2) Focus rings / outlines paint into the foreground layer, so they end
3125              up moving around with the scrolling contents.
3126           3) Neg z-order descendants paint in the the main graphics layer and
3127              will therefore not scroll.
3128
3129         To deal with 1) we need to stop painting the foreground into both the
3130         foreground and scrolling contents layers. We also need to ensure that
3131         the foreground layer is the right size and has the right offset from
3132         renderer if we're on the composited scrolling path.
3133
3134         To deal with 2) and 3), I have added a new graphics layer painting phase 
3135         flag -- GraphicsLayerPaintCompositedScroll -- and applied it to two
3136         layers in the subtree created by RenderLayerBacking. This ultimately
3137         affects the paint phase passed to RenderLayer::paintLayerContents and
3138         allows us to paint the focus rings, outlines and negative z-order
3139         descendants into the proper layers.
3140
3141         Tests: compositing/overflow/composited-scrolling-paint-phases.html
3142                compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html
3143                compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html
3144
3145         * page/Frame.h:
3146           Added a flag for including painting phases in the layer tree dump.
3147         (WebCore::GraphicsLayer::dumpProperties):
3148           Can now dump painting phase information, but only if requested.
3149         * platform/graphics/GraphicsLayerClient.h:
3150           Added a new entry to GraphicsLayerPaintingPhaseFlags for comp-scroll.
3151         (WebCore::RenderLayer::paintLayerContents):
3152           Updated the logic to account for the new comp-scroll-related paint
3153           phase flag.
3154         * rendering/RenderLayer.h:
3155           Added the RenderLayer painting phase counterpart to
3156           GraphicsLayerPaintCompositedScroll.
3157         * rendering/RenderLayerBacking.cpp:
3158         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3159           Ensures that the foreground layer is sized correctly for comp-scroll.
3160         (WebCore::RenderLayerBacking::updateScrollingLayers):
3161           If we have a foreground layer, the scrolling contents layer no
3162           longer gets assigned the foreground painting phase.
3163         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
3164           If we're comp-scrolling, then the primary layer gets the new phase.
3165         (WebCore::RenderLayerBacking::paintIntoLayer):
3166           Simply translates the new graphics layer painting phase to its
3167           render layer counterpart.
3168         (WebCore::RenderLayerCompositor::layerTreeAsText):
3169         * testing/Internals.cpp:
3170         (WebCore::Internals::layerTreeAsText):
3171         * testing/Internals.h:
3172         * testing/Internals.idl:
3173           The above changes are solely plumbing to allow layout tests to
3174           request that paint phase information be included in the layer tree
3175           dump.
3176
3177 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3178
3179         [Qt] Use Qt5.1 supportedMimeTypes methods.
3180         https://bugs.webkit.org/show_bug.cgi?id=111185
3181
3182         Reviewed by Jocelyn Turcotte.
3183
3184         Uses the supportedMimeTypes() methods from QImageReader and QImageWriter when available.
3185
3186         * platform/MIMETypeRegistry.cpp:
3187         (WebCore::initializeSupportedImageMIMETypes):
3188         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3189
3190 2013-03-07  Ilya Tikhonovsky  <loislo@chromium.org>
3191
3192         Web Inspector: Flame Chart. Stick item color to the function.
3193         https://bugs.webkit.org/show_bug.cgi?id=111697
3194
3195         Reviewed by Yury Semikhatsky.
3196
3197         Different nodes associated with a single function have to use the same color.
3198         Minor polish: do not filter out (idle) and (program) items. They were big due to an error on v8 side.
3199         Set minimum width to 0 for more precise picture.
3200
3201         * inspector/front-end/FlameChart.js:
3202         (WebInspector.FlameChart):
3203         (WebInspector.FlameChart.prototype._rootNodes):
3204         (WebInspector.FlameChart.prototype.draw):
3205         (WebInspector.FlameChart.prototype._drawNode):
3206         (WebInspector.FlameChart.prototype._drawBar):
3207
3208 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
3209
3210         Web Inspector: [ACE] gutter size should be fixed.
3211         https://bugs.webkit.org/show_bug.cgi?id=111576
3212
3213         Reviewed by Pavel Feldman.
3214
3215         Add a custom ace editor build that supports setFixedGutterWidth configuration
3216         parameter and switch this setting on.
3217
3218         No new tests.
3219
3220         * inspector/front-end/AceTextEditor.js:
3221         (WebInspector.AceTextEditor): Switch fixedGutterWidth setting on.
3222         * inspector/front-end/ace/ace.js:
3223         (.):
3224
3225 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3226
3227         Unreviewed, rolling out r145059.
3228         http://trac.webkit.org/changeset/145059
3229         https://bugs.webkit.org/show_bug.cgi?id=111707
3230
3231         crash webkit build (Requested by tasak on #webkit).
3232
3233         * CMakeLists.txt:
3234         * GNUmakefile.list.am:
3235         * Target.pri:
3236         * WebCore.gypi:
3237         * WebCore.xcodeproj/project.pbxproj:
3238         * css/CSSAllInOne.cpp:
3239         * css/DocumentRuleSets.cpp:
3240         (WebCore::ShadowDistributedRules::collectMatchRequests):
3241         * css/DocumentRuleSets.h:
3242         * css/ElementRuleCollector.cpp: Removed.
3243         * css/ElementRuleCollector.h: Removed.
3244         * css/PageRuleCollector.cpp: Removed.
3245         * css/PageRuleCollector.h: Removed.
3246         * css/StyleResolver.cpp:
3247         (WebCore::leftToRightDeclaration):
3248         (WebCore):
3249         (WebCore::rightToLeftDeclaration):
3250         (WebCore::StyleResolver::State::ensureRuleList):
3251         (WebCore::StyleResolver::State::clear):
3252         (WebCore::StyleResolver::addMatchedProperties):
3253         (WebCore::StyleResolver::addElementStyleProperties):
3254         (MatchingUARulesScope):
3255         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
3256         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
3257         (WebCore::MatchingUARulesScope::isMatchingUARules):
3258         (WebCore::StyleResolver::collectMatchingRules):
3259         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3260         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3261         (WebCore::StyleResolver::matchScopedAuthorRules):
3262         (WebCore::StyleResolver::matchHostRules):
3263         (WebCore::StyleResolver::matchAuthorRules):
3264         (WebCore::StyleResolver::matchUserRules):
3265         (WebCore::StyleResolver::matchUARules):
3266         (WebCore::StyleResolver::collectMatchingRulesForList):
3267         (WebCore::compareRules):
3268         (WebCore::StyleResolver::sortMatchedRules):
3269         (WebCore::StyleResolver::matchAllRules):
3270         (WebCore::StyleResolver::State::initForStyleResolve):
3271         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3272         (WebCore::StyleResolver::styleForElement):
3273         (WebCore::StyleResolver::styleForKeyframe):
3274         (WebCore::StyleResolver::pseudoStyleForElement):
3275         (WebCore::StyleResolver::styleForPage):
3276         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3277         (WebCore::StyleResolver::ruleMatches):
3278         (WebCore::StyleResolver::checkRegionSelector):
3279         (WebCore::comparePageRules):
3280         (WebCore::StyleResolver::matchPageRules):
3281         (WebCore::checkPageSelectorComponents):
3282         (WebCore::StyleResolver::matchPageRulesForList):
3283         (WebCore::StyleResolver::isLeftPage):
3284         (WebCore::StyleResolver::isFirstPage):
3285         (WebCore::StyleResolver::pageName):
3286         * css/StyleResolver.h:
3287         (WebCore::MatchRequest::MatchRequest):
3288         (MatchRequest):
3289         (StyleResolver):
3290         (MatchResult):
3291         (WebCore::StyleResolver::State::State):
3292         (State):
3293         (WebCore::StyleResolver::State::takeRuleList):
3294         (WebCore::StyleResolver::State::setSameOriginOnly):
3295         (WebCore::StyleResolver::State::isSameOriginOnly):
3296         (WebCore::StyleResolver::State::pseudoStyleRequest):
3297         (WebCore::StyleResolver::State::setMode):
3298         (WebCore::StyleResolver::State::mode):
3299         (WebCore::StyleResolver::State::matchedRules):
3300         (WebCore::StyleResolver::State::addMatchedRule):
3301         * inspector/InspectorCSSAgent.cpp:
3302         (WebCore::InspectorCSSAgent::willMatchRule):
3303         * inspector/InspectorCSSAgent.h:
3304         (WebCore):
3305         (InspectorCSSAgent):
3306         * inspector/InspectorInstrumentation.cpp:
3307         (WebCore):
3308         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3309         * inspector/InspectorInstrumentation.h:
3310         (WebCore):
3311         (InspectorInstrumentation):
3312         (WebCore::InspectorInstrumentation::willMatchRule):
3313
3314 2013-03-07  Kentaro Hara  <haraken@chromium.org>
3315
3316         Unreviewed. Rebaselined run-bindings-tests.
3317
3318         * bindings/scripts/test/V8/V8TestInterface.cpp:
3319         (WebCore):
3320         * bindings/scripts/test/V8/V8TestObj.cpp:
3321         (WebCore):
3322
3323 2013-03-07  Takashi Sakamoto  <tasak@google.com>
3324
3325         [Refactoring] Implement RuleCollector
3326         https://bugs.webkit.org/show_bug.cgi?id=109916
3327
3328         Reviewed by Antti Koivisto.
3329
3330         Implemented rule collector for an element and collector for a page.
3331         Not all members in class State are required entire while resolving
3332         a style.
3333
3334         No new tests, because just refactoring.
3335
3336         * CMakeLists.txt:
3337         * GNUmakefile.list.am:
3338         * Target.pri:
3339         * WebCore.gypi:
3340         * WebCore.xcodeproj/project.pbxproj:
3341         * css/CSSAllInOne.cpp:
3342         Added ElementRuleCollector and PageRuleCollector.
3343         * css/DocumentRuleSets.cpp:
3344         (WebCore::ShadowDistributedRules::collectMatchRequests):
3345         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
3346         removed from here.
3347         * css/DocumentRuleSets.h:
3348         (WebCore::ShadowDistributedRules::isEmpty):
3349         Added to quickly check whether there exist any ShadowDistributedRules
3350         or not.
3351         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3352         (WebCore):
3353         (WebCore::ElementRuleCollector::matchedResult):
3354         (WebCore::ElementRuleCollector::matchedRuleList):
3355         (WebCore::ElementRuleCollector::addMatchedRule):
3356         (WebCore::ElementRuleCollector::clearMatchedRules):
3357         (WebCore::ElementRuleCollector::ensureRuleList):
3358         (WebCore::ElementRuleCollector::addElementStyleProperties):
3359         (WebCore::ElementRuleCollector::collectMatchingRules):
3360         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
3361         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3362         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
3363         (WebCore::ElementRuleCollector::matchHostRules):
3364         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
3365         (WebCore::ElementRuleCollector::matchAuthorRules):
3366         (WebCore::ElementRuleCollector::matchUserRules):
3367         (WebCore::ElementRuleCollector::matchUARules):
3368         (WebCore::ElementRuleCollector::ruleMatches):
3369         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3370         (WebCore::ElementRuleCollector::sortMatchedRules):
3371         (WebCore::ElementRuleCollector::matchAllRules):
3372         Moved these methods from StyleResolver to this class.
3373         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
3374         This method is used for checking whether a given element can share
3375         a cache.
3376         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3377         (WebCore):
3378         (WebCore::ElementRuleCollector::ElementRuleCollector):
3379         Use styleResolver instance to initialize its member variables, i.e.
3380         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
3381         StyleScopedResolver.
3382         (ElementRuleCollector):
3383         (WebCore::ElementRuleCollector::setMode):
3384         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
3385         (WebCore::ElementRuleCollector::setSameOriginOnly):
3386         (WebCore::ElementRuleCollector::setRegionForStyling):
3387         Mode, SameOriginOnly, RegionForStyling are only used while collecting
3388         matched rules.
3389         (WebCore::ElementRuleCollector::setMedium):
3390         Need to know which default stylesheet should be looked up.
3391         (WebCore::ElementRuleCollector::document):
3392         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3393         (WebCore::comparePageRules):
3394         (WebCore::PageRuleCollector::isLeftPage):
3395         (WebCore::PageRuleCollector::isFirstPage):
3396         (WebCore::PageRuleCollector::pageName):
3397         (WebCore::PageRuleCollector::matchAllPageRules):
3398         (WebCore::PageRuleCollector::matchPageRules):
3399         (WebCore::checkPageSelectorComponents):
3400         (WebCore::PageRuleCollector::matchPageRulesForList):
3401         Moved from StyleResolver.
3402         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3403         (WebCore):
3404         (WebCore::PageRuleCollector::PageRuleCollector):
3405         (PageRuleCollector):
3406         (WebCore::PageRuleCollector::matchedResult):
3407         * css/StyleResolver.cpp:
3408         (WebCore):
3409         (WebCore::StyleResolver::State::clear):
3410         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
3411         (WebCore::StyleResolver::State::initForStyleResolve):
3412         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3413         (WebCore::StyleResolver::styleForElement):
3414         (WebCore::StyleResolver::styleForKeyframe):
3415         (WebCore::StyleResolver::pseudoStyleForElement):
3416         (WebCore::StyleResolver::styleForPage):
3417         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3418         (WebCore::StyleResolver::applyMatchedProperties):
3419         * css/StyleResolver.h:
3420         (WebCore::MatchRequest::MatchRequest):
3421         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
3422         state.
3423         (MatchRequest):
3424         (WebCore::StyleResolver::selectorFilter):
3425         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
3426         (StyleResolver):
3427         (MatchResult):
3428         (WebCore::StyleResolver::State::State):
3429         To pass ASSERT in StyleResolver::applyProperties, need to keep
3430         m_regionForStyling.
3431         (State):
3432         (WebCore::StyleResolver::State::regionForStyling):
3433         (WebCore::StyleResolver::State::useSVGZoomRules):
3434         (WebCore::StyleResolver::hasSelectorForId):
3435         (WebCore):
3436         (WebCore::checkRegionSelector):
3437         * inspector/InspectorCSSAgent.cpp:
3438         (WebCore::InspectorCSSAgent::willMatchRule):
3439         Removed StyleResolver from its parameter list. Instead, added
3440         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
3441         * inspector/InspectorCSSAgent.h:
3442         (WebCore):
3443         (InspectorCSSAgent):
3444         * inspector/InspectorInstrumentation.cpp:
3445         (WebCore):